* [LTP] [PATCH 1/1] network/mc_cmds: Use TINFO when error is caused by old version of ip command
@ 2017-05-18 14:36 Petr Vorel
2017-05-29 14:42 ` Alexey Kodanev
0 siblings, 1 reply; 3+ messages in thread
From: Petr Vorel @ 2017-05-18 14:36 UTC (permalink / raw)
To: ltp
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
testcases/network/multicast/mc_cmds/mc_cmds | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/testcases/network/multicast/mc_cmds/mc_cmds b/testcases/network/multicast/mc_cmds/mc_cmds
index 8077b1f15..d798bdf0a 100755
--- a/testcases/network/multicast/mc_cmds/mc_cmds
+++ b/testcases/network/multicast/mc_cmds/mc_cmds
@@ -46,13 +46,19 @@ setup()
do_test()
{
+ local ip_fixed_version=170220
+
ip addr show $(tst_iface) | grep -q 'MULTICAST' || \
tst_brkm TFAIL "Multicast not listed for $(tst_iface)"
ip maddr show $(tst_iface) | grep -q '224.0.0.1'
if [ $? -ne 0 ]; then
- tst_resm TWARN "'ip maddr show $(tst_iface)' failed," \
- " parsing 'ip maddr show'"
+ [ `ip -V | cut -d's' -f3` -lt $ip_fixed_version ] && \
+ tst_resm TINFO "'ip maddr show $(tst_iface)' failed "\
+ "(caused by old ip command version, fixed in"\
+ "$ip_fixed_version), parsing 'ip maddr show'" || \
+ tst_resm TWARN "'ip maddr show $(tst_iface)' failed,"\
+ "parsing 'ip maddr show'"
ip maddr show | sed -ne "/\s$(tst_iface)/,/^[0-9]/p" | \
grep -q 224.0.0.1 || \
tst_brkm TFAIL "$(tst_iface) not joined 224.0.0.1"
--
2.12.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-06-01 6:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-18 14:36 [LTP] [PATCH 1/1] network/mc_cmds: Use TINFO when error is caused by old version of ip command Petr Vorel
2017-05-29 14:42 ` Alexey Kodanev
2017-06-01 6:33 ` Petr Vorel
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.