aboutsummaryrefslogtreecommitdiff
path: root/scripts/testing
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-20 12:02:47 -0500
committerCraig Jennings <c@cjennings.net>2026-05-20 12:02:47 -0500
commit36fd02bac9a9d04015a916a8f4d4e7247f12e8ba (patch)
tree93d0bc661812fbefcb578101404bfe4799d7c014 /scripts/testing
parent01c6c5331defc24f94bf1f667b7f57e0072733b9 (diff)
downloadarchsetup-36fd02bac9a9d04015a916a8f4d4e7247f12e8ba.tar.gz
archsetup-36fd02bac9a9d04015a916a8f4d4e7247f12e8ba.zip
fix: correct a POSIX-sh bashism in init and document two SC2034 cases
init runs under #!/bin/sh but used $(<file) to read /etc/hostname, a bashism that breaks on a strict POSIX sh. I switched it to $(cat) and quoted $interface_up in the same script. The two VM_IP assignments in the test scripts are read by the sourced validation.sh, which shellcheck can't follow, so they now carry a documented disable=SC2034 instead of a bare suppression. The rest of the shellcheck findings across the scripts are intentional (word-splitting on $SSH_OPTS, integer tests in [ ]) or already accepted, so I left them alone.
Diffstat (limited to 'scripts/testing')
-rwxr-xr-xscripts/testing/run-test-baremetal.sh1
-rwxr-xr-xscripts/testing/run-test.sh1
2 files changed, 2 insertions, 0 deletions
diff --git a/scripts/testing/run-test-baremetal.sh b/scripts/testing/run-test-baremetal.sh
index 3beaefc..b6d1ab1 100755
--- a/scripts/testing/run-test-baremetal.sh
+++ b/scripts/testing/run-test-baremetal.sh
@@ -94,6 +94,7 @@ cleanup_baremetal() {
trap cleanup_baremetal EXIT
# Override VM_IP for validation.sh ssh_cmd function
+# shellcheck disable=SC2034 # consumed by the sourced validation.sh
VM_IP="$TARGET_HOST"
# Initialize logging
diff --git a/scripts/testing/run-test.sh b/scripts/testing/run-test.sh
index 18f4fdf..a02412c 100755
--- a/scripts/testing/run-test.sh
+++ b/scripts/testing/run-test.sh
@@ -84,6 +84,7 @@ ARCHZFS_INBOX="$HOME/code/archzfs/inbox"
ARCHSETUP_VM_CONF="$SCRIPT_DIR/archsetup-vm.conf"
# Set VM_IP for validation.sh backward compatibility
+# shellcheck disable=SC2034 # consumed by the sourced validation.sh
VM_IP="localhost"
# Initialize logging and VM paths