[LTP] [PATCH] ipsec_lib.sh: test xfrm_user driver locally before rhost

Kory Maincent kory.maincent@bootlin.com
Wed Dec 16 10:40:37 CET 2020


First, test the presence of the driver locally to avoid a misleading TWARN from
tst_net_run in case of driver not present.

Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
---
 testcases/network/stress/ipsec/ipsec_lib.sh | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/testcases/network/stress/ipsec/ipsec_lib.sh b/testcases/network/stress/ipsec/ipsec_lib.sh
index 198c9315d..1db5fc6af 100644
--- a/testcases/network/stress/ipsec/ipsec_lib.sh
+++ b/testcases/network/stress/ipsec/ipsec_lib.sh
@@ -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
 }
-- 
2.17.1



More information about the ltp mailing list