From 5c927fb11c186e28502de24893aa9d8d231922aa Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 8 Jun 2026 17:15:39 +0000 Subject: [PATCH 1/5] Initial plan From fccfcdc4bd6af14432e50e40ee2283463fc227c7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 8 Jun 2026 17:21:51 +0000 Subject: [PATCH 2/5] fix: allow OpenWrt untrusted-root test to return 4 --- Docker/OpenWrt/runTests.sh | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/Docker/OpenWrt/runTests.sh b/Docker/OpenWrt/runTests.sh index 1585da5d9a1..ec745a2a547 100755 --- a/Docker/OpenWrt/runTests.sh +++ b/Docker/OpenWrt/runTests.sh @@ -1,14 +1,17 @@ #!/bin/sh -runCMD() { # usage: runCMD "" "" +runCMD() { # usage: runCMD "" "[ ...]" TMP_FILE=$(mktemp) eval $1 > $TMP_FILE 2>&1 RETVAL=$? - if [ "$RETVAL" != "$2" ]; then - echo "Command ($1) returned ${RETVAL}, but expected $2. Error output:" - cat $TMP_FILE - exit 1 - fi + for EXPECTED_RETVAL in $2; do + if [ "$RETVAL" = "$EXPECTED_RETVAL" ]; then + return 0 + fi + done + echo "Command ($1) returned ${RETVAL}, but expected one of: $2. Error output:" + cat $TMP_FILE + exit 1 } # Successful tests @@ -21,7 +24,7 @@ runCMD "uclient-fetch 'https://letsencrypt.org'" 0 # Negative tests runCMD "uclient-fetch --ca-certificate=/dev/null 'https://letsencrypt.org'" 5 runCMD "uclient-fetch 'https://self-signed.badssl.com/'" 5 -runCMD "uclient-fetch 'https://untrusted-root.badssl.com/'" 5 +runCMD "uclient-fetch 'https://untrusted-root.badssl.com/'" "4 5" runCMD "uclient-fetch 'https://expired.badssl.com/'" 5 echo "All tests passed." From e2510bb7b36719fce3f256e134961ddc56794253 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 8 Jun 2026 17:22:29 +0000 Subject: [PATCH 3/5] fix: clean up OpenWrt test temp files --- Docker/OpenWrt/runTests.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Docker/OpenWrt/runTests.sh b/Docker/OpenWrt/runTests.sh index ec745a2a547..0ecf0a7ce0f 100755 --- a/Docker/OpenWrt/runTests.sh +++ b/Docker/OpenWrt/runTests.sh @@ -6,11 +6,13 @@ runCMD() { # usage: runCMD "" "[ ...]" RETVAL=$? for EXPECTED_RETVAL in $2; do if [ "$RETVAL" = "$EXPECTED_RETVAL" ]; then + rm -f $TMP_FILE return 0 fi done echo "Command ($1) returned ${RETVAL}, but expected one of: $2. Error output:" cat $TMP_FILE + rm -f $TMP_FILE exit 1 } From 73641a3f0f7e397c4aa08dbd6e50e83fbd9b7cbc Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 8 Jun 2026 17:23:03 +0000 Subject: [PATCH 4/5] fix: quote OpenWrt test temp file paths --- Docker/OpenWrt/runTests.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Docker/OpenWrt/runTests.sh b/Docker/OpenWrt/runTests.sh index 0ecf0a7ce0f..cf6a0e27177 100755 --- a/Docker/OpenWrt/runTests.sh +++ b/Docker/OpenWrt/runTests.sh @@ -2,17 +2,17 @@ runCMD() { # usage: runCMD "" "[ ...]" TMP_FILE=$(mktemp) - eval $1 > $TMP_FILE 2>&1 + eval $1 > "$TMP_FILE" 2>&1 RETVAL=$? for EXPECTED_RETVAL in $2; do if [ "$RETVAL" = "$EXPECTED_RETVAL" ]; then - rm -f $TMP_FILE + rm -f "$TMP_FILE" return 0 fi done echo "Command ($1) returned ${RETVAL}, but expected one of: $2. Error output:" - cat $TMP_FILE - rm -f $TMP_FILE + cat "$TMP_FILE" + rm -f "$TMP_FILE" exit 1 } From a807cdb8f92c43397ac643093647ec2d7d3c27ba Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 8 Jun 2026 17:23:45 +0000 Subject: [PATCH 5/5] fix: simplify OpenWrt exit code matching --- Docker/OpenWrt/runTests.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Docker/OpenWrt/runTests.sh b/Docker/OpenWrt/runTests.sh index cf6a0e27177..9dbdee441f8 100755 --- a/Docker/OpenWrt/runTests.sh +++ b/Docker/OpenWrt/runTests.sh @@ -4,12 +4,12 @@ runCMD() { # usage: runCMD "" "[ ...]" TMP_FILE=$(mktemp) eval $1 > "$TMP_FILE" 2>&1 RETVAL=$? - for EXPECTED_RETVAL in $2; do - if [ "$RETVAL" = "$EXPECTED_RETVAL" ]; then + case " $2 " in + *" $RETVAL "*) rm -f "$TMP_FILE" return 0 - fi - done + ;; + esac echo "Command ($1) returned ${RETVAL}, but expected one of: $2. Error output:" cat "$TMP_FILE" rm -f "$TMP_FILE"