Merge branch 'master' of git://git.pcp.io/pcp into qt
[pcp.git] / qa / 266
blob6ddf527a0440c0d144eaf57664ebbc18d10da583
1 #! /bin/sh
2 # PCP QA Test No. 266
4 # pmlogextract interactions between -S and -T and the timezone
5 # Bug #466346
7 # Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
10 seq=`basename $0`
11 echo "QA output created by $seq"
13 # get standard filters
14 . ./common.product
15 . ./common.filter
17 arch=archives/960624.08.17_v2
18 pmns=''
20 _merge_filter()
22 sed -e "s/.tmp.$seq-$$/TMP/"
25 _dump_filter()
27 # temp file name, but also this archive is V1 and hence not endian
28 # safe ... so the strange value mappings!
30 sed -e "s/.tmp.$seq-$$/TMP/" \
31 -e "s/2928894505887203328/159819048/" \
32 -e "s/8135338249615835136/159901296/" \
33 | $PCP_AWK_PROG '
34 NF==0 { skip = 0 }
35 skip == 1 { next }
36 { print }
37 /^[0-9]/ { print "..."; skip = 1 }'
40 status=1 # failure is the default!
41 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
43 # real QA test starts here
44 TZ=EST-10; export TZ
46 echo "=== input archive ==="
47 pmdumplog -L $arch | ./xlate_2_new_pmns
48 echo
49 pmdumplog -z -L $arch | ./xlate_2_new_pmns
51 echo
52 echo "=== window before archive start, local TZ=$TZ ==="
53 rm -f $tmp.*
54 pmlogextract -S@08:00:00 -T@08:01:00 $arch $tmp 2>&1 | _merge_filter
55 pmdumplog -lm $tmp 2>&1 | _dump_filter | ./xlate_2_new_pmns
57 echo
58 echo "=== window before archive start, timezone of archive ==="
59 rm -f $tmp.*
60 pmlogextract -z -S@15:00:00 -T@15:01:00 $arch $tmp 2>&1 | _merge_filter
61 pmdumplog -lm $tmp 2>&1 | _dump_filter | ./xlate_2_new_pmns
63 echo
64 echo "=== window before archive start, UTC timezone ==="
65 rm -f $tmp.*
66 pmlogextract -Z UTC -S@22:00:00 -T@22:00:00 $arch $tmp 2>&1 | _merge_filter
67 pmdumplog -lm $tmp 2>&1 | _dump_filter | ./xlate_2_new_pmns
69 echo
70 echo "=== empty window in archive, local TZ=$TZ ==="
71 rm -f $tmp.*
72 pmlogextract -S@08:35:00 -T@08:35:01 $arch $tmp 2>&1 | _merge_filter
73 pmdumplog -lm $tmp 2>&1 | _dump_filter | ./xlate_2_new_pmns
75 echo
76 echo "=== empty window in archive, timezone of archive ==="
77 rm -f $tmp.*
78 pmlogextract -z -S@15:35:00 -T@15:35:01 $arch $tmp 2>&1 | _merge_filter
79 pmdumplog -lm $tmp 2>&1 | _dump_filter | ./xlate_2_new_pmns
81 echo
82 echo "=== empty window in archive, UTC timezone ==="
83 rm -f $tmp.*
84 pmlogextract -Z UTC -S@22:35:00 -T@22:35:01 $arch $tmp 2>&1 | _merge_filter
85 pmdumplog -lm $tmp 2>&1 | _dump_filter | ./xlate_2_new_pmns
87 echo
88 echo "=== window in archive, local TZ=$TZ ==="
89 rm -f $tmp.*
90 pmlogextract -S@08:35:00 -T@08:36:00 $arch $tmp 2>&1 | _merge_filter
91 pmdumplog -lm $pmns $tmp 2>&1 | _dump_filter | ./xlate_2_new_pmns
93 echo
94 echo "=== window in archive, timezone of archive ==="
95 rm -f $tmp.*
96 pmlogextract -z -S@15:35:00 -T@15:36:00 $arch $tmp 2>&1 | _merge_filter
97 pmdumplog -lm $pmns $tmp 2>&1 | _dump_filter | ./xlate_2_new_pmns
99 echo
100 echo "=== window in archive, UTC timezone ==="
101 rm -f $tmp.*
102 pmlogextract -Z UTC -S@22:35:00 -T@22:36:00 $arch $tmp 2>&1 | _merge_filter
103 pmdumplog -lm $pmns $tmp 2>&1 | _dump_filter | ./xlate_2_new_pmns
105 echo
106 echo "=== window after archive end, local TZ=$TZ ==="
107 rm -f $tmp.*
108 pmlogextract -S@09:00:00 -T@09:01:00 $arch $tmp 2>&1 | _merge_filter
109 pmdumplog -lm $tmp 2>&1 | _dump_filter | ./xlate_2_new_pmns
111 echo
112 echo "=== window after archive end, timezone of archive ==="
113 rm -f $tmp.*
114 pmlogextract -z -S@16:00:00 -T@16:01:00 $arch $tmp 2>&1 | _merge_filter
115 pmdumplog -lm $tmp 2>&1 | _dump_filter | ./xlate_2_new_pmns
117 echo
118 echo "=== window after archive end, UTC timezone ==="
119 rm -f $tmp.*
120 pmlogextract -Z UTC -S@23:00:00 -T@23:01:00 $arch $tmp 2>&1 | _merge_filter
121 pmdumplog -lm $tmp 2>&1 | _dump_filter | ./xlate_2_new_pmns
123 # success, all done
124 status=0
125 exit