File: 251

package info (click to toggle)
pcp 6.3.8-1
  • links: PTS
  • area: main
  • in suites: trixie
  • size: 235,180 kB
  • sloc: ansic: 1,253,622; sh: 173,998; xml: 160,490; cpp: 83,331; python: 20,482; perl: 18,302; yacc: 6,886; makefile: 2,955; lex: 2,862; fortran: 60; java: 52
file content (118 lines) | stat: -rwxr-xr-x 3,290 bytes parent folder | download | duplicates (2)
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
111
112
113
114
115
116
117
118
#! /bin/sh
# PCP QA Test No. 251
# libpcp for archives with missing volumes
#
# Copyright (c) 1995-2002 Silicon Graphics, Inc.  All Rights Reserved.
#

seq=`basename $0`
echo "QA output created by $seq"

# get standard filters
. ./common.product
. ./common.filter
. ./common.check

_filter()
{
    sed \
	-e '/host:/s/ [^ ].*/ HOST/' \
	-e '/start:/s/ [^ ].*/ DATE/' \
	-e '/end:/s/ [^ ].*/ DATE/' \
	-e 's/^..:..:..\..../TIMESTAMP   /' \
	-e '/No values available/d'
    if [ "`echo core*`" != "core*" ]
    then
	$PCP_ECHO_PROG $PCP_ECHO_N "Dumped core! ... saved in""$PCP_ECHO_C"
	$sudo rm -f $here/core*
	for c in core*
	do
	    $sudo mv $c $here/$c
	    $PCP_ECHO_PROG $PCP_ECHO_N " $here/$c""$PCP_ECHO_C"
	done
	echo
	touch die
    fi
}

status=1	# failure is the default!
$sudo rm -rf $tmp.* $seq.full
trap "cd $here; rm -rf $tmp $tmp.*; exit \$status" 0 1 2 3 15

# real QA test starts here
mkdir $tmp
cp archives/ok-mv-bar.* $tmp
offset=`_arch_start archives/ok-mv-bar 0`
echo "offset=$offset" >>$here/$seq.full
pmdumplog -dilmst -z archives/ok-mv-bar >>$here/$seq.full
cd $tmp

for inst in "bin-100" "bin-100,bin-500,bin-900"
do
    echo
    echo "All volumes present ... $inst ..." | tee -a $here/$seq.full
    pmval -z -O $offset -Dlog -t2 -a ok-mv-bar -i $inst sampledso.bin 2>$tmp.err >$tmp.out
    cat $tmp.err >>$here/$seq.full
    grep '^__pmLogChangeVol:' $tmp.err
    _filter <$tmp.out
    [ -f die ] && exit

    echo
    echo "First volume missing ... $inst ..." | tee -a $here/$seq.full
    mv ok-mv-bar.0 foo.0
    pmval -z -O $offset -Dlog -t2 -a ok-mv-bar -i $inst sampledso.bin 2>$tmp.err >$tmp.out
    cat $tmp.err >>$here/$seq.full
    grep '^__pmLogChangeVol:' $tmp.err
    _filter <$tmp.out
    [ -f die ] && exit
    mv foo.0 ok-mv-bar.0

    echo
    echo "Last volume missing ... $inst ..." | tee -a $here/$seq.full
    mv ok-mv-bar.3 foo.3
    pmval -z -O $offset -Dlog -t2 -a ok-mv-bar -i $inst sampledso.bin 2>$tmp.err >$tmp.out
    cat $tmp.err >>$here/$seq.full
    grep '^__pmLogChangeVol:' $tmp.err
    _filter <$tmp.out
    [ -f die ] && exit
    mv foo.3 ok-mv-bar.3

    echo
    echo "Second volume missing ... $inst ..." | tee -a $here/$seq.full
    mv ok-mv-bar.1 foo.1
    pmval -z -O $offset -Dlog -t2 -a ok-mv-bar -i $inst sampledso.bin 2>$tmp.err >$tmp.out
    cat $tmp.err >>$here/$seq.full
    grep '^__pmLogChangeVol:' $tmp.err
    _filter <$tmp.out
    [ -f die ] && exit
    mv foo.1 ok-mv-bar.1

    echo
    echo "Second last volume missing ... $inst ..." | tee -a $here/$seq.full
    mv ok-mv-bar.2 foo.2
    pmval -z -O $offset -Dlog -t2 -a ok-mv-bar -i $inst sampledso.bin 2>$tmp.err >$tmp.out
    cat $tmp.err >>$here/$seq.full
    grep '^__pmLogChangeVol:' $tmp.err
    _filter <$tmp.out
    [ -f die ] && exit
    mv foo.2 ok-mv-bar.2

    echo
    echo "All volumes but second missing ... $inst ..." | tee -a $here/$seq.full
    mv ok-mv-bar.0 foo.0
    mv ok-mv-bar.2 foo.2
    mv ok-mv-bar.3 foo.3
    pmval -z -O $offset -Dlog -t2 -a ok-mv-bar -i $inst sampledso.bin 2>$tmp.err >$tmp.out
    cat $tmp.err >>$here/$seq.full
    grep '^__pmLogChangeVol:' $tmp.err
    _filter <$tmp.out
    [ -f die ] && exit
    mv foo.0 ok-mv-bar.0
    mv foo.2 ok-mv-bar.2
    mv foo.3 ok-mv-bar.3

done

# success, all done
status=0
exit