From patchwork Wed Aug 21 17:19:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abhinav Jain X-Patchwork-Id: 13771923 Received: from mail-oi1-f175.google.com (mail-oi1-f175.google.com [209.85.167.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1D6DD163A9B; Wed, 21 Aug 2024 17:19:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.175 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724260767; cv=none; b=VzNZFNmsp10pWd4esZu1qWt4+tarXK/twDdI7Kt7XS2lP7ppi04bbkC8gNhY0FAmcIk5rgYZM2GpjZHpCsobCADx9huyyZE/MRupkh2n9Zs8LVygw6fNE4pcVX5EEdCT2E/96RxUOcacqdjsW62o3j0vWzdk3MfjiB8aE7fL0m8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724260767; c=relaxed/simple; bh=plYZXFNk9rSlbVsfuxjzQlythilmvSFccRmlgogdFMs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=bu/4ZtthfC/8lZD6n14gnc15j0itAz+RUo0Ll5LP15pob0yEicv2IKi9wBT/yavle33QPuRReC2EB3qZtxSZPeslEonH9UpQ1qw8ut2QnRUM4NshAhsdojaGJ1byEcuJRBRxaS8DYHMH06VubcN6o1n89pnreoHaPe02myBFsYQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=PkgMs1mp; arc=none smtp.client-ip=209.85.167.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="PkgMs1mp" Received: by mail-oi1-f175.google.com with SMTP id 5614622812f47-3db51133978so4320963b6e.3; Wed, 21 Aug 2024 10:19:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724260765; x=1724865565; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=r/0hikUDUFqirM6RDbNFvSQVtHApfkwMVkRRxVRdI9U=; b=PkgMs1mpPgl7Lg/h5LrrBQ8cKy35fCPmN8pZNEpV8AC4LxXupRbGG9TAIy6IZI2zph 23T/pyDnQ6ck9f3RwV/1duaGBB0Kzq2OcDQJWMA58SjZVUfBxD3aNEOPL3JNrcgoMLKr U8xfHFIwCXyCO88yetFXf2oWBWbh3xzI9gAqKVLXZN+a5SbGgDvau65X1DvsKI1zoQud wQCwtiRWdQn4u3IJCVCR0u0am66avzoyFORBXVQUwcWj/V3/Jy9PRGRKlWX3eLSo9F3X ln73IngBp4yQFo36a1dAtSo60oIuj1VkxPrA9mXmhNqm0H9zxXCKCYSaqwC3eqDxYIdP nq0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724260765; x=1724865565; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=r/0hikUDUFqirM6RDbNFvSQVtHApfkwMVkRRxVRdI9U=; b=KiooLZtpQ6s90y8iSa0sPppz3ZDlQnZigokAnLx8KlHxygYjWFBhv2ExsosvSEbyXj dWUS81K/giyzP7uTzXQHFLDeLT8OaVJiEDdfFYa9JL2ocZ8TmPRROVdC2s46FGr12SU8 CegKz2RF2nxZXGm69JIe6cjSHKxHHS2xp2I/jvK+fS5kcQzsfk6b4jSGG3FZXyVagH36 kyBsPSqNp4ei112I6ZZtp6y3iyHirAtZxQdrysNVHMrDVLbWK6TgkrBs8v4zD9O99rom 0E1SJVW/WWUaKxhSc02nTUAc+K/dIfr9vr7YAJSTAJtl9jM/Xsg0I6tFgmWf9Ia/9/6I xuOQ== X-Forwarded-Encrypted: i=1; AJvYcCV64uB0IA6KEw6DVNjKL4OrIYaA8JLBettbmNqfKblpkyZ9L358jhRuvhDHjB+M1QNcWnAgAUTo@vger.kernel.org, AJvYcCWfk05VyoWeP73IDIkT6DQ3WPtp2RMmzmvY10mXv5fDTkpbPSmMYi4Vd0T8JcoOBlQ/6ujzwyv+WL3PNvawo8nb@vger.kernel.org, AJvYcCXdiapBYlNR/OHyvXxGqQVmSEYtgWkHw5dpB0LEpT6Q02od4JN+ruE9WmvYZ4PrEHF0CB4BgZVosRj/JBg=@vger.kernel.org X-Gm-Message-State: AOJu0YwW+WuWFqZVfGZFp45Y9G4DU0t7J6/wVvHXBvu620nhltyBvUVq 9lJze++6i20KYPD4gcIIVo7SxKPCufiXIJgpiPdqXgpipZ0XLxOF X-Google-Smtp-Source: AGHT+IGymdg2j7tqXYa3mGg9Y0MdXYxPaO7C9c0BBoxxwEjjkItuhb4cvwE2lgetUtKWiY7g5ifPzA== X-Received: by 2002:a05:6871:689:b0:24f:ef6b:353e with SMTP id 586e51a60fabf-2738be3937bmr2981116fac.36.1724260765117; Wed, 21 Aug 2024 10:19:25 -0700 (PDT) Received: from dev0.. ([2405:201:6803:30b3:2256:a75d:4176:9e6a]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7c6b6356929sm11454913a12.73.2024.08.21.10.19.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Aug 2024 10:19:24 -0700 (PDT) From: Abhinav Jain To: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, shuah@kernel.org, netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Cc: skhan@linuxfoundation.org, javier.carrasco.cruz@gmail.com, Abhinav Jain , Simon Horman Subject: [PATCH v9 net-next 1/3] selftests: net: Create veth pair for testing in networkless kernel Date: Wed, 21 Aug 2024 22:49:01 +0530 Message-Id: <20240821171903.118324-2-jain.abhinav177@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240821171903.118324-1-jain.abhinav177@gmail.com> References: <20240821171903.118324-1-jain.abhinav177@gmail.com> Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Check if the netdev list is empty and create veth pair to be used for feature on/off testing. Remove the veth pair after testing is complete. Signed-off-by: Abhinav Jain Reviewed-by: Simon Horman --- tools/testing/selftests/net/netdevice.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tools/testing/selftests/net/netdevice.sh b/tools/testing/selftests/net/netdevice.sh index e3afcb424710..999d72b6670c 100755 --- a/tools/testing/selftests/net/netdevice.sh +++ b/tools/testing/selftests/net/netdevice.sh @@ -129,6 +129,7 @@ kci_netdev_ethtool() kci_netdev_ethtool_test 74 'dump' "ethtool -d $netdev" kci_netdev_ethtool_test 94 'stats' "ethtool -S $netdev" + return 0 } @@ -196,10 +197,24 @@ if [ ! -e "$TMP_LIST_NETDEV" ];then fi ip link show |grep '^[0-9]' | grep -oE '[[:space:]].*eth[0-9]*:|[[:space:]].*enp[0-9]s[0-9]:' | cut -d\ -f2 | cut -d: -f1> "$TMP_LIST_NETDEV" + +if [ ! -s "$TMP_LIST_NETDEV" ]; then + echo "No valid network device found, creating veth pair" + ip link add veth0 type veth peer name veth1 + echo "veth0" > "$TMP_LIST_NETDEV" + veth_created=1 +fi + while read netdev do kci_test_netdev "$netdev" done < "$TMP_LIST_NETDEV" +#clean up veth interface pair if it was created +if [ "$veth_created" ]; then + ip link delete veth0 + echo "Removed veth pair" +fi + rm "$TMP_LIST_NETDEV" exit 0 From patchwork Wed Aug 21 17:19:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abhinav Jain X-Patchwork-Id: 13771924 Received: from mail-oa1-f42.google.com (mail-oa1-f42.google.com [209.85.160.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B731D1B2EC0; Wed, 21 Aug 2024 17:19:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724260774; cv=none; b=N6fxzKgAHmOb5wdjTSmDWtHHCdeOY6TgsepHZfSefJgsbXYiQjNHS2drAZsRYVggC7L+vIn7L7cue12B7EeFX3F5zO99z8MLz+ZVqC/ggvdKg0lUFcZy3LcoRh4PafHgorLl6NvVHleIYNmSAoSd8icp4rRDD7pWr3UMFWTiwiU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724260774; c=relaxed/simple; bh=QXu/tbKVrbuG4cIuDk960PgY7sfJk8lvD33GkEYc3Gg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ak8eIsEDS6UQz9VrT4Gl6QpvEuF7su90Dal/aw+8slHtyJyTghxj7zx+33L6dvUyz7bLq6cAtVXIaKitYCtuVON03GHrIuBBDEo+5jFJ+fXIbM1O+VyVPKdx0BSOtnaKLV4Zyx6pPXNbrzk5UgCfKTfYGshi4WL5xqtUFosRYmA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=g0OJIMuo; arc=none smtp.client-ip=209.85.160.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="g0OJIMuo" Received: by mail-oa1-f42.google.com with SMTP id 586e51a60fabf-2702ed1054fso2410201fac.3; Wed, 21 Aug 2024 10:19:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724260772; x=1724865572; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=jkNSkfheqMxmKkuKF+Kr77qV3Kh/thT0g/DDVM2Il4M=; b=g0OJIMuoXiwkIwmAllJvxu9iBusEn9z2e9nCZ1/697pOSaClNAkFmkuv54y32pTOcI lQYLS6iqNh+W6Ux92LOWIAgXRL2Ja9HFDp5YXICt/vnLYe1LTdtdlrJBV3OM0tZsNOaf H/dBpqtjFNcBR4p5wxrOMvXZrqGjcFitZlb3pbr2uJN8kfWc+SrubiZu6mNeuLEf6ylx llmIin3QheWDceNmFohlZcKKe8yaShElma+dL9aLqp4kfZa1rD+BiTtltmBwMiOoCDa0 eEfBOr/4KCr66BsUIx1jDvx8p6yUcq7ejAlYaFGfQ2KpTnRJzOrsc9MsowgmN/0GPj2l pk5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724260772; x=1724865572; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jkNSkfheqMxmKkuKF+Kr77qV3Kh/thT0g/DDVM2Il4M=; b=pnT8mwF5h0PDKoSwAXhKol1Df5z5My4oCXhSvHqCNBd3+/vCYRTxf9VJwUSMFiTLm+ Yo2jf+KasG3fiFaZ3L7iBT8Zjx4IzwvGmtFBvI2tCVmtL2ggYt7o6yguRNHSbJWmMQEz emWZ7Yvnq5oCRoIASH1Hn6w9/5kv+EjUyDuN2jL2uHcYJ00b2LvX7euA+0hRN9eLxyzX Px9AGJTbU6iMZB4FRpxATAAIMGyzZwdaM67VQbEZFOJrST8XIhcCPnrS897cvng5MPcr oMEubpbFRAKdU3Ia+zYlAwy21NMk5Fw/rpLyqZunZoOHYzi8rkXAkeKCeeySV9cyezwu j4ow== X-Forwarded-Encrypted: i=1; AJvYcCUWg3QIzmoFq1wA7fGLzufPX7EKoyLUqc7VuqyJBP54Vf6L0VpSfzlRZCNP3j7TwsBwKhmCSXYHHSgnhgXI1QBq@vger.kernel.org, AJvYcCWKXxJNGF1Tx6PVrAc0fCmkk8ankVfSzEfKyi7st/OYbwCZLD5Y9vBYXu3VuyNQac+MpjwtFQZoBgJOfnk=@vger.kernel.org, AJvYcCWbAspOWIOLlakcEq2KwLcjlBNPEVBLeR2PAdbaXRurD7BqD0inuZ0Dh+fp2LfwXAhsh7Q87yVy@vger.kernel.org X-Gm-Message-State: AOJu0YxeNOLR7gx1JySPYcUaBQXH7fZkUyplj+hnmogF3bYwIrMOJDMc jEyhjjLA2lV/hcojHlLLaIOoGfRHsOegA7sP2TBMAgzojTETFQgx X-Google-Smtp-Source: AGHT+IGPMfOJ4oS0EtqhdB290w3Y27mgJOIGB8j1pc2ZqzOym2mUx+cKV6+7TqWw8WExgWnr8nCJxw== X-Received: by 2002:a05:6871:51e8:b0:25e:19fe:f240 with SMTP id 586e51a60fabf-2737eebcbebmr3103121fac.9.1724260771761; Wed, 21 Aug 2024 10:19:31 -0700 (PDT) Received: from dev0.. ([2405:201:6803:30b3:2256:a75d:4176:9e6a]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7c6b6356929sm11454913a12.73.2024.08.21.10.19.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Aug 2024 10:19:31 -0700 (PDT) From: Abhinav Jain To: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, shuah@kernel.org, netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Cc: skhan@linuxfoundation.org, javier.carrasco.cruz@gmail.com, Abhinav Jain , Simon Horman Subject: [PATCH v9 net-next 2/3] selftests: net: Add on/off checks for non-fixed features of interface Date: Wed, 21 Aug 2024 22:49:02 +0530 Message-Id: <20240821171903.118324-3-jain.abhinav177@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240821171903.118324-1-jain.abhinav177@gmail.com> References: <20240821171903.118324-1-jain.abhinav177@gmail.com> Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Implement on/off testing for all non-fixed features via while loop. Signed-off-by: Abhinav Jain Reviewed-by: Simon Horman --- tools/testing/selftests/net/netdevice.sh | 35 +++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/net/netdevice.sh b/tools/testing/selftests/net/netdevice.sh index 999d72b6670c..f7752e1ebe22 100755 --- a/tools/testing/selftests/net/netdevice.sh +++ b/tools/testing/selftests/net/netdevice.sh @@ -124,7 +124,40 @@ kci_netdev_ethtool() return 1 fi echo "PASS: $netdev: ethtool list features" - #TODO for each non fixed features, try to turn them on/off + + while read -r FEATURE VALUE FIXED; do + [ "$FEATURE" != "Features" ] || continue # Skip "Features" + [ "$FIXED" != "[fixed]" ] || continue # Skip fixed features + feature="${FEATURE%:*}" + + ethtool --offload "$netdev" "$feature" off + if [ $? -eq 0 ]; then + echo "PASS: $netdev: Turned off feature: $feature" + else + echo "FAIL: $netdev: Failed to turn off feature:" \ + "$feature" + fi + + ethtool --offload "$netdev" "$feature" on + if [ $? -eq 0 ]; then + echo "PASS: $netdev: Turned on feature: $feature" + else + echo "FAIL: $netdev: Failed to turn on feature:" \ + "$feature" + fi + + #restore the feature to its initial state + ethtool --offload "$netdev" "$feature" "$VALUE" + if [ $? -eq 0 ]; then + echo "PASS: $netdev: Restore feature $feature" \ + "to initial state $VALUE" + else + echo "FAIL: $netdev: Failed to restore feature" \ + "$feature to initial state $VALUE" + fi + + done < "$TMP_ETHTOOL_FEATURES" + rm "$TMP_ETHTOOL_FEATURES" kci_netdev_ethtool_test 74 'dump' "ethtool -d $netdev" From patchwork Wed Aug 21 17:19:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abhinav Jain X-Patchwork-Id: 13771925 Received: from mail-il1-f178.google.com (mail-il1-f178.google.com [209.85.166.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EBD0416A95A; Wed, 21 Aug 2024 17:19:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.178 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724260782; cv=none; b=ICSi3i8q9m4QTNcCnWg4qn5NQRCY5Yv+iILPpDwItjcefajy3nTkDmo59TsjW1LYe4BDntnV0uO3UBkGYQWWJ/4BW1AFAY0YcJIFH7Z0JWUMn6l6B+olFieYu62Y7DMs/4LK7pn73krW8UsOblpYR63FMLs3aLZRnucKLF9BW4U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724260782; c=relaxed/simple; bh=AHrl03hYSk0JN3ewZWY8XYVCvjqHXQ4YdK8KD/wfZ9I=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=HfTGpABdVJqKyZwls15tGYknUCkIS+6uup7yjxVM8tkJDdgwfXmtVRTuvlVzvGAi6damQQt9cI7cm7FtO8iKlx4ZAc7if+x/NeLuBC8DmlbN++Vpab9gHf2tToaw6BThGfvdNSelHux9sAGYWPVrikROK8hqzRl8K9/MBQ85tdI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=M2yFJJNb; arc=none smtp.client-ip=209.85.166.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="M2yFJJNb" Received: by mail-il1-f178.google.com with SMTP id e9e14a558f8ab-39d380d4ffcso14805775ab.0; Wed, 21 Aug 2024 10:19:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724260780; x=1724865580; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=9KPrmJT20XR6gJIgd8GzdC0o88NELmv9DY4n9MTax20=; b=M2yFJJNbEc0iLZ6VvvaoLOjlU8fraR6IxNxvRN9nx+YKAZiTBBbzDCItqGoyWBx3m7 +uKqIcdYkGF5gBIs1g1qEE+t/OOew0DN0ZE3xE6L2jWeVHywhHnHDgnApcqnUXs4OACP 0XEJCSgH0LRZ0XE/2P6QjqbuAN7Sx+ICm+HK/hA+DqvRa3IVxK8vCgge4loKIobUGe3H ne303eUFg35mWiBNiX5ctNCRySTF9T7qSZyGkjt+RsKLQO7zxm+jGbfmfHZ+Guj9wy0N UL04hkoJofVvNZLQ8JGSFYXt8Y9DetbXFxTQxIdYKMO7xBCjdcB/ltqp7QDEdfSx+Uv2 nCnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724260780; x=1724865580; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9KPrmJT20XR6gJIgd8GzdC0o88NELmv9DY4n9MTax20=; b=cRrHlhP8vxtQ9DizxfcIgXh/B6aFWEnKFa5+8rzn92YMwsjBCnX1Tz2R+lHFO2k8sP zHOBjM7Xe+3Rfv3X4pXNMcvqCDEj8DBmtnnraXskfMmKgccuGDjN6QP1in/8/AfW8fse QL3QfkkvTtnf3eG6FXOmJvpLqTea3bmvqsChx2a/3ySc+Ci/QuFL6FDff+RXUA/mqxxA P4NxJCKYvXUrcyt8H7KKNJVOlu9bd+a1l3i11mGA0ectQ39GQGlhjJHdSZj5gaeABVS3 kVEK8QykfaoOQJBJhWtEamORoyQmQPuz3x9acYXQ05R1d8isBCeLzc/ne3h/T1Jlf56v OFqw== X-Forwarded-Encrypted: i=1; AJvYcCU3+IOZ4L4ca0eDkiSdxPDzoMrzxhrYmxdG31mjGUPnghdtBI6ktY3CE2LDNJEBcbU61wOEyzLt@vger.kernel.org, AJvYcCWy0gkF00NYD1MTVObqhrpTsnI4EUvftg+wIwirpeQuYDsNMmVMvBurMbClNn2Q2xDBXfoHUjS6tGDS1io=@vger.kernel.org, AJvYcCX/d2Omtkxums6ebOeMVWgsGtNtWko8a5xXa//PzW6x2nIDMwf/xhd1Hv3nseeT6n1BoeYOX3WdnFX4SHIFN/t/@vger.kernel.org X-Gm-Message-State: AOJu0YxVEVfIZCLPqocJOaPGHDk8upzyWgV9N5mdj57swHxsjfPrWUai 2R3SP+lyUVU30wjaeu2HPvMOtWr9Sgibjts4Gm2hzuCn27SgSZ4F X-Google-Smtp-Source: AGHT+IGf/RnGs2WPj6nmsw5daPpF9fWh7c3GdekFAbAcHyCr7tDkb5rAMJnus4gLqUxa2dMraVTsFg== X-Received: by 2002:a05:6e02:1c82:b0:381:e4a3:2 with SMTP id e9e14a558f8ab-39d6c3b95abmr28516955ab.21.1724260779944; Wed, 21 Aug 2024 10:19:39 -0700 (PDT) Received: from dev0.. ([2405:201:6803:30b3:2256:a75d:4176:9e6a]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7c6b6356929sm11454913a12.73.2024.08.21.10.19.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Aug 2024 10:19:39 -0700 (PDT) From: Abhinav Jain To: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, shuah@kernel.org, netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Cc: skhan@linuxfoundation.org, javier.carrasco.cruz@gmail.com, Abhinav Jain , Simon Horman Subject: [PATCH v9 net-next 3/3] selftests: net: Use XFAIL for operations not supported by the driver Date: Wed, 21 Aug 2024 22:49:03 +0530 Message-Id: <20240821171903.118324-4-jain.abhinav177@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240821171903.118324-1-jain.abhinav177@gmail.com> References: <20240821171903.118324-1-jain.abhinav177@gmail.com> Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 Reviewed-by: Simon Horman --- tools/testing/selftests/net/netdevice.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/net/netdevice.sh b/tools/testing/selftests/net/netdevice.sh index f7752e1ebe22..438f7b2acc5f 100755 --- a/tools/testing/selftests/net/netdevice.sh +++ b/tools/testing/selftests/net/netdevice.sh @@ -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"