]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
selftests: net: Use XFAIL for operations not supported by the driver
authorAbhinav Jain <jain.abhinav177@gmail.com>
Wed, 21 Aug 2024 17:19:03 +0000 (22:49 +0530)
committerJakub Kicinski <kuba@kernel.org>
Thu, 22 Aug 2024 23:56:06 +0000 (16:56 -0700)
Check if veth pair was created and if yes, xfail on setting IP address
logging an informational message.
Use XFAIL instead of SKIP for unsupported ethtool APIs.

Signed-off-by: Abhinav Jain <jain.abhinav177@gmail.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20240821171903.118324-4-jain.abhinav177@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/netdevice.sh

index f7752e1ebe22d253a0a912d641b0f068c4aee294..438f7b2acc5fc6597855028a80a3d5ec151cb513 100755 (executable)
@@ -67,8 +67,12 @@ kci_net_setup()
                return $ksft_skip
        fi
 
-       # TODO what ipaddr to set ? DHCP ?
-       echo "SKIP: $netdev: set IP address"
+       if [ "$veth_created" ]; then
+               echo "XFAIL: $netdev: set IP address unsupported for veth*"
+       else
+               # TODO what ipaddr to set ? DHCP ?
+               echo "SKIP: $netdev: set IP address"
+       fi
        return $ksft_skip
 }
 
@@ -86,7 +90,7 @@ kci_netdev_ethtool_test()
        ret=$?
        if [ $ret -ne 0 ];then
                if [ $ret -eq "$1" ];then
-                       echo "SKIP: $netdev: ethtool $2 not supported"
+                       echo "XFAIL: $netdev: ethtool $2 not supported"
                        return $ksft_skip
                else
                        echo "FAIL: $netdev: ethtool $2"