====== Checking before the patch ====== ====== Checking the tree with the patch ====== tools/testing/selftests/drivers/net/netdevsim/ethtool-phy.sh is a new file, but not shellcheck compliant New errors added --- /tmp/tmp.4Te1r9SNGR 2025-07-02 05:35:04.792387640 -0700 +++ /tmp/tmp.vQz3iSfX0b 2025-07-02 05:35:04.992386304 -0700 @@ -11,0 +12,103 @@ + +In ethtool-phy.sh line 4: +source ethtool-common.sh + ^---------------^ SC1094 (warning): Parsing of sourced file failed. Ignoring it. + + +In ethtool-phy.sh line 7: +if ! ethtool -h | grep show-phys 2>&1 >/dev/null; then + ^--^ SC2069 (warning): To redirect stdout+stderr, 2>&1 must be last (or use '{ cmd > file; } 2>&1' to clarify). + + +In ethtool-phy.sh line 15: + echo $new_nsim_id > /sys/bus/netdevsim/new_device + ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + echo "$new_nsim_id" > /sys/bus/netdevsim/new_device + + +In ethtool-phy.sh line 18: + ls /sys/bus/netdevsim/devices/netdevsim${new_nsim_id}/net/ + ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + ls /sys/bus/netdevsim/devices/netdevsim"${new_nsim_id}"/net/ + + +In ethtool-phy.sh line 23: + echo $to_del_nsim_id > /sys/bus/netdevsim/del_device + ^-------------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + echo "$to_del_nsim_id" > /sys/bus/netdevsim/del_device + + +In ethtool-phy.sh line 33: +PHY_DFS=$(make_phydev_on_netdev $NSIM_ID 0) +^-----^ SC2034 (warning): PHY_DFS appears unused. Verify use (or export if used externally). + ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. + ^------^ SC2153 (info): Possible misspelling: NSIM_ID may not be assigned. Did you mean NSIM_ID2? + +Did you mean: +PHY_DFS=$(make_phydev_on_netdev "$NSIM_ID" 0) + + +In ethtool-phy.sh line 36: +index=$(ethtool --show-phys $NSIM_NETDEV | grep "PHY index" | cut -d ' ' -f 3) + ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: +index=$(ethtool --show-phys "$NSIM_NETDEV" | grep "PHY index" | cut -d ' ' -f 3) + + +In ethtool-phy.sh line 40: +PHY2_DFS=$(make_phydev_on_netdev $NSIM_ID 0) +^------^ SC2034 (warning): PHY2_DFS appears unused. Verify use (or export if used externally). + ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: +PHY2_DFS=$(make_phydev_on_netdev "$NSIM_ID" 0) + + +In ethtool-phy.sh line 44: +NSIM_NETDEV_2=$(make_netdev_from_id "$NSIM_ID2") +^-----------^ SC2034 (warning): NSIM_NETDEV_2 appears unused. Verify use (or export if used externally). + + +In ethtool-phy.sh line 46: +PHY3_DFS=$(make_phydev_on_netdev $NSIM_ID2 0); +^------^ SC2034 (warning): PHY3_DFS appears unused. Verify use (or export if used externally). + + +In ethtool-phy.sh line 49: +n_phy=$(ethtool --show-phys '*' | grep "PHY index" | wc -l) + ^--------------^ SC2126 (style): Consider using 'grep -c' instead of 'grep|wc -l'. + + +In ethtool-phy.sh line 53: +n_phy=$(ethtool --show-phys $NSIM_NETDEV | grep "PHY index" | wc -l) + ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. + ^--------------^ SC2126 (style): Consider using 'grep -c' instead of 'grep|wc -l'. + +Did you mean: +n_phy=$(ethtool --show-phys "$NSIM_NETDEV" | grep "PHY index" | wc -l) + + +In ethtool-phy.sh line 58: +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-phy.sh line 59: + 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/SC2034 -- NSIM_NETDEV_2 appears unused. Ver... + https://www.shellcheck.net/wiki/SC2069 -- To redirect stdout+stderr, 2>&1 m...