Skip to contentSkip to conversation

network/mc_cmds: fix testing with iproute2 <= ss161212

PATCH New Petr Vorel 3 participants 5 messages Jan 18, 2017 – Jan 24, 2017

lore
Share & tools
lore

Petr Vorel

author
#0 lore raw

PATCH v2 1/1 network/mc_cmds: fix testing with iproute2 <= ss161212

Workaround for an upstream bug in ip:
https://bugzilla.kernel.org/show_bug.cgi?id=192741

+ add whitespace in log

---
* v1->v2: omit tail

---
 testcases/network/multicast/mc_cmds/mc_cmds | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
testcases/network/multicast/mc_cmds/mc_cmds +7 -3
index 62f9e9197..cc6a8e39d 100755
@@ -50,12 +50,16 @@ do_test()
 	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' || \
-		tst_brkm TFAIL "all-host-group for $(tst_iface) not joined"
+	ip maddr show $(tst_iface) | grep -q '224.0.0.1'
+	if [ $? -ne 0 ]; then
+		tst_resm TINFO "ip failed to detect multicast, parsing /proc/net/igmp"
+		grep "$(tst_iface)\s*:" -A 1 /proc/net/igmp | grep -q '\s010000E0\s' || \
+			tst_brkm TFAIL "all-host-group for $(tst_iface) not joined"
+	fi
 
 	# Do the ping tests: Execute ping 224.0.0.1 - Verify that the proper
 	# number of responses are returned.
-	tst_resm TINFO "Ping all-host-groups address(over default route!)"
+	tst_resm TINFO "Ping all-host-groups address (over default route!)"
 	ping -c2 224.0.0.1 > ping_out.log || \
 		tst_brkm TFAIL "No response from MC hosts to ping 224.0.0.1"
 
Signature · 1 line
2.11.0
#1 lore raw

PATCH v2 1/1 network/mc_cmds: fix testing with iproute2 <= ss161212

Hi Petr,

Quoted 2 lines · Petr Vorel

Workaround for an upstream bug in ip:
https://bugzilla.kernel.org/show_bug.cgi?id=192741

Applied, also added TWARN flag to tst_resm and reverted the change with the missing white-space (in subsequent patch removed that section).

Thanks,
Alexey

author
#3 lore raw

PATCH v2 1/1 network/mc_cmds: fix testing with iproute2 <= ss161212

Hi,

Quoted 6 lines
Quoted 2 lines

Workaround for an upstream bug in ip:
https://bugzilla.kernel.org/show_bug.cgi?id=192741

I wonder if we should write a regression test for the ip as well. I guess that some basic ip testsuite under testcases/commands/ wouldn't hurt either.

I agree for the need of ip regression tests. If you don't mind I'd like to write this one.

Kind regards,
Petr

#4 lore raw

PATCH v2 1/1 network/mc_cmds: fix testing with iproute2 <= ss161212

Hi!

Quoted 5 lines
Quoted 3 lines

I wonder if we should write a regression test for the ip as well. I guess that some basic ip testsuite under testcases/commands/ wouldn't hurt either.

I agree for the need of ip regression tests. If you don't mind I'd like to write this one.

Go ahead :-)

Signature · 2 lines
Cyril Hrubis
[email protected]