Re: [PATCH v8 net-next 1/3] selftests: net: Create veth pair for testing in networkless kernel

2024-08-21 Thread Abhinav Jain
On Wed, 21 Aug 2024 09:00:41 -0700, Jakub Kicinski wrote: >> I presumed that we would want to run the interface up/down, setup and >> ethtool tests on both veth. >> If this is not required, should I submit a v9 removing veth1 from the temp >> list? > > Yes, please. > >> Also, while sending v9, do

[PATCH v9 net-next 3/3] selftests: net: Use XFAIL for operations not supported by the driver

2024-08-21 Thread Abhinav Jain
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

[PATCH v9 net-next 2/3] selftests: net: Add on/off checks for non-fixed features of interface

2024-08-21 Thread Abhinav Jain
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

[PATCH v9 net-next 1/3] selftests: net: Create veth pair for testing in networkless kernel

2024-08-21 Thread Abhinav Jain
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

[PATCH v9 net-next 0/3] Enhance network interface feature testing

2024-08-21 Thread Abhinav Jain
# XFAIL: veth0: ethtool dump not supported # PASS: veth0: ethtool stats # PASS: veth0: stop interface ``` Abhinav Jain (3): selftests: net: Create veth pair for testing in networkless kernel selftests: net: Add on/off checks for non-fixed features of interface selftests: net: Use XFAIL for ope

Re: [PATCH v8 net-next 1/3] selftests: net: Create veth pair for testing in networkless kernel

2024-08-21 Thread Abhinav Jain
On Tue, 20 Aug 2024 16:50:06 -0700, Jakub Kicinski wrote: > On Mon, 19 Aug 2024 17:42:33 +0530 Abhinav Jain wrote: > > + echo "veth0" > "$TMP_LIST_NETDEV" > > + echo "veth1" >> "$TMP_LIST_NETDEV" > > Why test both ends?

[PATCH v8 net-next 3/3] selftests: net: Use XFAIL for operations not supported by the driver

2024-08-19 Thread Abhinav Jain
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 --- tools/testing/selftests/net/netdevice.sh | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions

[PATCH v8 net-next 2/3] selftests: net: Add on/off checks for non-fixed features of interface

2024-08-19 Thread Abhinav Jain
Implement on/off testing for all non-fixed features via while loop. Signed-off-by: Abhinav Jain --- 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

[PATCH v8 net-next 1/3] selftests: net: Create veth pair for testing in networkless kernel

2024-08-19 Thread Abhinav Jain
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 --- tools/testing/selftests/net/netdevice.sh | 16 1 file changed, 16 insertions(+) diff --git a/tools

[PATCH v8 net-next 0/3] Enhance network interface feature testing

2024-08-19 Thread Abhinav Jain
udp-gro-forwarding # PASS: veth0: Restore feature rx-udp-gro-forwarding to initial state off # Cannot get register dump: Operation not supported # XFAIL: veth0: ethtool dump not supported # PASS: veth0: ethtool stats # PASS: veth0: stop interface ``` Abhinav Jain (3): selftests: net: Create veth p

Re: [PATCH v7 net-next 2/3] selftests: net: Add on/off checks for non-fixed features of interface

2024-08-15 Thread Abhinav Jain
On Thu, 15 Aug 2024 14:03:53 +0100, Simon Horman wrote: > Hi Abhinav, > > Isn't the value being read into $initial_state here already present in $VALUE? Yes, that is correct. I will wait for a day and send v8 using $VALUE. Thanks. ---

Re: [PATCH net v6 0/2] Enhance network interface feature testing

2024-08-15 Thread Abhinav Jain
On Wed, 14 Aug 2024 17:57:48 -0700, Jakub Kicinski wrote: > On Wed, 14 Aug 2024 17:56:51 -0700 Jakub Kicinski wrote: > > On Wed, 14 Aug 2024 19:15:15 +0000 Abhinav Jain wrote: > > > Changes in v6: > > > Use XFAIL for ethtool operations that are unsupported instead

[PATCH v7 net-next 3/3] selftests: net: Use XFAIL for operations not supported by the driver

2024-08-15 Thread Abhinav Jain
Check if veth pair was created and if yes, xfail on setting IP address. Use XFAIL instead of SKIP for unsupported ethtool APIs. Signed-off-by: Abhinav Jain --- tools/testing/selftests/net/netdevice.sh | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/testing

