Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Mar 2015 04:06:37 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r280837 - head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip
Message-ID:  <201503300406.t2U46bgF031361@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: markj
Date: Mon Mar 30 04:06:36 2015
New Revision: 280837
URL: https://svnweb.freebsd.org/changeset/base/280837

Log:
  Fix ping(8) and ping6(8) usage in a couple of ip provider tests, and
  update expected test output to reflect differences in default TTL and
  payload length.
  
  MFC after:	1 week

Modified:
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localicmp.ksh
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localicmp.ksh.out
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv6localicmp.ksh
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv6localicmp.ksh.out

Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localicmp.ksh
==============================================================================
--- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localicmp.ksh	Mon Mar 30 04:03:01 2015	(r280836)
+++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localicmp.ksh	Mon Mar 30 04:06:36 2015	(r280837)
@@ -45,12 +45,13 @@ fi
 dtrace=$1
 local=127.0.0.1
 
-$dtrace -c "/sbin/ping $local 3" -qs /dev/stdin <<EOF | sort -n
+$dtrace -c "/sbin/ping -q -c 1 -t 3 $local" -qs /dev/stdin <<EOF | sort -n | \
+    grep -v -e '^round-trip ' -e '^--- '
 ip:::send
 /args[2]->ip_saddr == "$local" && args[2]->ip_daddr == "$local" &&
     args[4]->ipv4_protocol == IPPROTO_ICMP/
 {
-	printf("1 ip:::send    (");
+	printf("2 ip:::send    (");
 	printf("args[2]: %d %d, ", args[2]->ip_ver, args[2]->ip_plength);
 	printf("args[4]: %d %d %d %d %d)\n",
 	    args[4]->ipv4_ver, args[4]->ipv4_length, args[4]->ipv4_flags,
@@ -61,7 +62,7 @@ ip:::receive
 /args[2]->ip_saddr == "$local" && args[2]->ip_daddr == "$local" &&
     args[4]->ipv4_protocol == IPPROTO_ICMP/
 {
-	printf("2 ip:::receive (");
+	printf("3 ip:::receive (");
 	printf("args[2]: %d %d, ", args[2]->ip_ver, args[2]->ip_plength);
 	printf("args[4]: %d %d %d %d %d)\n",
 	    args[4]->ipv4_ver, args[4]->ipv4_length, args[4]->ipv4_flags,

Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localicmp.ksh.out
==============================================================================
--- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localicmp.ksh.out	Mon Mar 30 04:03:01 2015	(r280836)
+++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localicmp.ksh.out	Mon Mar 30 04:06:36 2015	(r280837)
@@ -1,6 +1,8 @@
 
-1 ip:::send    (args[2]: 4 64, args[4]: 4 84 0 0 255)
-1 ip:::send    (args[2]: 4 64, args[4]: 4 84 0 0 255)
-2 ip:::receive (args[2]: 4 64, args[4]: 4 84 0 0 255)
-2 ip:::receive (args[2]: 4 64, args[4]: 4 84 0 0 255)
-127.0.0.1 is alive
+
+PING 127.0.0.1 (127.0.0.1): 56 data bytes
+1 packets transmitted, 1 packets received, 0.0% packet loss
+2 ip:::send    (args[2]: 4 64, args[4]: 4 84 0 0 64)
+2 ip:::send    (args[2]: 4 64, args[4]: 4 84 0 0 64)
+3 ip:::receive (args[2]: 4 64, args[4]: 4 84 0 0 64)
+3 ip:::receive (args[2]: 4 64, args[4]: 4 84 0 0 64)

Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv6localicmp.ksh
==============================================================================
--- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv6localicmp.ksh	Mon Mar 30 04:03:01 2015	(r280836)
+++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv6localicmp.ksh	Mon Mar 30 04:06:36 2015	(r280837)
@@ -55,12 +55,13 @@ else
 	removeinet6=0
 fi
 
-$dtrace -c "/sbin/ping -A inet6 $local 3" -qs /dev/stdin <<EOF | sort -n
+$dtrace -c "/sbin/ping6 -q -c 1 -X 3 $local" -qs /dev/stdin <<EOF | sort -n | \
+    grep -v -e '^round-trip ' -e '^--- '
 ip:::send
 /args[2]->ip_saddr == "$local" && args[2]->ip_daddr == "$local" &&
     args[5]->ipv6_nexthdr == IPPROTO_ICMPV6/
 {
-	printf("1 ip:::send    (");
+	printf("2 ip:::send    (");
 	printf("args[2]: %d %d, ", args[2]->ip_ver, args[2]->ip_plength);
 	printf("args[5]: %d %d %d)\n",
 	    args[5]->ipv6_ver, args[5]->ipv6_tclass, args[5]->ipv6_plen);
@@ -70,7 +71,7 @@ ip:::receive
 /args[2]->ip_saddr == "$local" && args[2]->ip_daddr == "$local" &&
     args[5]->ipv6_nexthdr == IPPROTO_ICMPV6/
 {
-	printf("2 ip:::receive (");
+	printf("3 ip:::receive (");
 	printf("args[2]: %d %d, ", args[2]->ip_ver, args[2]->ip_plength);
 	printf("args[5]: %d %d %d)\n",
 	    args[5]->ipv6_ver, args[5]->ipv6_tclass, args[5]->ipv6_plen);

Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv6localicmp.ksh.out
==============================================================================
--- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv6localicmp.ksh.out	Mon Mar 30 04:03:01 2015	(r280836)
+++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv6localicmp.ksh.out	Mon Mar 30 04:06:36 2015	(r280837)
@@ -1,6 +1,8 @@
 
-::1 is alive
-1 ip:::send    (args[2]: 6 64, args[5]: 6 0 64)
-1 ip:::send    (args[2]: 6 64, args[5]: 6 0 64)
-2 ip:::receive (args[2]: 6 64, args[5]: 6 0 64)
-2 ip:::receive (args[2]: 6 64, args[5]: 6 0 64)
+
+PING6(56=40+8+8 bytes) ::1 --> ::1
+1 packets transmitted, 1 packets received, 0.0% packet loss
+2 ip:::send    (args[2]: 6 16, args[5]: 6 0 16)
+2 ip:::send    (args[2]: 6 16, args[5]: 6 0 16)
+3 ip:::receive (args[2]: 6 16, args[5]: 6 0 16)
+3 ip:::receive (args[2]: 6 16, args[5]: 6 0 16)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201503300406.t2U46bgF031361>