ipsec_lib.sh: test xfrm_user driver locally before rhost
PATCH 1/1 ipsec_lib.sh: test xfrm_user driver locally before rhost
First, test the presence of the driver locally to avoid a misleading TWARN from tst_net_run in case of driver not present.
--- testcases/network/stress/ipsec/ipsec_lib.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
testcases/network/stress/ipsec/ipsec_lib.sh +3 -2
@@ -83,8 +83,9 @@ ipsec_lib_setup() ALGR= if [ -n "$IPSEC_MODE" ]; then - tst_net_run "tst_check_drivers xfrm_user" || \ - tst_brk TCONF "xfrm_user driver not available on lhost or rhost" + tst_check_drivers xfrm_user || tst_brk TCONF "xfrm_user driver not available" + tst_rhost_run -c "tst_check_drivers xfrm_user" || \ + tst_brk TCONF "xfrm_user driver not available on rhost" cleanup_xfrm=1 fi }
Signature · 1 line
2.17.1
PATCH 1/1 ipsec_lib.sh: test xfrm_user driver locally before rhost
Quoted 13 lines · Kory Maincent
First, test the presence of the driver locally to avoid a misleading TWARN from
tst_net_runin case of driver not present.Signed-off-by Kory Maincent <[email protected]>--- testcases/network/stress/ipsec/ipsec_lib.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)testcases/network/stress/ipsec/ipsec_lib.sh +0
-0
testcases/network/stress/ipsec/ipsec_lib.sh ipsec_lib_setup() · line 88
Quoted 8 lines
testcases/network/stress/ipsec/ipsec_lib.sh +3
-2@@ -83,8 +83,9 @@ ipsec_lib_setup() ALGR= if [ -n "$IPSEC_MODE" ]; then - tst_net_run "tst_check_drivers xfrm_user" || \ - tst_brk TCONF "xfrm_user driver not available on lhost or rhost" + tst_check_drivers xfrm_user || tst_brk TCONF "xfrm_user driver not available" + tst_rhost_run -c "tst_check_drivers xfrm_user" || \ + tst_brk TCONF "xfrm_user driver not available on rhost"
Hi Kory,
tst_net_run() checks the driver locally first, so I don't quite understand why do exactly the same what tst_net_run() supposed to do?
PATCH 1/1 ipsec_lib.sh: test xfrm_user driver locally before rhost
Hello Alexey,
Quoted 28 lines · On Wed, 16 Dec 2020 13:31:36 +0300 Alexey Kodanev <[email protected]>…
Quoted 23 lines · Kory Maincent
First, test the presence of the driver locally to avoid a misleading TWARN from
tst_net_runin case of driver not present.Signed-off-by Kory Maincent <[email protected]>--- testcases/network/stress/ipsec/ipsec_lib.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)(quoted diff) +0
-0
b/testcases/network/stress/ipsec/ipsec_lib.shindex198c9315d..1db5fc6af100644 ---a/testcases/network/stress/ipsec/ipsec_lib.sh
+++b/testcases/network/stress/ipsec/ipsec_lib.shtestcases/network/stress/ipsec/ipsec_lib.sh +0
-2@@ -83,8 +83,9 @@ ipsec_lib_setup() ALGR= if [ -n "$IPSEC_MODE" ]; then - tst_net_run "tst_check_drivers xfrm_user" || \ - tst_brk TCONF "xfrm_user driver not available onlhost or rhost"
(quoted diff) +1
-0+ tst_check_drivers xfrm_user || tst_brk TCONF "xfrm_userdriver not available"
(quoted diff) +2
-0+ tst_rhost_run -c "tst_check_drivers xfrm_user" || \ + tst_brk TCONF "xfrm_user driver not available onQuoted 1 line
rhost"
Hi Kory,
Quoted 3 lines
tst_net_run()checks the driver locally first, so I don't quite understand why do exactly the same whattst_net_run()supposed to do?
Indeed but it returns a TWARN because the command "tst_check_drivers xfrm_user" not end properly, but in fact it should return a TCONF due to the missing xfrm_drivers.
In the final result file we got a FAIL error with the value 36 in place of a CONF with value 32 which should be the right message.
Regards,
PATCH 1/1 ipsec_lib.sh: test xfrm_user driver locally before rhost
Quoted 37 lines · K?ry Maincent
Hello Alexey,
Quoted 28 lines · On Wed, 16 Dec 2020 13:31:36 +0300 Alexey Kodanev <[email protected]>…
Quoted 23 lines · Kory Maincent
First, test the presence of the driver locally to avoid a misleading TWARN from
tst_net_runin case of driver not present.Signed-off-by Kory Maincent <[email protected]>--- testcases/network/stress/ipsec/ipsec_lib.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)(quoted diff) +0
-0
b/testcases/network/stress/ipsec/ipsec_lib.shindex198c9315d..1db5fc6af100644 ---a/testcases/network/stress/ipsec/ipsec_lib.sh
+++b/testcases/network/stress/ipsec/ipsec_lib.shtestcases/network/stress/ipsec/ipsec_lib.sh +0
-2@@ -83,8 +83,9 @@ ipsec_lib_setup() ALGR= if [ -n "$IPSEC_MODE" ]; then - tst_net_run "tst_check_drivers xfrm_user" || \ - tst_brk TCONF "xfrm_user driver not available onlhost or rhost"
(quoted diff) +1
-0+ tst_check_drivers xfrm_user || tst_brk TCONF "xfrm_userdriver not available"
(quoted diff) +2
-0+ tst_rhost_run -c "tst_check_drivers xfrm_user" || \ + tst_brk TCONF "xfrm_user driver not available onQuoted 1 line
rhost"
Hi Kory,
Quoted 3 lines
tst_net_run()checks the driver locally first, so I don't quite understand why do exactly the same whattst_net_run()supposed to do?
Quoted 6 lines
Indeed but it returns a TWARN because the command "
tst_check_driversxfrm_user" not end properly, but in fact it should return a TCONF due to the missingxfrm_drivers.
In the final result file we got a FAIL error with the value 36 in place of a CONF with value 32 which should be the right message.
Perhaps it needs -q option here:
tst_net_run -q "tst_check_drivers xfrm_user" ... so it skips TWARN?
PATCH 1/1 ipsec_lib.sh: test xfrm_user driver locally before rhost
Hi Alexey,
Quoted 12 lines · On Wed, 16 Dec 2020 14:10:34 +0300 Alexey Kodanev <[email protected]>…
Quoted 11 lines
Quoted 4 lines
tst_net_run()checks the driver locally first, so I don't quite understand why do exactly the same whattst_net_run()supposed to do?Indeed but it returns a TWARN because the command "
tst_check_driversxfrm_user" not end properly, but in fact it should return a TCONF due to the missingxfrm_drivers.
In the final result file we got a FAIL error with the value 36 in place of a CONF with value 32 which should be the right message.
Quoted 4 lines
Perhaps it needs -q option here:
tst_net_run-q "tst_check_driversxfrm_user" ... so it skips TWARN?
Ah yes, I feel stupid! ;)
Tested it, it works as expected.
Do you want me to send a v2 patch?
Regards,
K?ry