]> The Tcpdump Group git mirrors - tcpdump/blob - tests/time.tests
Fix '-tt' option printing when time > 2106-02-07T06:28:15Z
[tcpdump] / tests / time.tests
1 # -*- perl -*-
2
3 # The packet time when > 2038-01-19T03:14:07Z cannot be correctly printed
4 # if time_t size is 32 bits (overflow).
5 # Some tests are run only if HAVE_TIME_T_64 is set. it depends on the
6 # output of "./tcpdump --time-t-size" (32 or 64).
7
8 # A 32-bit unsigned time_t goes until 2106-02-07T06:28:15Z.
9 # All values above require a pcapng file.
10
11 $testlist = [
12 {
13 name => 'time_2038',
14 input => 'time_2038.pcap',
15 output => 'time_2038.out',
16 args => '-q'
17 },
18 {
19 name => 'time_2038_max',
20 input => 'time_2038_max.pcap',
21 output => 'time_2038_max.out',
22 args => '-q'
23 },
24 {
25 config_set => 'HAVE_TIME_T_64',
26 name => 'time_2038_overflow',
27 input => 'time_2038_overflow.pcap',
28 output => 'time_2038_overflow.out',
29 args => '-q'
30 },
31 {
32 config_set => 'HAVE_TIME_T_64',
33 name => 'time_2039',
34 input => 'time_2039.pcap',
35 output => 'time_2039.out',
36 args => '-q'
37 },
38 {
39 config_set => 'HAVE_TIME_T_64',
40 name => 'time_2106',
41 input => 'time_2106.pcap',
42 output => 'time_2106.out',
43 args => '-q'
44 },
45 {
46 config_set => 'HAVE_TIME_T_64',
47 name => 'time_2106_max',
48 input => 'time_2106_max.pcap',
49 output => 'time_2106_max.out',
50 args => '-q'
51 },
52 {
53 config_set => 'HAVE_TIME_T_64',
54 name => 'time_2106_overflow',
55 input => 'time_2106_overflow.pcapng',
56 output => 'time_2106_overflow.out',
57 args => '-q'
58 },
59 {
60 config_set => 'HAVE_TIME_T_64',
61 name => 'time_2107',
62 input => 'time_2107.pcapng',
63 output => 'time_2107.out',
64 args => '-q'
65 },
66 {
67 config_set => 'HAVE_TIME_T_64',
68 name => 'time_2106_overflow-tt',
69 input => 'time_2106_overflow.pcapng',
70 output => 'time_2106_overflow-tt.out',
71 args => '-tt -q SPECIAL_t'
72 },
73 {
74 config_set => 'HAVE_TIME_T_64',
75 name => 'time_2107-tt',
76 input => 'time_2107.pcapng',
77 output => 'time_2107-tt.out',
78 args => '-tt -q SPECIAL_t'
79 },
80 ];
81
82 1;