[PATCH v7 net-next 2/3] selftests: net: Add on/off checks for non-fixed features of interface

2024-08-15 Thread Abhinav Jain
Implement on/off testing for all non-fixed features via while loop. Save the initial state so that it can be restored after on/off checks. Signed-off-by: Abhinav Jain --- tools/testing/selftests/net/netdevice.sh | 37 +++- 1 file changed, 36 insertions(+), 1 deletion

[PATCH v7 net-next 1/3] selftests: net: Create veth pair for testing in networkless kernel

2024-08-15 Thread Abhinav Jain
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 --- tools/testing/selftests/net/netdevice.sh | 16 1 file changed, 16 insertions(+) diff --git a/tools

[PATCH v7 net-next 0/3] Enhance network interface feature testing

2024-08-15 Thread Abhinav Jain
ethtool dump not supported # PASS: veth0: ethtool stats # PASS: veth0: stop interface ``` Abhinav Jain (3): selftests: net: Create veth pair for testing in networkless kernel selftests: net: Add on/off checks for non-fixed features of interface selftests: net: Use XFAIL for operations not suppo

[PATCH net v6 2/2] selftests: net: Add on/off checks for non-fixed features of interface

2024-08-14 Thread Abhinav Jain
Implement on/off testing for all non-fixed features via while loop. Save the initial state so that it can be restored after on/off checks. Use XFAIL for unsupported ethtool API. Signed-off-by: Abhinav Jain --- tools/testing/selftests/net/netdevice.sh | 39 ++-- 1 file

[PATCH net v6 1/2] selftests: net: Create veth pair for testing in networkless kernel

2024-08-14 Thread Abhinav Jain
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 --- tools/testing/selftests/net/netdevice.sh | 16 1 file changed, 16 insertions(+) diff --git a/tools

[PATCH net v6 0/2] Enhance network interface feature testing

2024-08-14 Thread Abhinav Jain
get register dump: Operation not supported # XFAIL: veth0: ethtool dump not supported # PASS: veth0: ethtool stats # PASS: veth0: stop interface ``` Abhinav Jain (2): selftests: net: Create veth pair for testing in networkless kernel selftests: net: Add on/off checks for non-fixed feature

Re: [PATCH net v2] selftest: af_unix: Fix kselftest compilation warnings

2024-08-14 Thread Abhinav Jain
On Tue, 13 Aug 2024 18:21:06 -0700, Jakub Kicinski wrote: > Some patchwork malfunction, the patch didn't get registered :( > Could you resend? > > Please keep Kuniyuki's review tag and address his feedback. Sure. I have submitted v3 keeping the above in mind, please review: https://lore.kernel.org

[PATCH net v3] selftest: af_unix: Fix kselftest compilation warnings

