* [LTP] [PATCH v2 1/1] ipneigh01.sh: Add workaround for ARP timeout
@ 2023-09-22 15:55 Petr Vorel
2023-11-23 10:59 ` Richard Palethorpe
0 siblings, 1 reply; 2+ messages in thread
From: Petr Vorel @ 2023-09-22 15:55 UTC (permalink / raw)
To: ltp; +Cc: Xu Senmiao
From: Xu Senmiao <xusenmiao@huawei.com>
When the ARP status of the rhost is stale,
lhost ping rhost and the lhost deletes the ARP record,
the record in the rhost changes from stale to delay.
Then, the probe request is sent to the lhost, and the lhost ARP
information is updated.
rhost(10.0.0.1) lhost(10.0.0.2)
t1 10.0.0.2 STALE ping 10.0.0.1
10.0.0.1 REACHABLE
arp -d 10.0.0.1
t2 10.0.0.2 DELAY
t3 probe 10.0.0.2
t4 10.0.0.1 REACHABLE
Clear the ARP entries of rhost before each round of test.
This fixes an issue where ipneigh01_arp fail due to ARP timeout.
Signed-off-by: Xu Senmiao <xusenmiao@huawei.com>
[ pvorel: use $DEL_CMD ]
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
Changes v1->v2:
* Using DEL_CMD to fix working on system without arp installed.
Xu, can you confirm that it fixes your problem?
Also, do you have this problem also on IPv6?
Could you test both arp and ip?
Also, do you have any idea why rhost get stale?
Kind regards,
Petr
testcases/network/tcp_cmds/ipneigh/ipneigh01.sh | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/testcases/network/tcp_cmds/ipneigh/ipneigh01.sh b/testcases/network/tcp_cmds/ipneigh/ipneigh01.sh
index e67ff5cc8..f37241d49 100755
--- a/testcases/network/tcp_cmds/ipneigh/ipneigh01.sh
+++ b/testcases/network/tcp_cmds/ipneigh/ipneigh01.sh
@@ -19,14 +19,14 @@ do_setup()
case $CMD in
ip)
SHOW_CMD="ip neigh show"
- DEL_CMD="ROD ip neigh del $(tst_ipaddr rhost) dev $(tst_iface)"
+ DEL_CMD="ip neigh del $(tst_ipaddr rhost) dev $(tst_iface)"
;;
arp)
if [ -n "$TST_IPV6" ]; then
tst_brk TCONF "'arp' doesn't support IPv6"
fi
SHOW_CMD="arp -an"
- DEL_CMD="ROD arp -d $(tst_ipaddr rhost) -i $(tst_iface)"
+ DEL_CMD="arp -d $(tst_ipaddr rhost) -i $(tst_iface)"
;;
*)
tst_brk TBROK "unknown or missing command, use -c [ arp | ip ]"
@@ -56,6 +56,7 @@ do_test()
tst_res TINFO "stress auto-creation $entry_name cache entry deleted with '$CMD' $NUMLOOPS times"
for i in $(seq 1 $NUMLOOPS); do
+ $DEL_CMD
ping$TST_IPV6 -q -c1 $(tst_ipaddr rhost) -I $(tst_iface) > /dev/null || \
tst_brk TFAIL "cannot ping $(tst_ipaddr rhost)"
@@ -74,7 +75,7 @@ do_test()
[ "$ret" -ne 0 ] && \
tst_brk TFAIL "$entry_name entry '$(tst_ipaddr rhost)' not listed"
- $DEL_CMD
+ ROD $DEL_CMD
$SHOW_CMD | grep -q "$(tst_ipaddr rhost).*$(tst_hwaddr rhost)" && \
tst_brk TFAIL "'$DEL_CMD' failed, entry has " \
--
2.40.1
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [LTP] [PATCH v2 1/1] ipneigh01.sh: Add workaround for ARP timeout
2023-09-22 15:55 [LTP] [PATCH v2 1/1] ipneigh01.sh: Add workaround for ARP timeout Petr Vorel
@ 2023-11-23 10:59 ` Richard Palethorpe
0 siblings, 0 replies; 2+ messages in thread
From: Richard Palethorpe @ 2023-11-23 10:59 UTC (permalink / raw)
To: Petr Vorel; +Cc: ltp, Xu Senmiao
Hello
Petr Vorel <pvorel@suse.cz> writes:
> From: Xu Senmiao <xusenmiao@huawei.com>
>
> When the ARP status of the rhost is stale,
> lhost ping rhost and the lhost deletes the ARP record,
> the record in the rhost changes from stale to delay.
>
> Then, the probe request is sent to the lhost, and the lhost ARP
> information is updated.
>
> rhost(10.0.0.1) lhost(10.0.0.2)
> t1 10.0.0.2 STALE ping 10.0.0.1
> 10.0.0.1 REACHABLE
> arp -d 10.0.0.1
> t2 10.0.0.2 DELAY
> t3 probe 10.0.0.2
> t4 10.0.0.1 REACHABLE
>
> Clear the ARP entries of rhost before each round of test.
> This fixes an issue where ipneigh01_arp fail due to ARP timeout.
>
> Signed-off-by: Xu Senmiao <xusenmiao@huawei.com>
> [ pvorel: use $DEL_CMD ]
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
> ---
> Changes v1->v2:
> * Using DEL_CMD to fix working on system without arp installed.
>
> Xu, can you confirm that it fixes your problem?
> Also, do you have this problem also on IPv6?
> Could you test both arp and ip?
> Also, do you have any idea why rhost get stale?
We need an answer to why the rhost is stale before merging this. It's
not clear that there is a test bug.
I will set this to changes requested in patchwork.
>
> Kind regards,
> Petr
>
> testcases/network/tcp_cmds/ipneigh/ipneigh01.sh | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/testcases/network/tcp_cmds/ipneigh/ipneigh01.sh b/testcases/network/tcp_cmds/ipneigh/ipneigh01.sh
> index e67ff5cc8..f37241d49 100755
> --- a/testcases/network/tcp_cmds/ipneigh/ipneigh01.sh
> +++ b/testcases/network/tcp_cmds/ipneigh/ipneigh01.sh
> @@ -19,14 +19,14 @@ do_setup()
> case $CMD in
> ip)
> SHOW_CMD="ip neigh show"
> - DEL_CMD="ROD ip neigh del $(tst_ipaddr rhost) dev $(tst_iface)"
> + DEL_CMD="ip neigh del $(tst_ipaddr rhost) dev $(tst_iface)"
> ;;
> arp)
> if [ -n "$TST_IPV6" ]; then
> tst_brk TCONF "'arp' doesn't support IPv6"
> fi
> SHOW_CMD="arp -an"
> - DEL_CMD="ROD arp -d $(tst_ipaddr rhost) -i $(tst_iface)"
> + DEL_CMD="arp -d $(tst_ipaddr rhost) -i $(tst_iface)"
> ;;
> *)
> tst_brk TBROK "unknown or missing command, use -c [ arp | ip ]"
> @@ -56,6 +56,7 @@ do_test()
> tst_res TINFO "stress auto-creation $entry_name cache entry deleted with '$CMD' $NUMLOOPS times"
>
> for i in $(seq 1 $NUMLOOPS); do
> + $DEL_CMD
>
> ping$TST_IPV6 -q -c1 $(tst_ipaddr rhost) -I $(tst_iface) > /dev/null || \
> tst_brk TFAIL "cannot ping $(tst_ipaddr rhost)"
> @@ -74,7 +75,7 @@ do_test()
> [ "$ret" -ne 0 ] && \
> tst_brk TFAIL "$entry_name entry '$(tst_ipaddr rhost)' not listed"
>
> - $DEL_CMD
> + ROD $DEL_CMD
>
> $SHOW_CMD | grep -q "$(tst_ipaddr rhost).*$(tst_hwaddr rhost)" && \
> tst_brk TFAIL "'$DEL_CMD' failed, entry has " \
> --
> 2.40.1
--
Thank you,
Richard.
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-11-23 15:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-22 15:55 [LTP] [PATCH v2 1/1] ipneigh01.sh: Add workaround for ARP timeout Petr Vorel
2023-11-23 10:59 ` Richard Palethorpe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox