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.My3zMFBYU1 and /tmp/tmp.DTedgWKUAe Tree base: 2d3dae055542 ("netdevsim: Add mock stats for ethtool") Now at: cacc0a5c7b00 ("selftests: netdevsim: Add test for ethtool stats") ====== Checking before the patch ====== Checking tools/testing/selftests/drivers/net/netdevsim/ethtool-common.sh - 96396ff6ab6bdd3c996088938f8cfa96ad87ac1a24714cc19d3162809b71da2e In ethtool-common.sh line 31: if [ $code $cop 0 ]; then ^-- SC1009 (info): The mentioned syntax error was in this if expression. ^-- SC1073 (error): Couldn't parse this test expression. Fix to allow more checks. ^-- SC1072 (error): Expected test to end here (don't wrap commands in []/[[]]). Fix any mentioned problems and try again. For more information: https://www.shellcheck.net/wiki/SC1072 -- Expected test to end here (don't ... https://www.shellcheck.net/wiki/SC1073 -- Couldn't parse this test expressi... https://www.shellcheck.net/wiki/SC1009 -- The mentioned syntax error was in... ====== Checking the tree with the patch ====== Checking tools/testing/selftests/drivers/net/netdevsim/ethtool-common.sh - 96396ff6ab6bdd3c996088938f8cfa96ad87ac1a24714cc19d3162809b71da2e In ethtool-common.sh line 31: if [ $code $cop 0 ]; then ^-- SC1009 (info): The mentioned syntax error was in this if expression. ^-- SC1073 (error): Couldn't parse this test expression. Fix to allow more checks. ^-- SC1072 (error): Expected test to end here (don't wrap commands in []/[[]]). Fix any mentioned problems and try again. For more information: https://www.shellcheck.net/wiki/SC1072 -- Expected test to end here (don't ... https://www.shellcheck.net/wiki/SC1073 -- Couldn't parse this test expressi... https://www.shellcheck.net/wiki/SC1009 -- The mentioned syntax error was in... Checking tools/testing/selftests/drivers/net/netdevsim/ethtool-stats.sh - 2da17ef796d040fcdc5717f73f0bde149b4fa1fb349c54af97537bac5dd1a866 In ethtool-stats.sh line 4: source ethtool-common.sh ^---------------^ SC1094 (warning): Parsing of sourced file failed. Ignoring it. In ethtool-stats.sh line 11: echo y > $MOCK_STATS_DFS ^-------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: echo y > "$MOCK_STATS_DFS" In ethtool-stats.sh line 13: stat=$(ethtool -S $NSIM_NETDEV | grep "hw_out_of_buffer" | awk '{print $2}') ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: stat=$(ethtool -S "$NSIM_NETDEV" | grep "hw_out_of_buffer" | awk '{print $2}') In ethtool-stats.sh line 19: stat=$(ethtool -S $NSIM_NETDEV | grep "hw_out_of_buffer" | awk '{print $2}') ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: stat=$(ethtool -S "$NSIM_NETDEV" | grep "hw_out_of_buffer" | awk '{print $2}') In ethtool-stats.sh line 23: echo n > $MOCK_STATS_DFS ^-------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: echo n > "$MOCK_STATS_DFS" In ethtool-stats.sh line 24: echo y > $MOCK_STATS_DFS ^-------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: echo y > "$MOCK_STATS_DFS" In ethtool-stats.sh line 26: stat=$(ethtool -S $NSIM_NETDEV | grep "hw_out_of_buffer" | awk '{print $2}') ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: stat=$(ethtool -S "$NSIM_NETDEV" | grep "hw_out_of_buffer" | awk '{print $2}') In ethtool-stats.sh line 30: if [ $num_errors -eq 0 ]; then ^---------^ SC2154 (warning): num_errors is referenced but not assigned. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if [ "$num_errors" -eq 0 ]; then In ethtool-stats.sh line 31: echo "PASSED all $((num_passes)) checks" ^--------^ SC2154 (warning): num_passes is referenced but not assigned. For more information: https://www.shellcheck.net/wiki/SC1094 -- Parsing of sourced file failed. I... https://www.shellcheck.net/wiki/SC2154 -- num_errors is referenced but not ... https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...