diff options
author | markj <markj@FreeBSD.org> | 2015-03-30 04:06:36 +0000 |
---|---|---|
committer | markj <markj@FreeBSD.org> | 2015-03-30 04:06:36 +0000 |
commit | 6968ab0ddeace19efdb6dffa70ec949f20770800 (patch) | |
tree | 39e94c65a110d1ff408136dc448405bfd52ea6d2 /cddl/contrib/opensolaris/cmd/dtrace/test/tst/common | |
parent | 2be5269c4846b299fe0de542671741c423b78ecd (diff) | |
download | FreeBSD-src-6968ab0ddeace19efdb6dffa70ec949f20770800.zip FreeBSD-src-6968ab0ddeace19efdb6dffa70ec949f20770800.tar.gz |
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
Diffstat (limited to 'cddl/contrib/opensolaris/cmd/dtrace/test/tst/common')
4 files changed, 22 insertions, 16 deletions
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localicmp.ksh b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localicmp.ksh index 0f2b64a..18c774c 100755 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localicmp.ksh +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localicmp.ksh @@ -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, diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localicmp.ksh.out b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localicmp.ksh.out index 41d6e0c..c62b0c8e 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localicmp.ksh.out +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localicmp.ksh.out @@ -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) diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv6localicmp.ksh b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv6localicmp.ksh index f63d1ed..65efd24 100755 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv6localicmp.ksh +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv6localicmp.ksh @@ -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); diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv6localicmp.ksh.out b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv6localicmp.ksh.out index 529d251..2e94ff3 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv6localicmp.ksh.out +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv6localicmp.ksh.out @@ -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) |