====== Checking before the patch ====== ====== Checking the tree with the patch ====== New errors added --- /tmp/tmp.JWX0Yzy3Kk 2025-06-16 22:46:50.015516914 -0700 +++ /tmp/tmp.pH5qnRwj4T 2025-06-16 22:46:50.967511031 -0700 @@ -2 +2 @@ -In vmtest.sh line 11: +In vmtest.sh line 53: @@ -7 +7 @@ -In vmtest.sh line 12: +In vmtest.sh line 54: @@ -12,3 +12,3 @@ -In vmtest.sh line 26: -readonly QEMU_PIDFILE=$(mktemp /tmp/qemu_vsock_vmtest_XXXX.pid) - ^----------^ SC2155 (warning): Declare and assign separately to avoid masking return values. +In vmtest.sh line 78: +readonly LOG=$(mktemp /tmp/vsock_vmtest_XXXX.log) + ^-^ SC2155 (warning): Declare and assign separately to avoid masking return values. @@ -17 +17 @@ -In vmtest.sh line 46: +In vmtest.sh line 88: @@ -22 +22,29 @@ -In vmtest.sh line 178: +In vmtest.sh line 155: + terminate_pidfiles ${PIDFILES[@]} + ^------------^ SC2068 (error): Double quote array expansions to avoid re-splitting elements. + + +In vmtest.sh line 169: + ${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 177: + for pidfile in $@; do + ^-- SC2068 (error): Double quote array expansions to avoid re-splitting elements. + + +In vmtest.sh line 179: + pkill -SIGTERM -F ${pidfile} 2>&1 > /dev/null + ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. + ^--^ SC2069 (warning): To redirect stdout+stderr, 2>&1 must be last (or use '{ cmd > file; } 2>&1' to clarify). + +Did you mean: + pkill -SIGTERM -F "${pidfile}" 2>&1 > /dev/null + + +In vmtest.sh line 264: @@ -30 +58 @@ -In vmtest.sh line 184: +In vmtest.sh line 270: @@ -35 +63 @@ -In vmtest.sh line 188: +In vmtest.sh line 274: @@ -43 +71,11 @@ -In vmtest.sh line 210: +In vmtest.sh line 280: + local verify_boot=${3:-1} + ^---------^ SC2034 (warning): verify_boot appears unused. Verify use (or export if used externally). + + +In vmtest.sh line 305: + if [[ ! -z "${ns}" ]]; then + ^-- SC2236 (style): Use -n instead of ! -z. + + +In vmtest.sh line 316: @@ -51 +89,395 @@ -In vmtest.sh line 400: +In vmtest.sh line 328: +vm_wait_for_ssh() { +^-- SC2120 (warning): vm_wait_for_ssh references arguments, but none are ever passed. + + +In vmtest.sh line 333: + while [[ true ]]; do + ^--^ SC2160 (style): Instead of '[ true ]', just use 'true'. + + +In vmtest.sh line 337: + if [[ ! -z "${ns}" ]]; then + ^-- SC2236 (style): Use -n instead of ! -z. + + +In vmtest.sh line 342: + if [[ $? -eq 0 ]]; then + ^-- SC2181 (style): Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. + + +In vmtest.sh line 385: + wait_for_listener ${TEST_HOST_PORT_LISTENER} ${WAIT_PERIOD} ${WAIT_PERIOD_MAX} + ^------------------------^ SC2086 (info): Double quote to prevent globbing and word splitting. + ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting. + ^----------------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + wait_for_listener "${TEST_HOST_PORT_LISTENER}" "${WAIT_PERIOD}" "${WAIT_PERIOD_MAX}" + + +In vmtest.sh line 506: + return ${KSFT_FAIL} + ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + return "${KSFT_FAIL}" + + +In vmtest.sh line 511: + return ${KSFT_FAIL} + ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + return "${KSFT_FAIL}" + + +In vmtest.sh line 545: + local addr1 + ^---^ SC2034 (warning): addr1 appears unused. Verify use (or export if used externally). + + +In vmtest.sh line 568: + return ${KSFT_FAIL} + ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + return "${KSFT_FAIL}" + + +In vmtest.sh line 574: + return ${KSFT_FAIL} + ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + return "${KSFT_FAIL}" + + +In vmtest.sh line 579: + return ${KSFT_FAIL} + ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + return "${KSFT_FAIL}" + + +In vmtest.sh line 585: + return ${KSFT_FAIL} + ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + return "${KSFT_FAIL}" + + +In vmtest.sh line 591: + return ${KSFT_FAIL} + ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + return "${KSFT_FAIL}" + + +In vmtest.sh line 597: + return ${KSFT_FAIL} + ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + return "${KSFT_FAIL}" + + +In vmtest.sh line 602: + return ${KSFT_FAIL} + ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + return "${KSFT_FAIL}" + + +In vmtest.sh line 622: + pidfile1=$(mktemp $PIDFILE_TEMPLATE) + ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + pidfile1=$(mktemp "$PIDFILE_TEMPLATE") + + +In vmtest.sh line 624: + vm_start ${cid} ${ns1} ${pidfile1} + ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. + ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. + ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + vm_start "${cid}" "${ns1}" "${pidfile1}" + + +In vmtest.sh line 630: + pidfile2=$(mktemp $PIDFILE_TEMPLATE) + ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + pidfile2=$(mktemp "$PIDFILE_TEMPLATE") + + +In vmtest.sh line 632: + WAIT_TOTAL=30 vm_start ${cid} ${ns2} ${pidfile2} + ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. + ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. + ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + WAIT_TOTAL=30 vm_start "${cid}" "${ns2}" "${pidfile2}" + + +In vmtest.sh line 650: + terminate_pidfiles ${pidfile1} ${pidfile2} + ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. + ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + terminate_pidfiles "${pidfile1}" "${pidfile2}" + + +In vmtest.sh line 651: + return $rc + ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + return "$rc" + + +In vmtest.sh line 656: + return $KSFT_FAIL + ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + return "$KSFT_FAIL" + + +In vmtest.sh line 659: + return $KSFT_PASS + ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + return "$KSFT_PASS" + + +In vmtest.sh line 664: + return $KSFT_PASS + ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + return "$KSFT_PASS" + + +In vmtest.sh line 667: + return $KSFT_FAIL + ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + return "$KSFT_FAIL" + + +In vmtest.sh line 672: + return $KSFT_PASS + ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + return "$KSFT_PASS" + + +In vmtest.sh line 675: + return $KSFT_FAIL + ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + return "$KSFT_FAIL" + + +In vmtest.sh line 680: + return $KSFT_FAIL + ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + return "$KSFT_FAIL" + + +In vmtest.sh line 683: + return $KSFT_PASS + ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + return "$KSFT_PASS" + + +In vmtest.sh line 697: + if ! vm_start ${cid} "${host_ns}"; then + ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + if ! vm_start "${cid}" "${host_ns}"; then + + +In vmtest.sh line 699: + return $KSFT_FAIL + ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + return "$KSFT_FAIL" + + +In vmtest.sh line 708: + vm_wait_for_listener ${TEST_GUEST_PORT} "${host_ns}" + ^----------------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + vm_wait_for_listener "${TEST_GUEST_PORT}" "${host_ns}" + + +In vmtest.sh line 711: + ip netns exec "${host_ns}" socat TCP-LISTEN:${BRIDGE_PORT},fork \ + ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + ip netns exec "${host_ns}" socat TCP-LISTEN:"${BRIDGE_PORT}",fork \ + + +In vmtest.sh line 712: + TCP-CONNECT:localhost:${TEST_HOST_PORT} & + ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + TCP-CONNECT:localhost:"${TEST_HOST_PORT}" & + + +In vmtest.sh line 716: + socat TCP:10.0.0.1:${BRIDGE_PORT} TCP-LISTEN:${TEST_HOST_PORT},fork & + ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting. + ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + socat TCP:10.0.0.1:"${BRIDGE_PORT}" TCP-LISTEN:"${TEST_HOST_PORT}",fork & + + +In vmtest.sh line 720: + ip netns exec "${host_ns2}" ${VSOCK_TEST} \ + ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + ip netns exec "${host_ns2}" "${VSOCK_TEST}" \ + + +In vmtest.sh line 728: + return $KSFT_FAIL + ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + return "$KSFT_FAIL" + + +In vmtest.sh line 733: + return $KSFT_PASS + ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + return "$KSFT_PASS" + + +In vmtest.sh line 748: + if ! vm_start ${cid} "${host_ns}"; then + ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + if ! vm_start "${cid}" "${host_ns}"; then + + +In vmtest.sh line 750: + return $KSFT_FAIL + ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + return "$KSFT_FAIL" + + +In vmtest.sh line 753: + ip netns exec "${host_ns2}" ${VSOCK_TEST} \ + ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + ip netns exec "${host_ns2}" "${VSOCK_TEST}" \ + + +In vmtest.sh line 761: + socat TCP-LISTEN:${BRIDGE_PORT},bind=10.0.0.2,fork \ + ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + socat TCP-LISTEN:"${BRIDGE_PORT}",bind=10.0.0.2,fork \ + + +In vmtest.sh line 762: + TCP:localhost:${port} & + ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + TCP:localhost:"${port}" & + + +In vmtest.sh line 766: + ip netns exec "${host_ns}" socat TCP-LISTEN:${port},fork \ + ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + ip netns exec "${host_ns}" socat TCP-LISTEN:"${port}",fork \ + + +In vmtest.sh line 767: + TCP-CONNECT:10.0.0.2:${BRIDGE_PORT} & + ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + TCP-CONNECT:10.0.0.2:"${BRIDGE_PORT}" & + + +In vmtest.sh line 779: + if [[ ! $? -eq 0 ]]; then + ^-- SC2181 (style): Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. + + +In vmtest.sh line 780: + return $KSFT_FAIL + ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + return "$KSFT_FAIL" + + +In vmtest.sh line 785: + return $KSFT_PASS + ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + return "$KSFT_PASS" + + +In vmtest.sh line 793: + do_ns_vm_client_host_server_test ${testname} ${host_ns} ${host_ns2} + ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. + ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. + ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + do_ns_vm_client_host_server_test "${testname}" "${host_ns}" "${host_ns2}" + + +In vmtest.sh line 801: + do_ns_vm_client_host_server_test ${testname} ${host_ns} ${host_ns2} + ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. + ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. + ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + do_ns_vm_client_host_server_test "${testname}" "${host_ns}" "${host_ns2}" + + +In vmtest.sh line 825: @@ -56 +488 @@ -In vmtest.sh line 412: +In vmtest.sh line 837: @@ -59,0 +492,25 @@ + +In vmtest.sh line 857: + for testname in ${NEEDS_SETUP[@]}; do + ^---------------^ SC2068 (error): Double quote array expansions to avoid re-splitting elements. + + +In vmtest.sh line 917: +setup_done=0 +^--------^ SC2034 (warning): setup_done appears unused. Verify use (or export if used externally). + + +In vmtest.sh line 920: +for arg in ${ARGS[@]}; do + ^--------^ SC2068 (error): Double quote array expansions to avoid re-splitting elements. + + +In vmtest.sh line 926: + vm_wait_for_ssh + ^-------------^ SC2119 (info): Use vm_wait_for_ssh "$@" if function's $1 should mean script's $1. + + +In vmtest.sh line 934: +if [[ ! -z "${pidfile}" ]]; then + ^-- SC2236 (style): Use -n instead of ! -z. + @@ -60,0 +518,2 @@ + https://www.shellcheck.net/wiki/SC2068 -- Double quote array expansions to ... + https://www.shellcheck.net/wiki/SC2034 -- addr1 appears unused. Verify use ... @@ -62,2 +520,0 @@ - https://www.shellcheck.net/wiki/SC2155 -- Declare and assign separately to ... - https://www.shellcheck.net/wiki/SC2164 -- Use 'popd ... || exit' or 'popd ....