docs: tweak formatting in pmrep(1) archive folio example
[pcp.git] / qa / 501
blobcc6a7265a7436f75297d51bcfd36fed650547574
1 #! /bin/sh
2 # PCP QA Test No. 501
3 # COPY of PCP QA Test No. 413 with different 2.0/2.0+ output ...
4 # #552517 pmie dumps core with bad metric and -V or -W
6 # Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
9 seq=`basename $0`
10 echo "QA output created by $seq"
12 rm -f $seq.out
13 case $PCP_PLATFORM
15 irix)
16 ln $seq-irix.out $seq.out || exit 1
18 linux|darwin|solaris)
19 ln $seq-linux.out $seq.out || exit 1
22 _notrun "Need qualified output for $PCP_PLATFORM"
24 esac
26 # get standard filters
27 . ./common.product
28 . ./common.filter
29 . ./common.check
31 status=0 # success is the default!
32 host=`hostname`
33 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
34 $sudo rm -f core* $seq.core*
36 _filter()
38 _filter_pmie_log \
39 | sed \
40 -e 's/: *[0-9][0-9]*\.[0-9]*e[-+][0-9][0-9]*/: NUMBER/' \
41 -e 's/: *[0-9][0-9]*e[-+][0-9][0-9]*/: NUMBER/' \
42 -e 's/: *[0-9][0-9]*\.[0-9]*/: NUMBER/' \
43 -e 's/: *[0-9][0-9]*/: NUMBER/' \
44 -e "s/$host/HOST/" \
45 -e "s/local:/HOST/"
48 # real QA test starts here
50 for arg in -v -V -W
52 echo
53 echo "=== pmie $arg ... ==="
54 cat <<End-of-File | pmie -f -l $tmp.log $arg -t 2sec -T 3sec >$tmp.out
55 // arithmetic expressions
56 valid_a = hinv.ncpu;
57 alone_a = no.such.metric;
58 sum1_a = mem.physmem + no.such.metric;
59 sum2_a = no.such.metric + mem.physmem;
60 product_a = no.such.metric * hinv.physmem;
61 compound1_a = mem.physmem + no.such.metric * hinv.ncpu;
62 compound2_a = (no.such.metric + mem.physmem) * hinv.ncpu;
64 // boolean expressions
65 valid_b = 0 < hinv.ncpu;
66 alone_b = 0 < no.such.metric;
67 sum1_b = 0 < mem.physmem + no.such.metric;
68 sum2_b = 0 < no.such.metric + mem.physmem;
69 product_b = 0 < no.such.metric * hinv.physmem;
70 compound1_b = 0 < mem.physmem + no.such.metric * hinv.ncpu;
71 compound2_b = 0 < (no.such.metric + mem.physmem) * hinv.ncpu;
73 // existential expressions
74 valid_s = some_inst 500 < sample.bin;
75 alone_s = some_inst 0 < no.such.metric;
76 sum1_s = some_inst 0 < sample.bin + no.such.metric;
77 sum2_s = some_inst 0 < no.such.metric + sample;
78 product_s = some_inst 0 < no.such.metric * sample.bin;
79 compound1_s = some_inst 0 < sample.bin + no.such.metric * sample.bin;
80 compound2_s = some_inst 0 < (no.such.metric + mem.physmem) * hinv.ncpu;
82 // no support
83 one = sample.long.one;
84 no1 = sample.bad.nosupport;
85 no2 = sample.long.one + sample.bad.nosupport;
86 mill = -1 * (sample.long.one - (sample.long.one + sample.long.ten + sample.long.million)) / sample.long.one;
87 no3 = (sample.long.one - (sample.long.one + sample.long.ten + sample.bad.nosupport)) / sample.long.one;
88 no4 = (sample.long.one - (sample.long.one + sample.long.ten + sample.long.million)) / sample.bad.nosupport;
90 // not-numeric
91 notnum1 = sample.string.hullo;
92 notnum2 = 1 != sample.string.hullo;
93 notnum3 = (sample.long.one - (sample.long.one + sample.long.ten + sample.string.hullo)) / sample.long.one;
94 notnum4 = (sample.long.one - (sample.long.one + sample.long.ten + sample.long.million)) / sample.string.hullo;
97 End-of-File
99 cat $tmp.out $tmp.log | _filter
101 echo
102 _check_core
103 done
105 exit