qa: revert some change to expected 244 outputs (from pmda-restart)
[pcp.git] / qa / 711
blob66e8e24a31270dc6ffaf48fd70222bbfba7ee467
1 #!/bin/sh
2 # PCP QA Test No. 711
4 # Exercise sar2pcp for RH BZ 891688
5 # Copyright (c) 2012 Red Hat.
8 seq=`basename $0`
9 echo "QA output created by $seq"
11 # get standard environment, filters and checks
12 . ./common.product
13 . ./common.filter
14 . ./common.check
16 which sadf >/dev/null 2>&1 || _notrun "sadf not installed (sysstat package)"
17 which sar2pcp >/dev/null 2>&1 || _notrun "sar2pcp not installed"
19 status=1 # failure is the default!
20 $sudo rm -rf $tmp.* $seq.full
21 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
23 logcheck()
25 safile="$1"
26 pcplog="$2"
28 # should be no errors/warnings and pcp tools should also not fail
29 pmlogsummary -z -f -a $pcplog
30 [ $? -eq 0 ] && echo "pminfo reports no issues in $safile"
33 # backwards compatibility route - silence is golden
34 silence()
36 safile="$1"
37 echo "sar2pcp thinks $safile is going well so far"
38 echo "pmlogsummary approved of the $safile conversion"
41 # real QA test starts here
42 cd $here
43 rm -f $seq.full
45 for sadist in 891688-dash-time.xml
47 safile="sadist/$sadist"
48 echo "==> Checking $safile" | tee -a $seq.full
49 pcplog=$tmp.pcplog
50 sar2pcp $safile $pcplog > $tmp.out 2>&1
51 sts=$?
53 # this seems to be a common sadf fail message;
54 # happens when the installed sysutils is old:
55 grep 'Invalid system activity file' $tmp.out >/dev/null
56 if [ $? -eq 0 ]
57 then
58 echo "$safile is not parsable by the installed sysutils" >>$seq.full
59 silence $safile
60 else
61 [ $sts -eq 0 ] && echo "sar2pcp thinks $safile is going well so far"
62 logcheck $safile $pcplog
64 # should be no warnings from perl either
65 grep 'uninitialized value' $tmp.out
67 rm -f $tmp.pcplog.*
68 done
70 # success, all done
71 status=0
72 exit