1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
|
#!/bin/sh
# PCP QA Test No. 1829
# Exercise --version=3 pmlogrewrite option.
#
# Copyright (c) 2021 Red Hat. All Rights Reserved.
#
seq=`basename $0`
echo "QA output created by $seq"
# get standard environment, filters and checks
. ./common.product
. ./common.filter
. ./common.check
eval `$PCP_BINADM_DIR/pmconfig -L -s v3_archives`
[ "$v3_archives" = true ] || _notrun "No V3 archive support"
_cleanup()
{
cd $here
$sudo rm -rf $tmp $tmp.*
}
status=0 # success is the default!
trap "_cleanup; exit \$status" 0 1 2 3 15
_filter_dump()
{
sed \
-e 's/Log Format Version [2|3]/Log Format Version N/g' \
-e 's/\[[0-9]* bytes]/[N bytes]/g' \
# end
}
# real QA test starts here
archivelist="sample-labels mmv.help"
for archive in $archivelist
do
rm -f $tmp.log*
echo "Rewriting to v3 log format for $archive"
pmlogrewrite -V 3 archives/$archive $tmp.log3
if [ $? -ne 0 ]
then
echo "pmlogrewrite failed"
status=1
exit
fi
echo "pmdumplog of v3 log format from $archive" >> $seq_full
pmdumplog -z -aeh $tmp.log3 >> $seq_full
echo "Dumping the v3 archive label for $archive"
pmdumplog -z -L $tmp.log3
done
# success, all done
exit
|