Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Mar 2015 04:03:02 +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: r280836 - head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs
Message-ID:  <201503300403.t2U432WG030890@svn.freebsd.org>

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

Log:
  Fix ping(8) usage in funcs/tst.system.d so that the test actually completes.
  
  MFC after:	1 week

Modified:
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.system.d
  head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.system.d.out

Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.system.d
==============================================================================
--- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.system.d	Mon Mar 30 04:01:49 2015	(r280835)
+++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.system.d	Mon Mar 30 04:03:01 2015	(r280836)
@@ -35,11 +35,11 @@ BEGIN
 	this->b = -2;
 
 	system("echo %s %d %d", "foo", this->a, this->b);
-	system("ping localhost");
+	system("ping -q -c 1 localhost 2>/dev/null | grep -v '^round-trip '");
 	system("echo %d", ++this->a);
-	system("ping localhost");
+	system("ping -q -c 1 localhost 2>/dev/null | grep -v '^round-trip '");
 	system("echo %d", ++this->a);
-	system("ping localhost");
+	system("ping -q -c 1 localhost 2>/dev/null | grep -v '^round-trip '");
 	system("echo %d", ++this->a);
 	exit(0);
 }

Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.system.d.out
==============================================================================
--- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.system.d.out	Mon Mar 30 04:01:49 2015	(r280835)
+++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.system.d.out	Mon Mar 30 04:03:01 2015	(r280836)
@@ -1,8 +1,17 @@
 foo 9 -2
-localhost is alive
+PING localhost (127.0.0.1): 56 data bytes
+
+--- localhost ping statistics ---
+1 packets transmitted, 1 packets received, 0.0% packet loss
 10
-localhost is alive
+PING localhost (127.0.0.1): 56 data bytes
+
+--- localhost ping statistics ---
+1 packets transmitted, 1 packets received, 0.0% packet loss
 11
-localhost is alive
+PING localhost (127.0.0.1): 56 data bytes
+
+--- localhost ping statistics ---
+1 packets transmitted, 1 packets received, 0.0% packet loss
 12
 



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