* [LTP] [PATCH v2] net/ip_tests: Return TCONF if driver dummy not present
@ 2020-12-01 13:43 Kory Maincent
2020-12-01 18:04 ` Petr Vorel
0 siblings, 1 reply; 2+ messages in thread
From: Kory Maincent @ 2020-12-01 13:43 UTC (permalink / raw)
To: ltp
Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
---
Changes since v1:
- Use TST_NEEDS_DRIVERS
- Test ip4_addr before clean to avoid empty grep
testcases/network/iproute/ip_tests.sh | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/testcases/network/iproute/ip_tests.sh b/testcases/network/iproute/ip_tests.sh
index 41c515696..13722afb9 100755
--- a/testcases/network/iproute/ip_tests.sh
+++ b/testcases/network/iproute/ip_tests.sh
@@ -13,6 +13,7 @@ TST_CLEANUP="cleanup"
TST_NEEDS_TMPDIR=1
TST_NEEDS_ROOT=1
TST_NEEDS_CMDS="cat awk diff"
+TST_NEEDS_DRIVERS="dummy"
. tst_net.sh
@@ -51,7 +52,7 @@ cleanup()
[ "$rm_dummy" ] && modprobe -r dummy
# test #5
- ip route show | grep $ip4_addr && ip route del $ip4_addr
+ [ "$ip4_addr" ] && ip route show | grep $ip4_addr && ip route del $ip4_addr
}
test1()
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [LTP] [PATCH v2] net/ip_tests: Return TCONF if driver dummy not present
2020-12-01 13:43 [LTP] [PATCH v2] net/ip_tests: Return TCONF if driver dummy not present Kory Maincent
@ 2020-12-01 18:04 ` Petr Vorel
0 siblings, 0 replies; 2+ messages in thread
From: Petr Vorel @ 2020-12-01 18:04 UTC (permalink / raw)
To: ltp
Hi Kory, Alexey,
...
> # test #5
> - ip route show | grep $ip4_addr && ip route del $ip4_addr
> + [ "$ip4_addr" ] && ip route show | grep $ip4_addr && ip route del $ip4_addr
Added -q to grep and merged.
Thanks for your patch!
Alexey, thanks for review!
Kind regards,
Petr
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-12-01 18:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-01 13:43 [LTP] [PATCH v2] net/ip_tests: Return TCONF if driver dummy not present Kory Maincent
2020-12-01 18:04 ` Petr Vorel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox