All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 1/1] network/mc_cmds: Use TINFO when error is caused by old version of ip command
Date: Thu, 18 May 2017 16:36:56 +0200	[thread overview]
Message-ID: <20170518143656.2348-1-pvorel@suse.cz> (raw)

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


             reply	other threads:[~2017-05-18 14:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-18 14:36 Petr Vorel [this message]
2017-05-29 14:42 ` [LTP] [PATCH 1/1] network/mc_cmds: Use TINFO when error is caused by old version of ip command Alexey Kodanev
2017-06-01  6:33   ` Petr Vorel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170518143656.2348-1-pvorel@suse.cz \
    --to=pvorel@suse.cz \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.