====== Checking before the patch ====== ====== Checking the tree with the patch ====== New warnings added --- /tmp/tmp.5mcyUAKq97 2025-09-16 18:12:29.979658023 -0700 +++ /tmp/tmp.zg4FOYMiV6 2025-09-16 18:12:30.794652129 -0700 @@ -2 +2 @@ -In vmtest.sh line 11: +In vmtest.sh line 12: @@ -7 +7 @@ -In vmtest.sh line 12: +In vmtest.sh line 13: @@ -13,2 +13,2 @@ -readonly QEMU_PIDFILE=$(mktemp /tmp/qemu_vsock_vmtest_XXXX.pid) - ^----------^ SC2155 (warning): Declare and assign separately to avoid masking return values. +readonly WAIT_TOTAL=$(( WAIT_PERIOD * WAIT_PERIOD_MAX )) + ^--------^ SC2034 (warning): WAIT_TOTAL appears unused. Verify use (or export if used externally). @@ -17 +17 @@ -In vmtest.sh line 46: +In vmtest.sh line 41: @@ -22 +22 @@ -In vmtest.sh line 57: +In vmtest.sh line 181: @@ -27,3 +27,18 @@ -In vmtest.sh line 136: - for dep in vng ${QEMU} busybox pkill ssh; do - ^-----^ SC2153 (info): Possible misspelling: QEMU may not be assigned. Did you mean qemu? +In vmtest.sh line 272: + ${ns_exec} ssh -q -o UserKnownHostsFile=/dev/null -p ${SSH_HOST_PORT} localhost $* + ^-- SC2048 (warning): Use "$@" (with quotes) to prevent whitespace problems. + ^-- SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + ${ns_exec} ssh -q -o UserKnownHostsFile=/dev/null -p ${SSH_HOST_PORT} localhost "$*" + + +In vmtest.sh line 286: + pkill -SIGTERM -F "${pidfile}" 2>&1 > /dev/null + ^--^ SC2069 (warning): To redirect stdout+stderr, 2>&1 must be last (or use '{ cmd > file; } 2>&1' to clarify). + + +In vmtest.sh line 351: + if [[ "${tname}" =~ "${REQUIRES_NETNS[@]}" ]] && + ^--------------------^ SC2199 (error): Arrays implicitly concatenate in [[ ]]. Use a loop (or explicit * instead of @). + ^--------------------^ SC2076 (warning): Remove quotes from right-hand side of =~ to match as a regex rather than literally. @@ -32 +47 @@ -In vmtest.sh line 183: +In vmtest.sh line 407: @@ -40 +55 @@ -In vmtest.sh line 189: +In vmtest.sh line 413: @@ -45 +60 @@ -In vmtest.sh line 193: +In vmtest.sh line 417: @@ -53 +68,6 @@ -In vmtest.sh line 215: +In vmtest.sh line 441: + ${QEMU_OPTS} -device vhost-vsock-pci,guest-cid=${cid} \ + ^----------^ SC2153 (info): Possible misspelling: QEMU_OPTS may not be assigned. Did you mean qemu_opts? + + +In vmtest.sh line 455: @@ -61,6 +81 @@ -In vmtest.sh line 321: -log_host() { -^-- SC2120 (warning): log_host references arguments, but none are ever passed. - - -In vmtest.sh line 322: +In vmtest.sh line 575: @@ -71 +86 @@ -In vmtest.sh line 325: +In vmtest.sh line 578: @@ -76 +91 @@ -In vmtest.sh line 326: +In vmtest.sh line 579: @@ -81 +96 @@ -In vmtest.sh line 346: +In vmtest.sh line 599: @@ -86 +101 @@ -In vmtest.sh line 357: +In vmtest.sh line 610: @@ -91,3 +106,128 @@ -In vmtest.sh line 395: - --control-port="${port}" 2>&1 | log_host - ^------^ SC2119 (info): Use log_host "$@" if function's $1 should mean script's $1. +In vmtest.sh line 615: + return $rc + ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + return "$rc" + + +In vmtest.sh line 623: + return $rc + ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + return "$rc" + + +In vmtest.sh line 661: + return $rc + ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + return "$rc" + + +In vmtest.sh line 669: + return $rc + ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + return "$rc" + + +In vmtest.sh line 740: + return $rc + ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + return "$rc" + + +In vmtest.sh line 835: + return $KSFT_FAIL + ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + return "$KSFT_FAIL" + + +In vmtest.sh line 849: + return $KSFT_PASS + ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + return "$KSFT_PASS" + + +In vmtest.sh line 852: + return $KSFT_FAIL + ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + return "$KSFT_FAIL" + + +In vmtest.sh line 885: + return $KSFT_FAIL + ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + return "$KSFT_FAIL" + + +In vmtest.sh line 914: + ip netns exec "${ns1}" socat VSOCK-LISTEN:${port} STDOUT &> "${outfile}" & + ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + ip netns exec "${ns1}" socat VSOCK-LISTEN:"${port}" STDOUT &> "${outfile}" & + + +In vmtest.sh line 922: + return $KSFT_FAIL + ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + return "$KSFT_FAIL" + + +In vmtest.sh line 928: + bash -c "echo TEST | socat STDIN VSOCK-CONNECT:2:${port}" 2>&1 | log_guest + ^-------^ SC2119 (info): Use log_guest "$@" if function's $1 should mean script's $1. + + +In vmtest.sh line 956: + return $KSFT_FAIL + ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + return "$KSFT_FAIL" + + +In vmtest.sh line 970: + return $KSFT_PASS + ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + return "$KSFT_PASS" + + +In vmtest.sh line 973: + return $KSFT_FAIL + ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + return "$KSFT_FAIL" + + +In vmtest.sh line 999: + bash -c "echo TEST | socat STDIN VSOCK-CONNECT:2:${port}" 2>&1 | log_guest + ^-------^ SC2119 (info): Use log_guest "$@" if function's $1 should mean script's $1. + + +In vmtest.sh line 1205: + pidfile=$(mktemp $PIDFILE_TEMPLATE) + ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + pidfile=$(mktemp "$PIDFILE_TEMPLATE") @@ -96,3 +236,3 @@ -In vmtest.sh line 404: - --control-port="${port}" 2>&1 | log_host & - ^------^ SC2119 (info): Use log_host "$@" if function's $1 should mean script's $1. +In vmtest.sh line 1233: + host_oops_cnt_after=$(dmesg | grep -i 'Oops' | wc -l) + ^------------^ SC2126 (style): Consider using 'grep -c' instead of 'grep|wc -l'. @@ -101,3 +241,3 @@ -In vmtest.sh line 435: -} -^-- SC1089 (error): Parsing stopped here. Is this keyword correctly matched up? +In vmtest.sh line 1245: + vm_oops_cnt_after=$(vm_ssh none -- dmesg | grep -i 'Oops' | wc -l) + ^------------^ SC2126 (style): Consider using 'grep -c' instead of 'grep|wc -l'. @@ -106,0 +247 @@ + https://www.shellcheck.net/wiki/SC2199 -- Arrays implicitly concatenate in ... @@ -108 +248,0 @@ - https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt...