public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH] netns, when test ipv6 the parent and child can not ping each other successfully
@ 2015-07-08  9:42 Changsheng Liu
  2015-08-05 12:03 ` Cyril Hrubis
  0 siblings, 1 reply; 2+ messages in thread
From: Changsheng Liu @ 2015-07-08  9:42 UTC (permalink / raw)
  To: ltp-list; +Cc: wunan

After the cmd "ping6 -I",
we add "sleep 1" then parent and child can ping each other successfully

Signed-off-by: xiaofeng.yan <yanxiaofeng@inspur.com>
Signed-off-by: Changsheng Liu <liuchangsheng@inspur.com>
---
 testcases/kernel/containers/netns/netns_childipv6.sh | 1 +
 testcases/kernel/containers/netns/netns_paripv6.sh   | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/testcases/kernel/containers/netns/netns_childipv6.sh b/testcases/kernel/containers/netns/netns_childipv6.sh
index f41dcc2..04a8e08 100755
--- a/testcases/kernel/containers/netns/netns_childipv6.sh
+++ b/testcases/kernel/containers/netns/netns_childipv6.sh
@@ -83,6 +83,7 @@ status=0
 
     # checking if parent ns responding
     ping6 -I $vnet1 -qc 2 $parIPv6 >/dev/null 2>&1
+    sleep 1
            if [ $? = 0 ] ; then
                tst_resm TINFO "IPv6: Pinging Parent from Child: PASS"
             else
diff --git a/testcases/kernel/containers/netns/netns_paripv6.sh b/testcases/kernel/containers/netns/netns_paripv6.sh
index 6d2f48d..9efd0aa 100755
--- a/testcases/kernel/containers/netns/netns_paripv6.sh
+++ b/testcases/kernel/containers/netns/netns_paripv6.sh
@@ -89,7 +89,7 @@ status=0
         tst_brkm TBROK "timeout reached!"
     fi
     ping6 -I $vnet0 -qc 2 $childIPv6 >/dev/null 2>&1
-
+    sleep 1
     if [ $? = 0 ] ; then
        tst_resm TINFO "IPv6: Pinging child from parent: PASS"
        status=0
-- 
1.9.1



------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [LTP] [PATCH] netns, when test ipv6 the parent and child can not ping each other successfully
  2015-07-08  9:42 [LTP] [PATCH] netns, when test ipv6 the parent and child can not ping each other successfully Changsheng Liu
@ 2015-08-05 12:03 ` Cyril Hrubis
  0 siblings, 0 replies; 2+ messages in thread
From: Cyril Hrubis @ 2015-08-05 12:03 UTC (permalink / raw)
  To: Changsheng Liu; +Cc: ltp-list, wunan

Hi!
> @@ -89,7 +89,7 @@ status=0
>          tst_brkm TBROK "timeout reached!"
>      fi
>      ping6 -I $vnet0 -qc 2 $childIPv6 >/dev/null 2>&1
> -
> +    sleep 1
>      if [ $? = 0 ] ; then
>         tst_resm TINFO "IPv6: Pinging child from parent: PASS"
>         status=0

This is obviously wrong. Because the $? in the if will correspond to the
return value from the sleep 1 and not from the ping.

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-08-05 12:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-08  9:42 [LTP] [PATCH] netns, when test ipv6 the parent and child can not ping each other successfully Changsheng Liu
2015-08-05 12:03 ` Cyril Hrubis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox