mirror of
https://github.com/the-tcpdump-group/tcpdump.git
synced 2024-11-23 10:04:05 +08:00
Add eight time test files with packet dates in 2038, 2039, 2106 and 2107
Each capture file contains one packet. time_2038.pcap: 2038-01-01 00:00:00 time_2038_max.pcap: 2038-01-19 03:14:07 time_2038_overflow.pcap: 2038-01-19 03:14:08 time_2039.pcap: 2039-01-01 00:00:00 time_2106.pcap: 2106-01-01 00:00:00 time_2106_max.pcap: 2106-02-07 06:28:15 time_2106_overflow.pcapng: 2106-02-07 06:28:16 time_2107.pcapng: 2107-01-01 00:00:00 The packet time when > 2038-01-19T03:14:07Z cannot be correctly printed if time_t size is 32 bits (overflow). Some tests are run only if HAVE_TIME_T_64 is set. it depends on the output of "./tcpdump --time-t-size" (32 or 64). A 32-bit unsigned time_t goes until 2106-02-07T06:28:15Z. All values above require a pcapng file.
This commit is contained in:
parent
aacc29d06c
commit
a41457a51a
68
tests/time.tests
Normal file
68
tests/time.tests
Normal file
@ -0,0 +1,68 @@
|
||||
# -*- perl -*-
|
||||
|
||||
# The packet time when > 2038-01-19T03:14:07Z cannot be correctly printed
|
||||
# if time_t size is 32 bits (overflow).
|
||||
# Some tests are run only if HAVE_TIME_T_64 is set. it depends on the
|
||||
# output of "./tcpdump --time-t-size" (32 or 64).
|
||||
|
||||
# A 32-bit unsigned time_t goes until 2106-02-07T06:28:15Z.
|
||||
# All values above require a pcapng file.
|
||||
|
||||
$testlist = [
|
||||
{
|
||||
name => 'time_2038',
|
||||
input => 'time_2038.pcap',
|
||||
output => 'time_2038.out',
|
||||
args => '-q'
|
||||
},
|
||||
{
|
||||
name => 'time_2038_max',
|
||||
input => 'time_2038_max.pcap',
|
||||
output => 'time_2038_max.out',
|
||||
args => '-q'
|
||||
},
|
||||
{
|
||||
config_set => 'HAVE_TIME_T_64',
|
||||
name => 'time_2038_overflow',
|
||||
input => 'time_2038_overflow.pcap',
|
||||
output => 'time_2038_overflow.out',
|
||||
args => '-q'
|
||||
},
|
||||
{
|
||||
config_set => 'HAVE_TIME_T_64',
|
||||
name => 'time_2039',
|
||||
input => 'time_2039.pcap',
|
||||
output => 'time_2039.out',
|
||||
args => '-q'
|
||||
},
|
||||
{
|
||||
config_set => 'HAVE_TIME_T_64',
|
||||
name => 'time_2106',
|
||||
input => 'time_2106.pcap',
|
||||
output => 'time_2106.out',
|
||||
args => '-q'
|
||||
},
|
||||
{
|
||||
config_set => 'HAVE_TIME_T_64',
|
||||
name => 'time_2106_max',
|
||||
input => 'time_2106_max.pcap',
|
||||
output => 'time_2106_max.out',
|
||||
args => '-q'
|
||||
},
|
||||
{
|
||||
config_set => 'HAVE_TIME_T_64',
|
||||
name => 'time_2106_overflow',
|
||||
input => 'time_2106_overflow.pcapng',
|
||||
output => 'time_2106_overflow.out',
|
||||
args => '-q'
|
||||
},
|
||||
{
|
||||
config_set => 'HAVE_TIME_T_64',
|
||||
name => 'time_2107',
|
||||
input => 'time_2107.pcapng',
|
||||
output => 'time_2107.out',
|
||||
args => '-q'
|
||||
},
|
||||
];
|
||||
|
||||
1;
|
1
tests/time_2038.out
Normal file
1
tests/time_2038.out
Normal file
@ -0,0 +1 @@
|
||||
1 2038-01-01 00:00:00.000000 IP 192.168.1.11.43966 > 209.87.249.18.53: UDP, length 56
|
BIN
tests/time_2038.pcap
Normal file
BIN
tests/time_2038.pcap
Normal file
Binary file not shown.
1
tests/time_2038_max.out
Normal file
1
tests/time_2038_max.out
Normal file
@ -0,0 +1 @@
|
||||
1 2038-01-19 03:14:07.000000 IP 192.168.1.11.43966 > 209.87.249.18.53: UDP, length 56
|
BIN
tests/time_2038_max.pcap
Normal file
BIN
tests/time_2038_max.pcap
Normal file
Binary file not shown.
1
tests/time_2038_overflow.out
Normal file
1
tests/time_2038_overflow.out
Normal file
@ -0,0 +1 @@
|
||||
1 2038-01-19 03:14:08.000000 IP 192.168.1.11.43966 > 209.87.249.18.53: UDP, length 56
|
BIN
tests/time_2038_overflow.pcap
Normal file
BIN
tests/time_2038_overflow.pcap
Normal file
Binary file not shown.
1
tests/time_2039.out
Normal file
1
tests/time_2039.out
Normal file
@ -0,0 +1 @@
|
||||
1 2039-01-01 00:00:00.000000 IP 192.168.1.11.43966 > 209.87.249.18.53: UDP, length 56
|
BIN
tests/time_2039.pcap
Normal file
BIN
tests/time_2039.pcap
Normal file
Binary file not shown.
1
tests/time_2106.out
Normal file
1
tests/time_2106.out
Normal file
@ -0,0 +1 @@
|
||||
1 2106-01-01 00:00:00.000000 IP 192.168.1.11.43966 > 209.87.249.18.53: UDP, length 56
|
BIN
tests/time_2106.pcap
Normal file
BIN
tests/time_2106.pcap
Normal file
Binary file not shown.
1
tests/time_2106_max.out
Normal file
1
tests/time_2106_max.out
Normal file
@ -0,0 +1 @@
|
||||
1 2106-02-07 06:28:15.000000 IP 192.168.1.11.43966 > 209.87.249.18.53: UDP, length 56
|
BIN
tests/time_2106_max.pcap
Normal file
BIN
tests/time_2106_max.pcap
Normal file
Binary file not shown.
1
tests/time_2106_overflow.out
Normal file
1
tests/time_2106_overflow.out
Normal file
@ -0,0 +1 @@
|
||||
1 2106-02-07 06:28:16.000000 IP 192.168.1.11.43966 > 209.87.249.18.53: UDP, length 56
|
BIN
tests/time_2106_overflow.pcapng
Normal file
BIN
tests/time_2106_overflow.pcapng
Normal file
Binary file not shown.
1
tests/time_2107.out
Normal file
1
tests/time_2107.out
Normal file
@ -0,0 +1 @@
|
||||
1 2107-01-01 00:00:00.000000 IP 192.168.1.11.43966 > 209.87.249.18.53: UDP, length 56
|
BIN
tests/time_2107.pcapng
Normal file
BIN
tests/time_2107.pcapng
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user