Page MenuHomeFreeBSD

D16268.id45281.diff
No OneTemporary

D16268.id45281.diff

Index: cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localudp.ksh
===================================================================
--- cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localudp.ksh
+++ cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localudp.ksh
@@ -1,4 +1,4 @@
-#!/usr/bin/ksh
+#!/usr/bin/env ksh
#
# CDDL HEADER START
#
@@ -36,14 +36,14 @@
# 4. An unlikely race causes the unlocked global send/receive
# variables to be corrupted.
#
-# This test sends a UDP message using ping and checks that at least the
+# This test sends a UDP message using perl and checks that at least the
# following counts were traced:
#
-# 1 x ip:::send (UDP sent to ping's base UDP port)
-# 1 x udp:::send (UDP sent to ping's base UDP port)
+# 1 x ip:::send (UDP sent to UDP port 33434)
+# 1 x udp:::send (UDP sent to UDP port 33434)
# 1 x ip:::receive (UDP received)
#
-# No udp:::receive event is expected as the response ping -U elicits is
+# No udp:::receive event is expected since the UDP packet elicts
# an ICMP PORT_UNREACHABLE response rather than a UDP packet, and locally
# the echo request UDP packet only reaches IP, so the udp:::receive probe
# is not triggered by it.
@@ -56,8 +56,21 @@
dtrace=$1
local=127.0.0.1
+port=33434
-$dtrace -c "/sbin/ping -U $local" -qs /dev/stdin <<EOF | grep -v 'is alive'
+cat > test.pl <<-EOPERL
+ use IO::Socket;
+ my \$s = IO::Socket::INET->new(
+ Proto => "udp",
+ PeerAddr => "$local",
+ PeerPort => $port);
+ die "Could not create UDP socket $local port $port" unless \$s;
+ send \$s, "Hello", 0;
+ close \$s;
+ sleep(2);
+EOPERL
+
+$dtrace -c 'perl test.pl' -qs /dev/stdin <<EOF
BEGIN
{
ipsend = udpsend = ipreceive = 0;
Index: cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4remoteudp.ksh
===================================================================
--- cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4remoteudp.ksh
+++ cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4remoteudp.ksh
@@ -1,4 +1,4 @@
-#!/usr/bin/ksh
+#!/usr/bin/env ksh93
#
# CDDL HEADER START
#
@@ -36,7 +36,7 @@
# 4. An unlikely race causes the unlocked global send/receive
# variables to be corrupted.
#
-# This test sends a UDP message using ping and checks that at least the
+# This test sends a UDP message using perl and checks that at least the
# following counts were traced:
#
# 1 x ip:::send (UDP sent to ping's base UDP port)
@@ -49,6 +49,7 @@
fi
dtrace=$1
+port=33434
getaddr=./get.ipv4remote.pl
if [[ ! -x $getaddr ]]; then
@@ -60,7 +61,19 @@
exit 4
fi
-$dtrace -c "/sbin/ping -U $dest" -qs /dev/stdin <<EOF | grep -v 'is alive'
+cat > test.pl <<-EOPERL
+ use IO::Socket;
+ my \$s = IO::Socket::INET->new(
+ Proto => "udp",
+ PeerAddr => "$dest",
+ PeerPort => $port);
+ die "Could not create UDP socket $dest port $port" unless \$s;
+ send \$s, "Hello", 0;
+ close \$s;
+ sleep(2);
+EOPERL
+
+$dtrace -c 'perl test.pl' -qs /dev/stdin <<EOF
BEGIN
{
ipsend = udpsend = 0;
Index: cddl/usr.sbin/dtrace/tests/tools/exclude.sh
===================================================================
--- cddl/usr.sbin/dtrace/tests/tools/exclude.sh
+++ cddl/usr.sbin/dtrace/tests/tools/exclude.sh
@@ -33,7 +33,6 @@
exclude EXFAIL common/funcs/tst.copyinto.d
exclude EXFAIL common/funcs/tst.ddi_pathname.d
exclude EXFAIL common/io/tst.fds.d
-exclude EXFAIL common/ip/tst.ipv4localudp.ksh
exclude EXFAIL common/mdb/tst.dtracedcmd.ksh
exclude EXFAIL common/misc/tst.dofmax.ksh
exclude EXFAIL common/misc/tst.include.ksh

File Metadata

Mime Type
text/plain
Expires
Mon, Jul 20, 12:39 AM (15 h, 2 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35257960
Default Alt Text
D16268.id45281.diff (3 KB)

Event Timeline