ShellCheck - shell script analysis tool version: 0.10.0 license: GNU General Public License, version 3 website: https://www.shellcheck.net Redirect to /tmp/tmp.yT5a1i16iA and /tmp/tmp.uXKIA7qftw Tree base: 2c7e4a2663a1 ("Merge tag 'net-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net") Now at: 0179e33f1de9 ("selftests/vsock: add initial vmtest.sh for vsock") ====== Checking before the patch ====== ====== Checking the tree with the patch ====== Checking tools/testing/selftests/vsock/vmtest.sh - 3bbe24ed85577bc751e7e913126d8b44bb8554cc21519ace46c3118b1749f848 In vmtest.sh line 11: readonly SCRIPT_DIR="$(cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)" ^--------^ SC2155 (warning): Declare and assign separately to avoid masking return values. In vmtest.sh line 12: readonly KERNEL_CHECKOUT=$(realpath "${SCRIPT_DIR}"/../../../../) ^-------------^ SC2155 (warning): Declare and assign separately to avoid masking return values. 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 46: readonly LOG=$(mktemp /tmp/vsock_vmtest_XXXX.log) ^-^ SC2155 (warning): Declare and assign separately to avoid masking return values. In vmtest.sh line 93: if [[ -s "${QEMU_PIDFILE}" ]]; then ^-- SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly). ^------------------------^ SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly). In vmtest.sh line 94: pkill -SIGTERM -F "${QEMU_PIDFILE}" > /dev/null 2>&1 ^-- SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly). In vmtest.sh line 99: if [[ -e "${QEMU_PIDFILE}" ]]; then ^-- SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly). ^------------------------^ SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly). In vmtest.sh line 100: rm "${QEMU_PIDFILE}" ^------------------^ SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly). In vmtest.sh line 178: pushd "${KERNEL_CHECKOUT}" &>/dev/null ^-- SC2164 (warning): Use 'pushd ... || exit' or 'pushd ... || return' in case pushd fails. Did you mean: pushd "${KERNEL_CHECKOUT}" &>/dev/null || exit In vmtest.sh line 184: if ! make -j$(nproc); then ^------^ SC2046 (warning): Quote this to prevent word splitting. In vmtest.sh line 188: popd &>/dev/null ^--------------^ SC2164 (warning): Use 'popd ... || exit' or 'popd ... || return' in case popd fails. Did you mean: popd &>/dev/null || exit In vmtest.sh line 210: ${kernel_opt} \ ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "${kernel_opt}" \ In vmtest.sh line 243: local port=$1 ^-----------^ SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly). In vmtest.sh line 244: local interval=$2 ^---------------^ SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly). In vmtest.sh line 245: local max_intervals=$3 ^--------------------^ SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly). In vmtest.sh line 246: local protocol=tcp ^----------------^ SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly). In vmtest.sh line 247: local pattern ^-----------^ SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly). In vmtest.sh line 248: local i ^-----^ SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly). In vmtest.sh line 250: pattern=":$(printf "%04X" "${port}") " ^-- SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly). ^---------------------^ SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly). In vmtest.sh line 253: [ "${protocol}" = "tcp" ] && pattern="${pattern}0A" ^------------------------^ SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly). ^--------------------^ SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly). In vmtest.sh line 254: for i in $(seq "${max_intervals}"); do ^-- SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly). ^--------------------^ SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly). In vmtest.sh line 255: if awk '{print $2" "$4}' /proc/net/"${protocol}"* | \ ^-- SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly). ^-- SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly). In vmtest.sh line 257: break ^---^ SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly). In vmtest.sh line 259: sleep "${interval}" ^-----------------^ SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly). In vmtest.sh line 264: local port=$1 ^-----------^ SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly). In vmtest.sh line 266: vm_ssh <