3 # Exercise tools with a corrupted archive
5 # Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
9 echo "QA output created by $seq"
11 # get standard filters
16 status
=1 # failure is the default!
17 trap "cd $here; rm -rf $tmp; rm -f $tmp.*; exit \$status" 0 1 2 3 15
21 if [ "`echo core*`" != "core*" ]
23 $PCP_ECHO_PROG $PCP_ECHO_N "Dumped core! (saved in $here as""$PCP_ECHO_C"
26 $sudo mv $c $here/$seq.
$c
27 $PCP_ECHO_PROG $PCP_ECHO_N " $seq.$c""$PCP_ECHO_C"
37 # make the corrupted archive
38 arch
=archives
/bigace_v2
39 cp $here/$arch.meta bad.meta
40 dd ibs
=1 count
=512 if=$here/$arch.index of
=bad.index
2>/dev
/null
41 dd ibs
=1 count
=512 if=$here/$arch.index
>>bad.index
2>/dev
/null
42 dd if=$here/$arch.0 ibs
=1 count
=2052 of
=bad
.0 2>/dev
/null
43 dd if=/dev
/zero ibs
=1 count
=1024 >>bad
.0 2>/dev
/null
45 # deal with an annoying libc error ... using TZ=:Australia/Melbourne
46 # causes the -z option to report the wrong time, at least for some
51 # real QA test starts here
55 pminfo
-O0 -n $here/archives
/bigace.pmns
-a bad
>$tmp.out
2>$tmp.err
60 echo "=== pminfo -f irix ==="
61 pminfo
-O0 -n $here/archives
/bigace.pmns
-a bad
-f irix
65 echo "=== pmdumplog -t ==="
66 pmdumplog
-n $here/archives
/bigace.pmns
-z -t bad
70 echo "=== pmdumplog -t, no index ==="
71 mv bad.index save.index
72 pmdumplog
-n $here/archives
/bigace.pmns
-z -t bad
73 mv save.index bad.index
77 echo "=== pmdumplog -l ==="
78 pmdumplog
-n $here/archives
/bigace.pmns
-z -l bad
82 echo "=== pmdumplog -L ==="
83 pmdumplog
-n $here/archives
/bigace.pmns
-z -L bad
87 echo "=== pmdumplog -m ==="
88 pmdumplog
-n $here/archives
/bigace.pmns
-z -m bad
>$tmp.out
2>$tmp.err
93 echo "=== pmlogsummary ==="
94 pmlogsummary
-n $here/archives
/bigace.pmns bad
>$tmp.out
2>$tmp.err
95 cat $tmp.err
$tmp.out |
sed -e 's/^\*//g'