2024-08-14 Thread Abhinav Jain
has type ‘const void *’ [-Wformat=] ../../kselftest_harness.h:101:17: note: in expansion of macro ‘__TH_LOG’ msg_oob.c:259:25: note: in expansion of macro ‘TH_LOG’ ``` Fixes: d098d77232c3 ("selftest: af_unix: Add msg_oob.c.") Signed-off-by: Abhinav Jain Reviewed-by: Kuniyuki Iwashim

Re: [PATCH net] selftest: af_unix: Fix kselftest compilation warnings

2024-08-12 Thread Abhinav Jain
On Mon, 12 Aug 2024 11:39:44 -0700, Kuniyuki Iwashima wrote: > Fixes: tag is needed here (no space between SOB tag) Thank you, I have added it in v2 here: > I don't remember why I defined expected_buf as (void *), but more simple > fix would be the following ? > > ---8<--- > diff --git a/tools/

[PATCH net v2] selftest: af_unix: Fix kselftest compilation warnings

2024-08-12 Thread Abhinav Jain
/20240810134037.669765-1-jain.abhinav...@gmail.com Fixes: d098d77232c3 ("selftest: af_unix: Add msg_oob.c.") Signed-off-by: Abhinav Jain --- tools/testing/selftests/net/af_unix/msg_oob.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/net/af_unix/msg_oob.c b/too

Re: [PATCH v5 1/2] selftests: net: Create veth pair for testing in networkless kernel

2024-08-10 Thread Abhinav Jain
On Fri, 9 Aug 2024 21:19:11 -0700, Jakub Kicinski wrote: > > On Thu, 8 Aug 2024 09:23:09 -0700, Jakub Kicinski wrote: > > > A number of checks now return SKIP because veth doesn't support all > > > ethtool APIs. > > > > > > In netdev selftests we try to make sure SKIP is only used when test > > >

[PATCH] selftests: filesystems: fix warn_unused_result build warnings

2024-08-10 Thread Abhinav Jain
bute ‘warn_unused_result’ [-Wunused-result] statmount_test_ns.c:323:17: warning: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’ [-Wunused-result] ``` Signed-off-by: Abhinav Jain --- .../selftests/filesystems/statmount/statmount_test_ns.c| 7 +-- 1 file changed, 5 insertions(+

[PATCH net] selftest: af_unix: Fix kselftest compilation warnings

2024-08-10 Thread Abhinav Jain
*’,but argument 6 has type ‘const void *’ [-Wformat=] ../../kselftest_harness.h:101:17: note: in expansion of macro ‘__TH_LOG’ msg_oob.c:259:25: note: in expansion of macro ‘TH_LOG’ ``` Signed-off-by: Abhinav Jain --- tools/testing/selftests/net/af_unix/msg_oob.c | 6 -- 1 file changed, 4

Re: [PATCH v5 1/2] selftests: net: Create veth pair for testing in networkless kernel

2024-08-09 Thread Abhinav Jain
On Thu, 8 Aug 2024 09:23:09 -0700, Jakub Kicinski wrote: > A number of checks now return SKIP because veth doesn't support all > ethtool APIs. > > In netdev selftests we try to make sure SKIP is only used when test > cannot be performed because of limitations of the environment. > For example some

Re: [PATCH v4 1/2] selftests: net: Create veth pair for testing in networkless kernel

2024-08-08 Thread Abhinav Jain
On Wed, 7 Aug 2024 18:28:34 -0700 Jakub Kicinski wrote: > That's not the right syntax.. Thanks for the feedback Jakub. I have rectified this and while at it, I tested using vng on a network based kernel and found another issue in veth removal logic. I have fixed that as well. Please kindly check

[PATCH v5 2/2] selftests: net: Add on/off checks for non-fixed features of interface

2024-08-08 Thread Abhinav Jain
Implement on/off testing for all non-fixed features via while loop. Save the initial state so that it can be restored after on/off checks. Signed-off-by: Abhinav Jain --- tools/testing/selftests/net/netdevice.sh | 37 +++- 1 file changed, 36 insertions(+), 1 deletion

[PATCH v5 1/2] selftests: net: Create veth pair for testing in networkless kernel

2024-08-08 Thread Abhinav Jain
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 --- tools/testing/selftests/net/netdevice.sh | 16 1 file changed, 16 insertions(+) diff --git a/tools

[PATCH v5 0/2] Enhance network interface feature testing

2024-08-08 Thread Abhinav Jain
face # Removed veth pair ok 12 selftests: net: netdevice.sh ``` Abhinav Jain (2): selftests: net: Create veth pair for testing in networkless kernel selftests: net: Add on/off checks for non-fixed features of interface tools/testing/selftests/net/netdevice.sh | 53 +++- 1

[PATCH v4 2/2] selftests: net: Add on/off checks for non-fixed features of interface

2024-08-07 Thread Abhinav Jain
Implement on/off testing for all non-fixed features via while loop. Save the initial state so that it can be restored after on/off checks. Signed-off-by: Abhinav Jain --- tools/testing/selftests/net/netdevice.sh | 37 +++- 1 file changed, 36 insertions(+), 1 deletion

[PATCH v4 1/2] selftests: net: Create veth pair for testing in networkless kernel

2024-08-07 Thread Abhinav Jain
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 --- tools/testing/selftests/net/netdevice.sh | 18 ++ 1 file changed, 18 insertions(+) diff --git a/tools

[PATCH v4 0/2] Enhance network interface feature testing

2024-08-07 Thread Abhinav Jain
ster dump: Operation not supported # SKIP: veth1: ethtool dump not supported # PASS: veth1: ethtool stats # PASS: veth1: stop interface # Removed veth pair ok 12 selftests: net: netdevice.sh ``` Abhinav Jain (2): selftests: net: Create veth pair for testing in networkless kernel selftests: net: Ad

Re: [PATCH] selftests/proc: fix unused result warning during test compilation

2024-06-28 Thread Abhinav Jain
On Fri, 28 Jun 2024 13:30:14 -0700, Andrew Morton wrote: > Well, it's all inside `if (0)', so just remove it. Removed and shared v2 version of the patch here: https://lore.kernel.org/all/20240629050449.990451-1-jain.abhinav...@gmail.com/ Please review. Thanks.

[PATCH v2] selftests/proc: fix unused result warning during test compilation

2024-06-28 Thread Abhinav Jain
] 385 | write(1, buf, rv); Signed-off-by: Abhinav Jain --- Changes since v1: - Remove the redundant if(0) block as per the feedback - Patch v1: https://lore.kernel.org/all/20240625152139.16412-1-jain.abhinav...@gmail.com/ --- tools/testing/selftests/proc/proc-empty-vm.c | 8

