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.G2LDHh6RDl and /tmp/tmp.XMMNnv1hG8 Tree base: 1dbf1d590d10 ("net: Add locking to protect skb->dev access in ip_output") Now at: 82faef5cbb30 ("selftests: netdevsim: Xfail nexthop test on slow machines") ====== Checking before the patch ====== Checking tools/testing/selftests/drivers/net/netdevsim/nexthop.sh - dce9569fceca122208eec63068a853c93fa2d0548b902959acff0c1eb57a723a In nexthop.sh line 7: lib_dir=$(dirname $0)/../../../net/forwarding ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: lib_dir=$(dirname "$0")/../../../net/forwarding In nexthop.sh line 9: ALL_TESTS=" ^-------^ SC2034 (warning): ALL_TESTS appears unused. Verify use (or export if used externally). In nexthop.sh line 49: NUM_NETIFS=0 ^--------^ SC2034 (warning): NUM_NETIFS appears unused. Verify use (or export if used externally). In nexthop.sh line 50: source $lib_dir/lib.sh ^-------------^ SC1091 (info): Not following: ./lib.sh: openBinaryFile: does not exist (No such file or directory) ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: source "$lib_dir"/lib.sh In nexthop.sh line 53: source $lib_dir/devlink_lib.sh ^---------------------^ SC1091 (info): Not following: ./devlink_lib.sh: openBinaryFile: does not exist (No such file or directory) ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: source "$lib_dir"/devlink_lib.sh In nexthop.sh line 61: out=$($IP nexthop show ${nharg} | sed -e 's/ *$//') ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: out=$($IP nexthop show "${nharg}" | sed -e 's/ *$//') In nexthop.sh line 75: local ret ^-^ SC2034 (warning): ret appears unused. Verify use (or export if used externally). In nexthop.sh line 81: count=$($IP nexthop bucket show id $group_id nhid $nhid | ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: count=$($IP nexthop bucket show id "$group_id" nhid "$nhid" | In nexthop.sh line 82: grep "trap" | wc -l) ^---------^ SC2126 (style): Consider using 'grep -c' instead of 'grep|wc -l'. In nexthop.sh line 95: occ=$($DEVLINK -jp resource show $DEVLINK_DEV \ ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: occ=$($DEVLINK -jp resource show "$DEVLINK_DEV" \ In nexthop.sh line 98: if [ $expected_occ -ne $occ ]; then ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if [ "$expected_occ" -ne "$occ" ]; then In nexthop.sh line 109: $DEVLINK resource set $DEVLINK_DEV path nexthops size $size ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $DEVLINK resource set "$DEVLINK_DEV" path nexthops size "$size" In nexthop.sh line 110: $DEVLINK dev reload $DEVLINK_DEV ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $DEVLINK dev reload "$DEVLINK_DEV" In nexthop.sh line 356: echo 1 > $DEBUGFS_NET_DIR/fib/fail_res_nexthop_group_replace ^--------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: echo 1 > "$DEBUGFS_NET_DIR"/fib/fail_res_nexthop_group_replace In nexthop.sh line 375: echo 0 > $DEBUGFS_NET_DIR/fib/fail_res_nexthop_group_replace ^--------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: echo 0 > "$DEBUGFS_NET_DIR"/fib/fail_res_nexthop_group_replace In nexthop.sh line 385: for index in $($IP -j nexthop bucket show id $group_id nhid $nhid | ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for index in $($IP -j nexthop bucket show id "$group_id" nhid "$nhid" | In nexthop.sh line 386: jq '.[].bucket.index' | head -n ${count:--0}) ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: jq '.[].bucket.index' | head -n "${count:--0}") In nexthop.sh line 388: echo $group_id $index \ ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: echo "$group_id" "$index" \ In nexthop.sh line 389: > $DEBUGFS_NET_DIR/fib/nexthop_bucket_activity ^--------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: > "$DEBUGFS_NET_DIR"/fib/nexthop_bucket_activity In nexthop.sh line 398: $IP -j nexthop bucket show id $group_id nhid $nhid | jq length ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $IP -j nexthop bucket show id "$group_id" nhid "$nhid" | jq length In nexthop.sh line 469: $IP nexthop add id 10 group 1/2 type resilient buckets 8 $timer 4 ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $IP nexthop add id 10 group 1/2 type resilient buckets 8 "$timer" 4 In nexthop.sh line 477: $IP nexthop replace id 10 group 1/2,3 type resilient $timer 8 ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $IP nexthop replace id 10 group 1/2,3 type resilient "$timer" 8 In nexthop.sh line 504: $IP nexthop add id 10 group 1/2 type resilient buckets 8 $timer 8 ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $IP nexthop add id 10 group 1/2 type resilient buckets 8 "$timer" 8 In nexthop.sh line 512: $IP nexthop replace id 10 group 1/2,3 type resilient $timer 4 ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $IP nexthop replace id 10 group 1/2,3 type resilient "$timer" 4 In nexthop.sh line 535: type resilient buckets 8 $timer 4 ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: type resilient buckets 8 "$timer" 4 In nexthop.sh line 543: $IP nexthop replace id 10 group 1/2,3 type resilient $timer 8 ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $IP nexthop replace id 10 group 1/2,3 type resilient "$timer" 8 In nexthop.sh line 850: echo 1 > $DEBUGFS_NET_DIR/fib/fail_nexthop_bucket_replace ^--------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: echo 1 > "$DEBUGFS_NET_DIR"/fib/fail_nexthop_bucket_replace In nexthop.sh line 870: echo 0 > $DEBUGFS_NET_DIR/fib/fail_nexthop_bucket_replace ^--------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: echo 0 > "$DEBUGFS_NET_DIR"/fib/fail_nexthop_bucket_replace In nexthop.sh line 953: echo 1 > $DEBUGFS_NET_DIR/fib/fail_nexthop_bucket_replace ^--------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: echo 1 > "$DEBUGFS_NET_DIR"/fib/fail_nexthop_bucket_replace In nexthop.sh line 968: echo 0 > $DEBUGFS_NET_DIR/fib/fail_nexthop_bucket_replace ^--------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: echo 0 > "$DEBUGFS_NET_DIR"/fib/fail_nexthop_bucket_replace In nexthop.sh line 979: $DEVLINK dev reload $DEVLINK_DEV ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $DEVLINK dev reload "$DEVLINK_DEV" In nexthop.sh line 1001: RET=0 ^-^ SC2034 (warning): RET appears unused. Verify use (or export if used externally). In nexthop.sh line 1008: $DEVLINK resource set $DEVLINK_DEV path nexthops size 3 ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $DEVLINK resource set "$DEVLINK_DEV" path nexthops size 3 In nexthop.sh line 1009: $DEVLINK dev reload $DEVLINK_DEV &> /dev/null ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $DEVLINK dev reload "$DEVLINK_DEV" &> /dev/null In nexthop.sh line 1012: $DEVLINK resource set $DEVLINK_DEV path nexthops size 9999 ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $DEVLINK resource set "$DEVLINK_DEV" path nexthops size 9999 In nexthop.sh line 1013: $DEVLINK dev reload $DEVLINK_DEV ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $DEVLINK dev reload "$DEVLINK_DEV" In nexthop.sh line 1023: local netdev ^----^ SC2034 (warning): netdev appears unused. Verify use (or export if used externally). In nexthop.sh line 1048: echo "$DEV_ADDR" > ${NETDEVSIM_PATH}/del_device ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: echo "$DEV_ADDR" > "${NETDEVSIM_PATH}"/del_device In nexthop.sh line 1058: exit $EXIT_STATUS ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: exit "$EXIT_STATUS" For more information: https://www.shellcheck.net/wiki/SC2034 -- ALL_TESTS appears unused. Verify ... https://www.shellcheck.net/wiki/SC1091 -- Not following: ./devlink_lib.sh: ... https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ... ====== Checking the tree with the patch ====== Checking tools/testing/selftests/drivers/net/netdevsim/nexthop.sh - dce9569fceca122208eec63068a853c93fa2d0548b902959acff0c1eb57a723a In nexthop.sh line 7: lib_dir=$(dirname $0)/../../../net/forwarding ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: lib_dir=$(dirname "$0")/../../../net/forwarding In nexthop.sh line 9: ALL_TESTS=" ^-------^ SC2034 (warning): ALL_TESTS appears unused. Verify use (or export if used externally). In nexthop.sh line 49: NUM_NETIFS=0 ^--------^ SC2034 (warning): NUM_NETIFS appears unused. Verify use (or export if used externally). In nexthop.sh line 50: source $lib_dir/lib.sh ^-------------^ SC1091 (info): Not following: ./lib.sh: openBinaryFile: does not exist (No such file or directory) ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: source "$lib_dir"/lib.sh In nexthop.sh line 53: source $lib_dir/devlink_lib.sh ^---------------------^ SC1091 (info): Not following: ./devlink_lib.sh: openBinaryFile: does not exist (No such file or directory) ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: source "$lib_dir"/devlink_lib.sh In nexthop.sh line 61: out=$($IP nexthop show ${nharg} | sed -e 's/ *$//') ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: out=$($IP nexthop show "${nharg}" | sed -e 's/ *$//') In nexthop.sh line 75: local ret ^-^ SC2034 (warning): ret appears unused. Verify use (or export if used externally). In nexthop.sh line 81: count=$($IP nexthop bucket show id $group_id nhid $nhid | ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: count=$($IP nexthop bucket show id "$group_id" nhid "$nhid" | In nexthop.sh line 82: grep "trap" | wc -l) ^---------^ SC2126 (style): Consider using 'grep -c' instead of 'grep|wc -l'. In nexthop.sh line 95: occ=$($DEVLINK -jp resource show $DEVLINK_DEV \ ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: occ=$($DEVLINK -jp resource show "$DEVLINK_DEV" \ In nexthop.sh line 98: if [ $expected_occ -ne $occ ]; then ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if [ "$expected_occ" -ne "$occ" ]; then In nexthop.sh line 109: $DEVLINK resource set $DEVLINK_DEV path nexthops size $size ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $DEVLINK resource set "$DEVLINK_DEV" path nexthops size "$size" In nexthop.sh line 110: $DEVLINK dev reload $DEVLINK_DEV ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $DEVLINK dev reload "$DEVLINK_DEV" In nexthop.sh line 356: echo 1 > $DEBUGFS_NET_DIR/fib/fail_res_nexthop_group_replace ^--------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: echo 1 > "$DEBUGFS_NET_DIR"/fib/fail_res_nexthop_group_replace In nexthop.sh line 375: echo 0 > $DEBUGFS_NET_DIR/fib/fail_res_nexthop_group_replace ^--------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: echo 0 > "$DEBUGFS_NET_DIR"/fib/fail_res_nexthop_group_replace In nexthop.sh line 385: for index in $($IP -j nexthop bucket show id $group_id nhid $nhid | ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for index in $($IP -j nexthop bucket show id "$group_id" nhid "$nhid" | In nexthop.sh line 386: jq '.[].bucket.index' | head -n ${count:--0}) ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: jq '.[].bucket.index' | head -n "${count:--0}") In nexthop.sh line 388: echo $group_id $index \ ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: echo "$group_id" "$index" \ In nexthop.sh line 389: > $DEBUGFS_NET_DIR/fib/nexthop_bucket_activity ^--------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: > "$DEBUGFS_NET_DIR"/fib/nexthop_bucket_activity In nexthop.sh line 398: $IP -j nexthop bucket show id $group_id nhid $nhid | jq length ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $IP -j nexthop bucket show id "$group_id" nhid "$nhid" | jq length In nexthop.sh line 469: $IP nexthop add id 10 group 1/2 type resilient buckets 8 $timer 4 ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $IP nexthop add id 10 group 1/2 type resilient buckets 8 "$timer" 4 In nexthop.sh line 477: $IP nexthop replace id 10 group 1/2,3 type resilient $timer 8 ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $IP nexthop replace id 10 group 1/2,3 type resilient "$timer" 8 In nexthop.sh line 504: $IP nexthop add id 10 group 1/2 type resilient buckets 8 $timer 8 ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $IP nexthop add id 10 group 1/2 type resilient buckets 8 "$timer" 8 In nexthop.sh line 512: $IP nexthop replace id 10 group 1/2,3 type resilient $timer 4 ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $IP nexthop replace id 10 group 1/2,3 type resilient "$timer" 4 In nexthop.sh line 535: type resilient buckets 8 $timer 4 ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: type resilient buckets 8 "$timer" 4 In nexthop.sh line 543: $IP nexthop replace id 10 group 1/2,3 type resilient $timer 8 ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $IP nexthop replace id 10 group 1/2,3 type resilient "$timer" 8 In nexthop.sh line 850: echo 1 > $DEBUGFS_NET_DIR/fib/fail_nexthop_bucket_replace ^--------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: echo 1 > "$DEBUGFS_NET_DIR"/fib/fail_nexthop_bucket_replace In nexthop.sh line 870: echo 0 > $DEBUGFS_NET_DIR/fib/fail_nexthop_bucket_replace ^--------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: echo 0 > "$DEBUGFS_NET_DIR"/fib/fail_nexthop_bucket_replace In nexthop.sh line 953: echo 1 > $DEBUGFS_NET_DIR/fib/fail_nexthop_bucket_replace ^--------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: echo 1 > "$DEBUGFS_NET_DIR"/fib/fail_nexthop_bucket_replace In nexthop.sh line 968: echo 0 > $DEBUGFS_NET_DIR/fib/fail_nexthop_bucket_replace ^--------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: echo 0 > "$DEBUGFS_NET_DIR"/fib/fail_nexthop_bucket_replace In nexthop.sh line 979: $DEVLINK dev reload $DEVLINK_DEV ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $DEVLINK dev reload "$DEVLINK_DEV" In nexthop.sh line 1001: RET=0 ^-^ SC2034 (warning): RET appears unused. Verify use (or export if used externally). In nexthop.sh line 1008: $DEVLINK resource set $DEVLINK_DEV path nexthops size 3 ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $DEVLINK resource set "$DEVLINK_DEV" path nexthops size 3 In nexthop.sh line 1009: $DEVLINK dev reload $DEVLINK_DEV &> /dev/null ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $DEVLINK dev reload "$DEVLINK_DEV" &> /dev/null In nexthop.sh line 1012: $DEVLINK resource set $DEVLINK_DEV path nexthops size 9999 ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $DEVLINK resource set "$DEVLINK_DEV" path nexthops size 9999 In nexthop.sh line 1013: $DEVLINK dev reload $DEVLINK_DEV ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $DEVLINK dev reload "$DEVLINK_DEV" In nexthop.sh line 1023: local netdev ^----^ SC2034 (warning): netdev appears unused. Verify use (or export if used externally). In nexthop.sh line 1048: echo "$DEV_ADDR" > ${NETDEVSIM_PATH}/del_device ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: echo "$DEV_ADDR" > "${NETDEVSIM_PATH}"/del_device In nexthop.sh line 1058: exit $EXIT_STATUS ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: exit "$EXIT_STATUS" For more information: https://www.shellcheck.net/wiki/SC2034 -- ALL_TESTS appears unused. Verify ... https://www.shellcheck.net/wiki/SC1091 -- Not following: ./devlink_lib.sh: ... https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...