Skip to content

Commit b9847c1

Browse files
committed
ping: test: Update for unified header
Fix tests after commit "[RFC] ping: Unify wording in IPv6 header with IPv4". Signed-off-by: Petr Vorel <[email protected]>
1 parent 5f15c3c commit b9847c1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

test/ping/ping-01-basics.t

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ sub get_target
6565
$cmd->stdout_like(qr/time=\d+\.\d+ ms/, 'Ping time present');
6666
$cmd->stdout_like(qr~rtt min/avg/max/mdev = \d+\.\d{3}/\d+\.\d{3}/\d+\.\d{3}/\d+\.\d{3} ms$~,
6767
'RTT time present');
68-
$cmd->stdout_like(qr{^PING 127\.0\.0\.1 \(127\.0\.0\.1\) 56\(84\) bytes of data\.
68+
$cmd->stdout_like(qr{^PING 127\.0\.0\.1 \(127\.0\.0\.1\) 56 \(84\) data bytes
6969
64 bytes from 127\.0\.0\.1: icmp_seq=1 ttl=\d+ time=\d\.\d{3} ms
7070
7171
--- 127.0.0.1 ping statistics ---
@@ -122,7 +122,7 @@ die "Undefined cannonical name for $localhost on IPv6" unless defined $localhost
122122
$cmd->stdout_like(qr/time=\d+\.\d+ ms/, 'Ping time present');
123123
$cmd->stdout_like(qr~rtt min/avg/max/mdev = \d+\.\d{3}/\d+\.\d{3}/\d+\.\d{3}/\d+\.\d{3} ms$~,
124124
'RTT time present');
125-
$cmd->stdout_like(qr{^PING $localhost_target_ipv4 \(127\.0\.0\.1\) 56\(84\) bytes of data\.
125+
$cmd->stdout_like(qr{^PING $localhost_target_ipv4 \(127\.0\.0\.1\) 56 \(84\) data bytes
126126
64 bytes from $localhost_target_ipv4 \(127\.0\.0\.1\): icmp_seq=1 ttl=\d+ time=\d\.\d{3} ms
127127
128128
--- $localhost_target_ipv4 ping statistics ---

test/ping/ping-02-errors.t

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ my $ping = get_cmd($ARGV[0] // 'ping');
2323
$cmd->exit_is_num($> == 0 ? 0 : 2);
2424
subtest 'output' => sub {
2525
if ($> == 0) {
26-
$cmd->stdout_like(qr/^PING 127\.0\.0\.1.*bytes of data\.$/m, 'Ping header');
26+
$cmd->stdout_like(qr/^PING 127\.0\.0\.1.* data bytes$/m, 'Ping header');
2727
$cmd->stdout_like(qr/64 bytes from 127\.0\.0\.1: icmp_seq=1 ttl=\d+ time=\d+\.\d+ ms/m, 'Ping reply line');
2828
$cmd->stdout_like(qr/1 packets transmitted, 1 received, 0% packet loss/, 'Ping success summary');
29-
$cmd->stdout_like(qr{^PING 127\.0\.0\.1 \(127\.0\.0\.1\) 56\(84\) bytes of data\.
29+
$cmd->stdout_like(qr{^PING 127\.0\.0\.1 \(127\.0\.0\.1\) 56 \(84\) data bytes
3030
64 bytes from 127\.0\.0\.1: icmp_seq=1 ttl=\d+ time=\d\.\d{3} ms
3131
3232
--- 127.0.0.1 ping statistics ---

0 commit comments

Comments
 (0)