====== Checking before the patch ====== ====== Checking the tree with the patch ====== New warnings added --- /tmp/tmp.Zu3iPdNbSG 2025-08-05 16:10:41.863926504 -0700 +++ /tmp/tmp.HClfnU8jL9 2025-08-05 16:10:42.605923002 -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 160: @@ -27,3 +27,8 @@ -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 251: + ${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 "$*" + @@ -30,0 +36,3 @@ +In vmtest.sh line 265: + 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). @@ -32 +40,2 @@ -In vmtest.sh line 183: + +In vmtest.sh line 372: @@ -40 +49 @@ -In vmtest.sh line 189: +In vmtest.sh line 378: @@ -45 +54 @@ -In vmtest.sh line 193: +In vmtest.sh line 382: @@ -53 +62,6 @@ -In vmtest.sh line 215: +In vmtest.sh line 406: + ${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 420: @@ -61,6 +75 @@ -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 540: @@ -71 +80 @@ -In vmtest.sh line 325: +In vmtest.sh line 543: @@ -76 +85 @@ -In vmtest.sh line 326: +In vmtest.sh line 544: @@ -81 +90 @@ -In vmtest.sh line 346: +In vmtest.sh line 564: @@ -86 +95 @@ -In vmtest.sh line 357: +In vmtest.sh line 575: @@ -91,3 +100,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 580: + return $rc + ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + return "$rc" + + +In vmtest.sh line 588: + return $rc + ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + return "$rc" + + +In vmtest.sh line 626: + return $rc + ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + return "$rc" + + +In vmtest.sh line 634: + return $rc + ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + return "$rc" + + +In vmtest.sh line 704: + return $rc + ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + return "$rc" + + +In vmtest.sh line 799: + return $KSFT_FAIL + ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + return "$KSFT_FAIL" + + +In vmtest.sh line 813: + return $KSFT_PASS + ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + return "$KSFT_PASS" + + +In vmtest.sh line 816: + 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_FAIL + ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + return "$KSFT_FAIL" + + +In vmtest.sh line 878: + 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 886: + return $KSFT_FAIL + ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + return "$KSFT_FAIL" + + +In vmtest.sh line 892: + 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 920: + return $KSFT_FAIL + ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + return "$KSFT_FAIL" + + +In vmtest.sh line 934: + return $KSFT_PASS + ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + return "$KSFT_PASS" + + +In vmtest.sh line 937: + return $KSFT_FAIL + ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + return "$KSFT_FAIL" + + +In vmtest.sh line 963: + 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 1167: + pidfile=$(mktemp $PIDFILE_TEMPLATE) + ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + pidfile=$(mktemp "$PIDFILE_TEMPLATE") @@ -96,3 +230,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 1189: + host_oops_cnt_after=$(dmesg | grep -i 'Oops' | wc -l) + ^------------^ SC2126 (style): Consider using 'grep -c' instead of 'grep|wc -l'. @@ -101,3 +235,3 @@ -In vmtest.sh line 435: -} -^-- SC1089 (error): Parsing stopped here. Is this keyword correctly matched up? +In vmtest.sh line 1201: + vm_oops_cnt_after=$(vm_ssh none -- dmesg | grep -i 'Oops' | wc -l) + ^------------^ SC2126 (style): Consider using 'grep -c' instead of 'grep|wc -l'.