2021-12-07 07:08:00

by Zhou, Jie2X

[permalink] [raw]
Subject: selftests/net/fcnal-test.sh: ipv6_ping test failed

hi,

I test ipv6_ping by "./fcnal-test.sh -v -t ipv6_ping".
There are two tests failed.

TEST: ping out, VRF bind - ns-B IPv6 LLA [FAIL]
TEST: ping out, VRF bind - multicast IP [FAIL]

While in fcnal-test.sh the expected command result is 2, the result is 1, so the test failed.
ipv6_ping_vrf()
{
......
for a in ${NSB_LINKIP6}%${VRF} ${MCAST}%${VRF}
do
log_start
show_hint "Fails since VRF device does not support linklocal or multicast"
run_cmd ${ping6} -c1 -w1 ${a}
log_test_addr ${a} $? 2 "ping out, VRF bind"
done

The ipv6_ping test output is attached.
Did I set something wrong result that these tests failed?

best regards,


Attachments:
ipv6_ping.txt (28.98 kB)
ipv6_ping.txt

2021-12-07 15:58:15

by Jakub Kicinski

[permalink] [raw]
Subject: Re: selftests/net/fcnal-test.sh: ipv6_ping test failed

Adding David and Zhijian.

On Tue, 7 Dec 2021 07:07:40 +0000 Zhou, Jie2X wrote:
> hi,
>
> I test ipv6_ping by "./fcnal-test.sh -v -t ipv6_ping".
> There are two tests failed.
>
> TEST: ping out, VRF bind - ns-B IPv6 LLA [FAIL]
> TEST: ping out, VRF bind - multicast IP [FAIL]
>
> While in fcnal-test.sh the expected command result is 2, the result is 1, so the test failed.
> ipv6_ping_vrf()
> {
> ......
> for a in ${NSB_LINKIP6}%${VRF} ${MCAST}%${VRF}
> do
> log_start
> show_hint "Fails since VRF device does not support linklocal or multicast"
> run_cmd ${ping6} -c1 -w1 ${a}
> log_test_addr ${a} $? 2 "ping out, VRF bind"
> done
>
> The ipv6_ping test output is attached.
> Did I set something wrong result that these tests failed?
>
> best regards,

2021-12-08 03:20:12

by David Ahern

[permalink] [raw]
Subject: Re: selftests/net/fcnal-test.sh: ipv6_ping test failed

On 12/7/21 8:58 AM, Jakub Kicinski wrote:
> Adding David and Zhijian.
>
> On Tue, 7 Dec 2021 07:07:40 +0000 Zhou, Jie2X wrote:
>> hi,
>>
>> I test ipv6_ping by "./fcnal-test.sh -v -t ipv6_ping".
>> There are two tests failed.
>>
>> TEST: ping out, VRF bind - ns-B IPv6 LLA [FAIL]
>> TEST: ping out, VRF bind - multicast IP [FAIL]
>>
>> While in fcnal-test.sh the expected command result is 2, the result is 1, so the test failed.
>> ipv6_ping_vrf()
>> {
>> ......
>> for a in ${NSB_LINKIP6}%${VRF} ${MCAST}%${VRF}
>> do
>> log_start
>> show_hint "Fails since VRF device does not support linklocal or multicast"
>> run_cmd ${ping6} -c1 -w1 ${a}
>> log_test_addr ${a} $? 2 "ping out, VRF bind"
>> done
>>
>> The ipv6_ping test output is attached.
>> Did I set something wrong result that these tests failed?
>>
>> best regards,

ping6 is failing as it should. Can you send a patch to change the
expected rc from 2 to 1?

2021-12-08 03:50:47

by Zhou, Jie2X

[permalink] [raw]
Subject: Re: selftests/net/fcnal-test.sh: ipv6_ping test failed

hi,

man ip, the output about exit value is like following.
"Exit status is 0 if command was successful, and 1 if there is a syntax error. If an error was reported by the kernel exit status is 2."
Did the following COMMAND have syntax error? If not, should I still change the expected rc from 2 to 1?

#######################################################
HINT: Fails since VRF device does not support linklocal or multicast

COMMAND: ip netns exec ns-A /bin/ping6 -c1 -w1 fe80::7c4c:bcff:fe66:a63a%red
ping: sendmsg: Network is unreachable
PING fe80::7c4c:bcff:fe66:a63a%red(fe80::7c4c:bcff:fe66:a63a%red) 56 data bytes

--- fe80::7c4c:bcff:fe66:a63a%red ping statistics ---
1 packets transmitted, 0 received, 100% packet loss, time 0ms

TEST: ping out, VRF bind - ns-B IPv6 LLA [FAIL]

#######################################################
HINT: Fails since VRF device does not support linklocal or multicast

COMMAND: ip netns exec ns-A /bin/ping6 -c1 -w1 ff02::1%red
ping: sendmsg: Network is unreachable
PING ff02::1%red(ff02::1%red) 56 data bytes

--- ff02::1%red ping statistics ---
1 packets transmitted, 0 received, 100% packet loss, time 0ms

TEST: ping out, VRF bind - multicast IP [FAIL]

#######################################################

best regards,

________________________________________
From: David Ahern <[email protected]>
Sent: Wednesday, December 8, 2021 11:20 AM
To: Jakub Kicinski; [email protected]
Cc: Zhou, Jie2X; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Li, Philip; lkp; Ma, XinjianX; Li, ZhijianX
Subject: Re: selftests/net/fcnal-test.sh: ipv6_ping test failed

On 12/7/21 8:58 AM, Jakub Kicinski wrote:
> Adding David and Zhijian.
>
> On Tue, 7 Dec 2021 07:07:40 +0000 Zhou, Jie2X wrote:
>> hi,
>>
>> I test ipv6_ping by "./fcnal-test.sh -v -t ipv6_ping".
>> There are two tests failed.
>>
>> TEST: ping out, VRF bind - ns-B IPv6 LLA [FAIL]
>> TEST: ping out, VRF bind - multicast IP [FAIL]
>>
>> While in fcnal-test.sh the expected command result is 2, the result is 1, so the test failed.
>> ipv6_ping_vrf()
>> {
>> ......
>> for a in ${NSB_LINKIP6}%${VRF} ${MCAST}%${VRF}
>> do
>> log_start
>> show_hint "Fails since VRF device does not support linklocal or multicast"
>> run_cmd ${ping6} -c1 -w1 ${a}
>> log_test_addr ${a} $? 2 "ping out, VRF bind"
>> done
>>
>> The ipv6_ping test output is attached.
>> Did I set something wrong result that these tests failed?
>>
>> best regards,

ping6 is failing as it should. Can you send a patch to change the
expected rc from 2 to 1?

2021-12-08 03:54:47

by David Ahern

[permalink] [raw]
Subject: Re: selftests/net/fcnal-test.sh: ipv6_ping test failed

On 12/7/21 8:50 PM, Zhou, Jie2X wrote:
> hi,
>
> man ip, the output about exit value is like following.
> "Exit status is 0 if command was successful, and 1 if there is a syntax error. If an error was reported by the kernel exit status is 2."
> Did the following COMMAND have syntax error? If not, should I still change the expected rc from 2 to 1?

strace of ping6 shows it is failing with '1'.

As for 'ip', it returns the exit code of the command run. iproute2 code,
lib/exec.c, cmd_exec().