pmrep: update TODO, man page
[pcp.git] / qa / 997
bloba783d0839bdd819140d36f66e3d8855c7da50e2e
1 #!/bin/sh
2 # PCP QA Test No. 997
3 # Exercise pmlogextract handling of corrupt archive records.
5 # Copyright (c) 2014 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 status=1 # failure is the default!
17 $sudo rm -rf $tmp.* $seq.full
18 trap "cd $here; rm -rf $tmp.*; exit \$status" 0 1 2 3 15
20 # real QA test starts here
21 echo "Running log extract on corrupt archive"
22 pmlogextract -z archives/ok-truncbin.0 $tmp.log 2>$tmp.err >$tmp.out
23 cat $tmp.out
24 cat $tmp.err
26 # verify an archive was created (up to the corruption point)
27 # - previously, no archive would be created at all.
28 echo && echo "Verifying new log has been created"
29 pmdumplog -z -l $tmp.log
31 echo && echo "Verifying new log is not corrupt"
32 pmlogcheck $tmp.log
33 echo Done
35 # success, all done
36 status=0
37 exit