Skip to content

Commit 5000f7f

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 <pvorel@suse.cz>
1 parent 1b085bb commit 5000f7f

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

test/ping/ping-01-basics.t

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ sub get_target
6767
$cmd->stdout_like(qr/time=\d+\.\d+ ms/, 'Ping time present');
6868
$cmd->stdout_like(qr~rtt min/avg/max/mdev = \d+\.\d{3}/\d+\.\d{3}/\d+\.\d{3}/\d+\.\d{3} ms$~,
6969
'RTT time present');
70-
$cmd->stdout_like(qr{^PING 127\.0\.0\.1 \(127\.0\.0\.1\) 56\(84\) bytes of data\.
70+
$cmd->stdout_like(qr{^PING 127\.0\.0\.1 \(127\.0\.0\.1\) 56 \(84\) data bytes
7171
64 bytes from 127\.0\.0\.1: icmp_seq=1 ttl=\d+ time=\d\.\d{3} ms
7272
7373
--- 127.0.0.1 ping statistics ---
@@ -124,7 +124,7 @@ die "Undefined cannonical name for $localhost on IPv6" unless defined $localhost
124124
$cmd->stdout_like(qr/time=\d+\.\d+ ms/, 'Ping time present');
125125
$cmd->stdout_like(qr~rtt min/avg/max/mdev = \d+\.\d{3}/\d+\.\d{3}/\d+\.\d{3}/\d+\.\d{3} ms$~,
126126
'RTT time present');
127-
$cmd->stdout_like(qr{^PING $localhost_target_ipv4 \(127\.0\.0\.1\) 56\(84\) bytes of data\.
127+
$cmd->stdout_like(qr{^PING $localhost_target_ipv4 \(127\.0\.0\.1\) 56 \(84\) data bytes
128128
64 bytes from $localhost_target_ipv4 \(127\.0\.0\.1\): icmp_seq=1 ttl=\d+ time=\d\.\d{3} ms
129129
130130
--- $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
@@ -25,10 +25,10 @@ system("/bin/sh", "-c", "command -v $ping");
2525
$cmd->exit_is_num($> == 0 ? 0 : 2);
2626
subtest 'output' => sub {
2727
if ($> == 0) {
28-
$cmd->stdout_like(qr/^PING 127\.0\.0\.1.*bytes of data\.$/m, 'Ping header');
28+
$cmd->stdout_like(qr/^PING 127\.0\.0\.1.* data bytes$/m, 'Ping header');
2929
$cmd->stdout_like(qr/64 bytes from 127\.0\.0\.1: icmp_seq=1 ttl=\d+ time=\d+\.\d+ ms/m, 'Ping reply line');
3030
$cmd->stdout_like(qr/1 packets transmitted, 1 received, 0% packet loss/, 'Ping success summary');
31-
$cmd->stdout_like(qr{^PING 127\.0\.0\.1 \(127\.0\.0\.1\) 56\(84\) bytes of data\.
31+
$cmd->stdout_like(qr{^PING 127\.0\.0\.1 \(127\.0\.0\.1\) 56 \(84\) data bytes
3232
64 bytes from 127\.0\.0\.1: icmp_seq=1 ttl=\d+ time=\d\.\d{3} ms
3333
3434
--- 127.0.0.1 ping statistics ---

0 commit comments

Comments
 (0)