/var/lib/pcp/testsuite/442 is in pcp-testsuite 3.8.12ubuntu1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
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 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | #!/bin/sh
# PCP QA Test No. 442
# check 2^31 volume switching for pmlogextract
#
# Copyright (c) 2011 Ken McDonell. All Rights Reserved.
# Copyright (c) 2012 Red Hat.
#
seq=`basename $0`
echo "QA output created by $seq"
# get standard environment, filters and checks
. ./common.product
. ./common.filter
. ./common.check
rm -f $seq.full src/big2.* src/big3.*
./src/mkbig1 > $seq.full 2>&1
[ $? -eq 0 ] || _notrun `cat $seq.full`
# 10GB should keep us out of trouble
free=`_check_freespace 10240`
[ -z "$free" ] || _notrun $free
status=1 # failure is the default!
trap "rm -f $tmp.* src/big2.* src/big3.*; exit \$status" 0 1 2 3 15
for file in src/big1.*
do
ln $file `echo $file | sed -e 's/big1/big2/'`
:
done
ls -l src/big1* src/big2* >$seq.full 2>&1
_filter()
{
sed \
-e 's/[0-9][0-9]:[0-9][0-9]:[0-9][0-9]\.[0-9][0-9][0-9]/TIMESTAMP/g'
}
# real QA test starts here
pmlogextract src/big1 src/big2 src/big3 2>&1 | _filter
ls -l src/big3* >>$seq.full 2>&1
# expect 3 volumes, and all < 2^31 bytes in size
#
limit=2147483648
nvol=`ls src/big3.? | wc -l | sed -e 's/ //g'`
if [ $nvol -ne 3 ]
then
ls -l src/big3.?
echo "Error: expecting 3 volumes, found $nvol"
status=1
fi
echo "0" >$tmp.bc
for vol in src/big1.?
do
size=`_filesize $vol`
echo "+2*$size" >>$tmp.bc
done
for vol in src/big3.?
do
size=`_filesize $vol`
if [ -z "$size" ]
then
stat $vol
echo "Error: cannot extract size for volume $vol"
status=1
elif [ "$size" -ge $limit ]
then
ls -l $vol
echo "Error: size ($size) exceeds limit ($limit)"
status=1
fi
echo "-$size" >>$tmp.bc
done
cat $tmp.bc >>$seq.full
echo
echo "sum(input data volume sizes) - sum(output data volume sizes)"
( tr '\012' ' ' <$tmp.bc ; echo ) | bc
echo
echo "Temporal Index Entries ..."
for arch in src/big1 src/big2 src/big3
do
log=`echo $arch | sed -e 's/src\///g'`
echo "$log: `pmdumplog -t $arch | grep '^[0-9]' | wc -l | sed -e 's/ //g'`"
done
# success, all done
status=0
exit
|