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.1DS4APnBju and /tmp/tmp.dBGiyu4MFU Tree base: cd7312a78f36 ("selftests/bpf: include limits.h needed for PATH_MAX directly") Now at: 4e004f2bd1d8 ("selftests/bpf: Support ppc64el in vmtest") ====== Checking before the patch ====== Checking tools/testing/selftests/bpf/vmtest.sh - 5fa4c1970f428f903fc8935a88e5a9a83c1ab57308515305f214e7f20926ff8f In vmtest.sh line 32: HOST_FLAGS=(-M virt,gic-version=3 -cpu host -enable-kvm -smp 8) ^-- SC2054 (warning): Use spaces, not commas, to separate array elements. In vmtest.sh line 33: CROSS_FLAGS=(-M virt,gic-version=3 -cpu cortex-a76 -smp 8) ^-- SC2054 (warning): Use spaces, not commas, to separate array elements. In vmtest.sh line 42: CROSS_FLAGS=(-M virt -cpu rv64,sscofpmf=true -smp 8) ^-- SC2054 (warning): Use spaces, not commas, to separate array elements. In vmtest.sh line 128: download_rootfs() ^-- SC2120 (warning): download_rootfs references arguments, but none are ever passed. In vmtest.sh line 132: local rootfsversion="$(newest_rootfs_version)" ^-----------^ SC2155 (warning): Declare and assign separately to avoid masking return values. In vmtest.sh line 154: cat "${LOCAL_ROOTFS_IMAGE}" | zstd -d | sudo tar -C "$dir" -x ^---------------------^ SC2002 (style): Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead. In vmtest.sh line 156: download_rootfs | zstd -d | sudo tar -C "$dir" -x ^-------------^ SC2119 (info): Use download_rootfs "$@" if function's $1 should mean script's $1. In vmtest.sh line 298: sudo cp ${log_file} "${OUTPUT_DIR}" ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: sudo cp "${log_file}" "${OUTPUT_DIR}" In vmtest.sh line 299: sudo cp ${exit_status_file} "${OUTPUT_DIR}" ^-----------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: sudo cp "${exit_status_file}" "${OUTPUT_DIR}" In vmtest.sh line 300: sudo rm -f ${log_file} ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: sudo rm -f "${log_file}" In vmtest.sh line 330: local local_modified="$(stat -c %Y "${kconfig_file}")" ^------------^ SC2155 (warning): Declare and assign separately to avoid masking return values. In vmtest.sh line 334: local src_modified="$(stat -c %Y "${kconfig_src}")" ^----------^ SC2155 (warning): Declare and assign separately to avoid masking return values. In vmtest.sh line 359: exit_code="$(cat ${exit_status_file})" ^-----------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: exit_code="$(cat "${exit_status_file}")" In vmtest.sh line 361: exit ${exit_code} ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: exit "${exit_code}" In vmtest.sh line 366: local 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 367: local kernel_checkout=$(realpath "${script_dir}"/../../../../) ^-------------^ SC2155 (warning): Declare and assign separately to avoid masking return values. In vmtest.sh line 377: case ${opt} in ^-- SC2213 (warning): getopts specified -k, but it's not handled by this 'case'. In vmtest.sh line 423: command="$@" ^--^ SC2124 (warning): Assigning an array to a string! Assign as array, or use * instead of @ to concatenate. For more information: https://www.shellcheck.net/wiki/SC2054 -- Use spaces, not commas, to separa... https://www.shellcheck.net/wiki/SC2120 -- download_rootfs references argume... https://www.shellcheck.net/wiki/SC2124 -- Assigning an array to a string! A... ====== Checking the tree with the patch ====== Checking tools/testing/selftests/bpf/vmtest.sh - 5fa4c1970f428f903fc8935a88e5a9a83c1ab57308515305f214e7f20926ff8f In vmtest.sh line 32: HOST_FLAGS=(-M virt,gic-version=3 -cpu host -enable-kvm -smp 8) ^-- SC2054 (warning): Use spaces, not commas, to separate array elements. In vmtest.sh line 33: CROSS_FLAGS=(-M virt,gic-version=3 -cpu cortex-a76 -smp 8) ^-- SC2054 (warning): Use spaces, not commas, to separate array elements. In vmtest.sh line 42: CROSS_FLAGS=(-M virt -cpu rv64,sscofpmf=true -smp 8) ^-- SC2054 (warning): Use spaces, not commas, to separate array elements. In vmtest.sh line 137: download_rootfs() ^-- SC2120 (warning): download_rootfs references arguments, but none are ever passed. In vmtest.sh line 141: local rootfsversion="$(newest_rootfs_version)" ^-----------^ SC2155 (warning): Declare and assign separately to avoid masking return values. In vmtest.sh line 163: cat "${LOCAL_ROOTFS_IMAGE}" | zstd -d | sudo tar -C "$dir" -x ^---------------------^ SC2002 (style): Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead. In vmtest.sh line 165: download_rootfs | zstd -d | sudo tar -C "$dir" -x ^-------------^ SC2119 (info): Use download_rootfs "$@" if function's $1 should mean script's $1. In vmtest.sh line 307: sudo cp ${log_file} "${OUTPUT_DIR}" ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: sudo cp "${log_file}" "${OUTPUT_DIR}" In vmtest.sh line 308: sudo cp ${exit_status_file} "${OUTPUT_DIR}" ^-----------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: sudo cp "${exit_status_file}" "${OUTPUT_DIR}" In vmtest.sh line 309: sudo rm -f ${log_file} ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: sudo rm -f "${log_file}" In vmtest.sh line 339: local local_modified="$(stat -c %Y "${kconfig_file}")" ^------------^ SC2155 (warning): Declare and assign separately to avoid masking return values. In vmtest.sh line 343: local src_modified="$(stat -c %Y "${kconfig_src}")" ^----------^ SC2155 (warning): Declare and assign separately to avoid masking return values. In vmtest.sh line 368: exit_code="$(cat ${exit_status_file})" ^-----------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: exit_code="$(cat "${exit_status_file}")" In vmtest.sh line 370: exit ${exit_code} ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: exit "${exit_code}" In vmtest.sh line 375: local 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 376: local kernel_checkout=$(realpath "${script_dir}"/../../../../) ^-------------^ SC2155 (warning): Declare and assign separately to avoid masking return values. In vmtest.sh line 386: case ${opt} in ^-- SC2213 (warning): getopts specified -k, but it's not handled by this 'case'. In vmtest.sh line 432: command="$@" ^--^ SC2124 (warning): Assigning an array to a string! Assign as array, or use * instead of @ to concatenate. For more information: https://www.shellcheck.net/wiki/SC2054 -- Use spaces, not commas, to separa... https://www.shellcheck.net/wiki/SC2120 -- download_rootfs references argume... https://www.shellcheck.net/wiki/SC2124 -- Assigning an array to a string! A...