/var/lib/pcp/testsuite/436 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 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 | #!/bin/sh
# PCP QA Test No. 436
# Exercise compressed archive files - bzip2 version
#
# Copyright (c) 2010 Ken McDonell. All Rights Reserved.
#
seq=`basename $0`
echo "QA output created by $seq"
# get standard environment, filters and checks
. ./common.product
. ./common.filter
. ./common.check
which bzip2 >/dev/null 2>&1 || _notrun No bzip2 binary installed
status=0 # success is the default!
$sudo rm -rf $tmp $tmp.* $seq.full
trap "cd $here; rm -rf $tmp $tmp.*; exit \$status" 0 1 2 3 15
mkdir $tmp
cp src/mv-bigbin* $tmp
_filter()
{
# Mac OS X and Solaris strangeness
sed \
-e '/: Undefined error: 0/s/Undefined error: 0/Success/' \
-e '/: Error 0/s/Error 0/Success/'
}
_do()
{
base=`echo $1 | sed -e 's/\..*//'`
[ $# -eq 1 ] && echo "pmdumplog ..."
pmdumplog -a $base
[ $# -eq 1 ] && echo "pminfo ..."
pminfo -f -a $1 sample.colour
[ $# -eq 1 ] && echo "pmprobe in the middle ..."
pmprobe -v -O +10sec -a $1 sampledso.milliseconds
[ $# -eq 1 ] && echo "pmval & pmval -r ..."
pmval -f 4 -t 3sec -a $1 sample.milliseconds 2>&1
pmval -f 4 -r -a $1 sample.milliseconds 2>&1
[ $# -eq 1 ] && echo "pmie ..."
echo 'sample.milliseconds > 0 -> print "%v";' \
| pmie -t 4sec -a $1 2>&1 \
| grep -v 'Info: evaluator exiting'
}
# real QA test starts here
_do src/mv-bigbin n | tee $full >$tmp.orig
cd $tmp
echo "expect only a few lines of diff output ..."
echo
echo "--- bzip2 first volume ---" | tee -a $here/$seq.full
bzip2 mv-bigbin.0 | _filter
ls -l >>$here/$seq.full
_do mv-bigbin | tee -a $here/$seq.full >$tmp.new
diff $tmp.orig $tmp.new | sed -e '/^[0-9]/d'
bunzip2 mv-bigbin.0.bz2 | _filter
echo
echo "--- bzip2 last volume and use existing .9.bz2 in -a arg ---" | tee -a $here/$seq.full
bzip2 mv-bigbin.9 | _filter
ls -l >>$here/$seq.full
_do mv-bigbin.9.bz2 | tee -a $here/$seq.full >$tmp.new
diff $tmp.orig $tmp.new | sed -e '/^[0-9]/d'
bunzip2 mv-bigbin.9.bz2 | _filter
echo
echo "--- bzip2 middle volume and used existing .1 in -a arg ---" | tee -a $here/$seq.full
bzip2 mv-bigbin.5 | _filter
ls -l >>$here/$seq.full
_do mv-bigbin.1 | tee -a $here/$seq.full >$tmp.new
diff $tmp.orig $tmp.new | sed -e '/^[0-9]/d'
echo
echo "--- bzip2 first, middle and last volume and use .meta in -a arg ---" | tee -a $here/$seq.full
bzip2 mv-bigbin.0 | _filter
bzip2 mv-bigbin.9 | _filter
ls -l >>$here/$seq.full
_do mv-bigbin.meta | tee -a $here/$seq.full >$tmp.new
diff $tmp.orig $tmp.new | sed -e '/^[0-9]/d'
echo
echo "--- bzip2 first few, middle and last few volumes and use existing .7.bz2 in -a arg ---" | tee -a $here/$seq.full
bzip2 mv-bigbin.1 | _filter
bzip2 mv-bigbin.7 | _filter
bzip2 mv-bigbin.8 | _filter
ls -l >>$here/$seq.full
_do mv-bigbin.7.bz2 | tee -a $here/$seq.full >$tmp.new
diff $tmp.orig $tmp.new | sed -e '/^[0-9]/d'
echo
echo "--- some error cases ---"
for arch in mv-bigbin.10 mv-bigbin.10.bz2
do
pminfo -a $arch
pmprobe -a $arch sample.bin
pmval -a $arch sample.milliseconds
pmie -a $arch </dev/null
done
touch null.0.bz2 null.meta null.index
pminfo -a null 2>&1 \
| _filter
# success, all done
exit
|