/var/lib/pcp/testsuite/435 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 | #!/bin/sh
# PCP QA Test No. 435
# Exercise compressed archive files - gzip 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 gzip >/dev/null 2>&1 || _notrun "No gzip 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
_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 "--- gzip first volume ---" | tee -a $here/$seq.full
gzip mv-bigbin.0
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'
gunzip mv-bigbin.0.gz
echo
echo "--- gzip last volume and use existing .9.gz in -a arg ---" | tee -a $here/$seq.full
gzip mv-bigbin.9
ls -l >>$here/$seq.full
_do mv-bigbin.9.gz | tee -a $here/$seq.full >$tmp.new
diff $tmp.orig $tmp.new | sed -e '/^[0-9]/d'
gunzip mv-bigbin.9.gz
echo
echo "--- gzip middle volume and used existing .1 in -a arg ---" | tee -a $here/$seq.full
gzip mv-bigbin.5
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 "--- gzip first, middle and last volume and use .meta in -a arg ---" | tee -a $here/$seq.full
gzip mv-bigbin.0
gzip mv-bigbin.9
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 "--- gzip first few, middle and last few volumes and use existing .7.gz in -a arg ---" | tee -a $here/$seq.full
gzip mv-bigbin.1
gzip mv-bigbin.7
gzip mv-bigbin.8
ls -l >>$here/$seq.full
_do mv-bigbin.7.gz | 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.gz
do
pminfo -a $arch
pmprobe -a $arch sample.bin
pmval -a $arch sample.milliseconds
pmie -a $arch </dev/null
done
touch null.0.gz null.meta null.index
pminfo -a null
# success, all done
exit
|