Re: [PATCH] selftests/proc: fix unused result warning during test compilation

2024-06-28 Thread Abhinav Jain
On Tue, 25 Jun 2024 11:05:26 -0700, Andrew Morton wrote: > Thanks. There's a patch queued which simply deletes this code. > > https://lkml.kernel.org/r/20240603124220.33778-1-amer.shanaw...@gmail.com Thank you for sharing the queued patch Andrew. There has been no update/revert on it, may I know

[PATCH] selftests/proc: fix unused result warning during test compilation

2024-06-25 Thread Abhinav Jain
] 385 | write(1, buf, rv); Signed-off-by: Abhinav Jain --- tools/testing/selftests/proc/proc-empty-vm.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/proc/proc-empty-vm.c b/tools/testing/selftests/proc/proc-empty-vm.c index

Re: [PATCH v2] sefltests: net: Add on/off checks for network interface non fixed features

2024-06-14 Thread Abhinav Jain
On Thu, 13 Jun 2024 18:49:38 -0700, Jakub Kicinski wrote: > You do off then on, so you assume the feature was on to begin with. > Not all features will be on. You gotta change the order based on > the initial state so that the feature goes back to what it was. Thanks for sharing feedback, I have s

[PATCH v3] sefltests: net: Add on/off checks for network interface non fixed features

2024-06-14 Thread Abhinav Jain
This patch addresses the TODO (add non fixed feature on/off check). I have tested it manually on my system after making changes as suggested in v1 and v2 linked below for reference. Patch now restores the features being tested to their initial state. Signed-off-by: Abhinav Jain --- PATCH v2

[PATCH] selftests: filesystems: add return value checks

2024-06-10 Thread Abhinav Jain
root); | ^ statmount_test.c:128:2: warning: ignoring return value of ‘chroot’, declared with attribute warn_unused_result [-Wunused-result] 128 | chroot("."); | ^~~ Signed-off-by: Abhinav Jain --- .../filesystems/statmount/statmount_test.c | 13 +++

Re: [PATCH] selftests: net: Add on/off checks for network interface non fixed features

2024-06-09 Thread Abhinav Jain
On Fri, 7 Jun 2024 19:01:27 +0100, Simon Horman wrote: > Hi Abhinav, > > I suspect this will now only report a failure if tail fails, > but ignore ethtool failures. Hi Simon, I agree, I missed this part earlier. After taking other suggestion into account, we don't need this tail and I have remov

[PATCH v2] sefltests: net: Add on/off checks for network interface non fixed features

2024-06-09 Thread Abhinav Jain
This patch addresses the TODO (add non fixed feature on/off check). I have tested it manually on my system and made changes as suggested in v1 Signed-off-by: Abhinav Jain --- PATCH v1: https://lore.kernel.org/all/20240606212714.27472-1-jain.abhinav...@gmail.com/ Changes since v1: - Removed

[PATCH] selftests: net: Add on/off checks for network interface non fixed features

2024-06-06 Thread Abhinav Jain
This patch addresses the present TODO in the file. I have tested it manually on my system and added relevant filtering to ensure that the correct feature list is being checked. Signed-off-by: Abhinav Jain --- tools/testing/selftests/net/netdevice.sh | 21 +++-- 1 file changed