4 # Exercise sar2pcp for RH BZ 891688
5 # Copyright (c) 2012 Red Hat.
9 echo "QA output created by $seq"
11 # get standard environment, filters and checks
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
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
37 echo "sar2pcp thinks $safile is going well so far"
38 echo "pmlogsummary approved of the $safile conversion"
41 # real QA test starts here
45 for sadist
in 891688-dash-time.xml
47 safile
="sadist/$sadist"
48 echo "==> Checking $safile" |
tee -a $seq.full
50 sar2pcp
$safile $pcplog > $tmp.out
2>&1
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
58 echo "$safile is not parsable by the installed sysutils" >>$seq.full
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