3 # pmlogrewrite - delete cases
5 # Copyright (c) 2011 Ken McDonell. All Rights Reserved.
9 echo "QA output created by $seq"
11 # get standard environment, filters and checks
16 which pmlogrewrite
>/dev
/null
2>&1 || _notrun
"pmlogrewrite not installed"
18 status
=0 # success is the default!
19 $sudo rm -rf $tmp.
* $seq.full
20 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
26 -e "s/^\([+-][+-][+-] TMP\...t*\).*/\1/" \
27 -e '/pmResult dump/s/from .* numpmid/... numpmid/'
32 pminfo
-a $1 -m >$tmp.
in
33 pminfo
-a $2 -m >$tmp.out
34 echo "--- pmns diffs ---"
35 diff -u $tmp.
in $tmp.out | _filter
36 pmdumplog
-z -a $1 |
tee -a $seq.full
>$tmp.
in
37 pmdumplog
-z -a $2 |
tee -a $seq.full
>$tmp.out
38 echo "--- pmdumplog diffs ---"
39 diff -u $tmp.
in $tmp.out | _filter
42 # real QA test starts here
43 sed -e '/^#/d' <<End-of-File | while read arch_args spec
44 # archive[|arg1[|arg2[|...]]] spec
46 archives/src-rattle metric hinv.ncpu { delete }
47 archives/src-rattle metric hinv.ncpu { delete } metric hinv.ndisk { delete }
48 archives/src-rattle metric 1.*.* { delete }
49 archives/ace_v2 metric 40.*.* { delete } metric 1.25.* { delete }
50 archives/mirage indom 29.3 { iname "m-00" -> delete inst 33 -> delete }
53 echo |
tee -a $seq.full
54 echo "$spec" >$tmp.config
55 echo "=== `cat $tmp.config` ===" |
tee -a $seq.full
57 pmlogrewrite
-w -c $tmp.config
`echo $arch_args | sed -e 's/|/ /g'` $tmp.new
2>&1 | _filter
60 _cmp
`echo $arch_args | sed -e 's/|.*//'` $tmp.new