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.
10 echo "QA output created by $seq"
16 ln $seq-linux.out
$seq.out ||
exit 1
19 _notrun
"Need qualified output for $PCP_PLATFORM"
23 # get standard filters
28 status
=0 # success is the default!
30 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
31 $sudo rm -f core
* $seq.core
* $seq.full
37 -e 's/: *[0-9][0-9]*\.[0-9]*e[-+][0-9][0-9]*/: NUMBER/' \
38 -e 's/: *[0-9][0-9]*e[-+][0-9][0-9]*/: NUMBER/' \
39 -e 's/: *[0-9][0-9]*\.[0-9]*/: NUMBER/' \
40 -e 's/: *[0-9][0-9]*/: NUMBER/' \
45 # real QA test starts here
50 echo "=== pmie $arg ... ==="
51 cat <<End-of-File | pmie -f -l $tmp.log $arg -t 2sec -T 3sec >$tmp.out
52 // arithmetic expressions
54 alone_a = no.such.metric;
55 sum1_a = mem.physmem + no.such.metric;
56 sum2_a = no.such.metric + mem.physmem;
57 product_a = no.such.metric * hinv.physmem;
58 compound1_a = mem.physmem + no.such.metric * hinv.ncpu;
59 compound2_a = (no.such.metric + mem.physmem) * hinv.ncpu;
61 // boolean expressions
62 valid_b = 0 < hinv.ncpu;
63 alone_b = 0 < no.such.metric;
64 sum1_b = 0 < mem.physmem + no.such.metric;
65 sum2_b = 0 < no.such.metric + mem.physmem;
66 product_b = 0 < no.such.metric * hinv.physmem;
67 compound1_b = 0 < mem.physmem + no.such.metric * hinv.ncpu;
68 compound2_b = 0 < (no.such.metric + mem.physmem) * hinv.ncpu;
70 // existential expressions
71 valid_s = some_inst 500 < sample.bin;
72 alone_s = some_inst 0 < no.such.metric;
73 sum1_s = some_inst 0 < sample.bin + no.such.metric;
74 sum2_s = some_inst 0 < no.such.metric + sample;
75 product_s = some_inst 0 < no.such.metric * sample.bin;
76 compound1_s = some_inst 0 < sample.bin + no.such.metric * sample.bin;
77 compound2_s = some_inst 0 < (no.such.metric + mem.physmem) * hinv.ncpu;
80 one = sample.long.one;
81 no1 = sample.bad.nosupport;
82 no2 = sample.long.one + sample.bad.nosupport;
83 mill = -1 * (sample.long.one - (sample.long.one + sample.long.ten + sample.long.million)) / sample.long.one;
84 no3 = (sample.long.one - (sample.long.one + sample.long.ten + sample.bad.nosupport)) / sample.long.one;
85 no4 = (sample.long.one - (sample.long.one + sample.long.ten + sample.long.million)) / sample.bad.nosupport;
88 notnum1 = sample.string.hullo;
89 notnum2 = "g'day" != sample.string.hullo;
90 notnum3 = sample.string.hullo == "hullo world!" && 0 <= (sample.long.one - (sample.long.one + sample.long.ten) / sample.long.one);
91 notnum4 = (sample.long.one - (sample.long.one + sample.long.ten + sample.long.million)) >= 0 && sample.string.hullo == "hullo world!";
96 cat $tmp.out
$tmp.log |
tee -a $seq.full | _filter