Drop unused condition check
[pcp.git] / qa / 049
blobe6ba44991442814047b61004525c1cb1a5bf05c7
1 #! /bin/sh
2 # PCP QA Test No. 049
3 # Big archive exerciser and temporal index
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 rm -f $seq.full
17 trap "rm -f $tmp.*; exit" 0 1 2 3 15
19 # real QA test starts here
20 for arch in tmparch/mv-bigbin
22 echo | tee -a $seq.full
23 echo "=== $arch ===" | tee -a $seq.full
24 pmdumplog -t $arch >>$seq.full
25 src/xarch -a $arch -D128 2>&1 \
26 | tee -a $seq.full \
27 | sed \
28 -e 's/posn=[0-9]*/posn=OFFSET/' \
29 -e 's/__pmLogChkLabel/chkLabel/g' \
30 -e '/__pmLogRead/d' \
31 -e '/LogLoadMeta/d' \
32 -e '/__pmLogOpen: inspect file/d' \
33 -e 's/[0-2][0-9]:[0-5][0-9]:[0-5][0-9]\.[0-9][0-9][0-9]/TIME/g' \
34 -e 's/TIME (t=[0-9][0-9.]*)/TIME/g' \
35 -e 's/pid=.*host=.*/pid=PID host=HOSTNAME/' \
36 | $PCP_AWK_PROG '
37 $1 == "chkLabel:" && /vol=0/ { if (fd1 == "") fd1 = $2
38 if (fd1 == $2) $2 = "fd=<n1>"
40 $1 == "chkLabel:" && /vol=-2/ { if (fd2 == "") fd2 = $2
41 if (fd2 == $2) $2 = "fd=<n2>"
43 $1 == "chkLabel:" && /vol=-1/ { if (fd3 == "") fd3 = $2
44 if (fd3 == $2) $2 = "fd=<n3>"
46 $1 == "__pmLogRead:" { if (fd4 == "") fd4 = $2
47 if (fd4 == $2) $2 = "fd=<n4>"
49 $1 == "chkLabel:" && /vol=[1-9]/ { if (fd5 == "") fd5 = $2
50 if (fd5 == $2) $2 = "fd=<n5>"
52 { print }' \
53 | $PCP_AWK_PROG -v sortfile=$tmp.sort '
54 /pmLogOpen/ { print > sortfile; open=1; next }
55 open==1 && $1 !~ /pmLogOpen/ { system("sort " sortfile); open=0 }
56 /^Pass / { pass = $2 }
57 pass == "4:" && /^Found 1000 / { print; skip = 1 }
58 pass == "4:" && /^Found 750 / { print; skip = 1 }
59 pass == "5:" && /^Found 750 / { print; skip = 1 }
60 pass == "5:" && /^Found 500 / { print; skip = 1 }
61 skip == 1 && /__pmLogSetTime/ { print "__pmLogSetTime ..."; next }
62 skip == 1 && /__pmLogFetch/ { skip = 2; next }
63 skip == 2 && /__pmLogFetch/ { next }
64 skip == 1 { next }
65 skip == 2 { skip = 0 }
66 { print }'
67 done
69 exit 0