File: 317

package info (click to toggle)
pcp 7.0.5-1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 252,916 kB
  • sloc: ansic: 1,478,844; sh: 177,285; xml: 160,462; cpp: 83,809; python: 24,349; perl: 18,303; yacc: 6,877; lex: 2,864; makefile: 2,694; awk: 165; fortran: 60; java: 52
file content (67 lines) | stat: -rwxr-xr-x 2,018 bytes parent folder | download | duplicates (4)
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
#! /bin/sh
# PCP QA Test No. 317
# exercise pmlogsummary handling of corrupt log
# (archive with dodgey metric descriptor, caused a core dump)
#
# Copyright (c) 2007 Aconex.  All Rights Reserved.
#

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

. ./common.python

$python -c "from pcp import pmapi" >/dev/null 2>&1
[ $? -eq 0 ] || _notrun "python pcp pmapi module not installed"
$python -c "from collections import OrderedDict" >/dev/null 2>&1
[ $? -eq 0 ] || _notrun "python collections OrderedDict module not installed"

which pmrep >/dev/null 2>&1 || _notrun "pmrep not installed"

status=1	# failure is the default!
trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15

# real QA test starts here
echo && echo "Verify no pmlogsummary coredump..."
pmlogsummary -v -z badarchives/logsummary-bug >$tmp.out 2>$tmp.err
cat $tmp.out
cat $tmp.err

echo && echo "Verify no pmlogcheck coredump..."
pmlogcheck -z badarchives/logsummary-bug >$tmp.out 2>$tmp.err
cat $tmp.out
cat $tmp.err

echo && echo "Verify no pmval coredump..."
pmval -z -a badarchives/logsummary-bug kernel.all.cpu.wait.total >$tmp.out 2>$tmp.err
cat $tmp.out
cat $tmp.err

echo && echo "Verify no pmval+derived metrics coredump..."
cat <<End-of-File >$tmp.config
qa = kernel.all.cpu.wait.total + kernel.all.cpu.wait.total
End-of-File
PCP_DERIVED_CONFIG=$tmp.config pmval -z -a badarchives/logsummary-bug qa >$tmp.out 2>$tmp.err
cat $tmp.out
cat $tmp.err

echo && echo "Verify no pmie coredump..."
echo "wait = kernel.all.cpu.wait.total;" >$tmp.pmie
pmie -v -z -a badarchives/logsummary-bug -c $tmp.pmie >$tmp.out 2>$tmp.err
cat $tmp.out
cat $tmp.err

echo && echo "Verify no pmie+derived metrics coredump..."
echo "qa = qa;" >$tmp.pmie
PCP_DERIVED_CONFIG=$tmp.config pmie -v -z -a badarchives/logsummary-bug -c $tmp.pmie >$tmp.out 2>$tmp.err
cat $tmp.out
cat $tmp.err

echo && echo "Verify no pmrep coredump..."
pmrep -z -I -o csv -r -a badarchives/logsummary-bug.meta "" >$tmp.out 2>$tmp.err
cat $tmp.out
cat $tmp.err

# success, all done
status=0
exit