Drop unused condition check
[pcp.git] / qa / 133
blob3b94e12e434c964dc741d0323cbd2106806a13d9
1 #! /bin/sh
2 # PCP QA Test No. 133
3 # Verify log volume switching for pmlc/pmlogger
5 # Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
8 seq=`basename $0`
9 echo "QA output created by $seq"
11 # get standard filters
12 . ./common.product
13 . ./common.filter
14 . ./common.check
16 trap "$sudo rm -f $tmp.*; exit" 0 1 2 3 15
17 signal=$PCP_BINADM_DIR/pmsignal
19 # real QA test starts here
20 $sudo rm -f $tmp.*
21 _start_up_pmlogger -L -c /dev/null -l $tmp.log $tmp >$tmp.err 2>&1
23 pmsleep 1.1
25 pmlc <<End-of-File
26 connect $pid
27 log mandatory on 500 msec pmcd.numagents
28 End-of-File
30 pmsleep 1.1
31 pmlc <<End-of-File
32 connect $pid
33 new volume
34 End-of-File
36 pmsleep 1.1
37 pmlc <<End-of-File
38 connect $pid
39 new volume
40 End-of-File
42 pmsleep 1.1
43 $sudo $signal -s HUP $pid
44 pmsleep 1.1
45 $sudo $signal -s HUP $pid
47 pmsleep 1.1
48 pmlc <<End-of-File
49 connect $pid
50 new volume
51 End-of-File
53 pmsleep 1.1
54 pmlc <<End-of-File
55 connect $pid
56 new volume
57 End-of-File
59 pmsleep 1.1
60 $sudo $signal -s TERM $pid
61 _wait_pmlogger_end $pid
62 _filter_pmlogger_log <$tmp.log
63 $sudo rm -f $tmp.log
65 # be careful of $tmp.pid $tmp.err $tmp.cmd and so on from earlier
66 nfile=`echo $tmp.[0-9]* ${tmp}.*index ${tmp}.*meta | wc -w | tr -d ' '`
67 echo "Created $nfile archive pieces."
68 if [ $nfile -ne 9 ]
69 then
70 echo "Expected 10 archive pieces ..."
71 ls -l $tmp.*
74 pmdumplog -t $tmp \
75 | _filter_pmdumplog \
76 | $PCP_AWK_PROG '
77 $1 == "TIMESTAMP" && NF == 4 { print "TIMESTAMP " $2 " OFFSET OFFSET"; next }
78 { print }'