File: 1623

package info (click to toggle)
pcp 7.1.0-1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 252,748 kB
  • sloc: ansic: 1,483,656; sh: 182,366; xml: 160,462; cpp: 83,813; python: 24,980; perl: 18,327; yacc: 6,877; lex: 2,864; makefile: 2,738; awk: 165; fortran: 60; java: 52
file content (66 lines) | stat: -rwxr-xr-x 1,925 bytes parent folder | download
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
#!/bin/sh
# PCP QA Test No. 1623
# test LOGIMPORT logvol switching
#
# Copyright (c) 2020 Red Hat.  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 collectl2pcp >/dev/null 2>&1 || _notrun collectl2pcp not installed
which pmrep >/dev/null 2>&1 || _notrun pmrep not installed


_cleanup()
{
    cd $here
    $sudo rm -rf $tmp $tmp.*
}

status=1	# failure is the default!
trap "_cleanup; exit \$status" 0 1 2 3 15

rm -f $seq.out
if [ -f $seq.out_v$PCP_ARCHIVE_VERSION ]
then
    ln $seq.out_v$PCP_ARCHIVE_VERSION $seq.out
else
    _notrun "no .out for archive version $PCP_ARCHIVE_VERSION"
fi

# real QA test starts here
[ ! -d "$tmp" ] && mkdir -p $tmp
echo checking one volume created without PCP_LOGIMPORT_MAXLOGSZ
collectl2pcp collectl/rhel6.raw.gz $tmp/onevol
vols=`echo $tmp/onevol.[0-9]* | wc -w`
[ "$vols" -ne 1 ] && echo onevol FAILED, expected 1 volume but got $vols && status=1 && exit
echo checking temporal index
pmlogcheck $tmp/onevol
pmdumplog -t $tmp/onevol | sed -e 's/^[0-2][0-9]:[^ ]*/TIMESTAMP/'
src/scandata -o -v $tmp/onevol.0 | grep '^\['

echo checking 4 volumes created with PCP_LOGIMPORT_MAXLOGSZ=250000
PCP_LOGIMPORT_MAXLOGSZ=250000 collectl2pcp collectl/rhel6.raw.gz $tmp/manyvols
vols=`echo $tmp/manyvols.[0-9]* | wc -w`
[ "$vols" -ne 4 ] && echo manyvols FAILED, expected 14 volumes but got $vols && status=1 && exit
echo checking temporal index
pmdumplog -t $tmp/manyvols | sed -e 's/^[0-2][0-9]:[^ ]*/TIMESTAMP/'
pmlogcheck $tmp/manyvols
for i in 0 1 2 3
do
    src/scandata -o -v $tmp/manyvols.$i | grep '^\['
done

echo check they replay the same, expect no diff
pmrep -a $tmp/onevol -z -p -f%c -t 10s kernel.all.load >$tmp.onevol
pmrep -a $tmp/manyvols -z -p -f%c -t 10s kernel.all.load  | diff - $tmp.onevol || status=1

# success, all done
status=0
exit