Module Name:    src
Committed By:   ozaki-r
Date:           Fri Sep 16 00:14:33 UTC 2016

Modified Files:
        src/tests/net/ndp: t_dad.sh

Log Message:
Adjust for new ifconfig output

And use -o match to provide informative error messages.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/net/ndp/t_dad.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/net/ndp/t_dad.sh
diff -u src/tests/net/ndp/t_dad.sh:1.5 src/tests/net/ndp/t_dad.sh:1.6
--- src/tests/net/ndp/t_dad.sh:1.5	Wed Aug 10 23:07:57 2016
+++ src/tests/net/ndp/t_dad.sh	Fri Sep 16 00:14:33 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: t_dad.sh,v 1.5 2016/08/10 23:07:57 kre Exp $
+#	$NetBSD: t_dad.sh,v 1.6 2016/09/16 00:14:33 ozaki-r Exp $
 #
 # Copyright (c) 2015 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -180,7 +180,8 @@ dad_duplicated_body()
 	export RUMP_SERVER=$SOCKLOCAL
 
 	# The primary address isn't marked as duplicated
-	atf_check -s not-exit:0 -x "rump.ifconfig shmif0 |grep $localip1 |grep -q duplicated"
+	atf_check -s exit:0 -o not-match:'DUPLICATED' \
+	    -x "rump.ifconfig shmif0 |grep $localip1"
 
 	#
 	# Add a new address duplicated with the peer server
@@ -189,12 +190,14 @@ dad_duplicated_body()
 	atf_check -s exit:0 sleep 1
 
 	# The new address is marked as duplicated
-	atf_check -s exit:0 -x "rump.ifconfig shmif0 |grep $peerip |grep -q duplicated"
+	atf_check -s exit:0 -o match:'DUPLICATED' \
+	    -x "rump.ifconfig shmif0 |grep $peerip"
 
 	# A unique address isn't marked as duplicated
 	atf_check -s exit:0 rump.ifconfig shmif0 inet6 $localip2
 	atf_check -s exit:0 sleep 1
-	atf_check -s not-exit:0 -x "rump.ifconfig shmif0 |grep $localip2 |grep -q duplicated"
+	atf_check -s exit:0 -o not-match:'DUPLICATED' \
+	    -x "rump.ifconfig shmif0 |grep $localip2"
 }
 
 cleanup()

Reply via email to