Merge branch 'master' of git://git.pcp.io/pcp into qt
[pcp.git] / qa / 339
blob6df16e2ce117173b048052a53d322c09f28a6ba9
1 #! /bin/sh
2 # PCP QA Test No. 339
3 # pmie failure to deal with aggregate operators bound to %v expressions
5 # Copyright (c) 2009 Silicon Graphics, Inc. All Rights Reserved.
8 seq=`basename $0`
9 echo "QA output created by $seq"
11 # get standard environment, filters and checks
12 . ./common.product
13 . ./common.filter
14 . ./common.check
16 status=0 # success is the default!
17 $sudo rm -rf $tmp.*
18 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
20 _filter()
22 _filter_pmie_log \
23 | sed \
24 -e 's/v=[0-9][0-9.]*/v=NUMBER/' \
25 | LC_COLLATE=POSIX sort -u
28 # real QA test starts here
29 cat <<'End-of-File' | pmie -t 1sec -T 4sec >$tmp.out 2>&1
30 test1 = (kernel.all.load #'1 minute') <= sum_inst(kernel.all.load)
31 -> print "TEST1: Left-most single value: v=%v";
32 test2 = sum_inst(kernel.all.load) >= (kernel.all.load #'1 minute')
33 -> print "TEST2: Left-most sum_inst: v=%v";
34 test3 = max_inst(kernel.all.load) >= kernel.all.load #'1 minute'
35 -> print "TEST3: Left-most max_inst: v=%v";
36 test4 = min_inst(kernel.all.load) <= (kernel.all.load #'1 minute')
37 -> print "TEST4: Left-most min_inst: v=%v";
38 test5 = avg_inst(kernel.all.load) >= 0
39 -> print "TEST5: Left-most avg_inst: v=%v";
40 test6 = max_sample(kernel.all.load #'1 minute' @0..1) >= kernel.all.load #'1 minute'
41 -> print "TEST6: Left-most max_sample: v=%v";
42 test7 = min_sample(kernel.all.load #'1 minute' @0..1) <= (kernel.all.load #'1 minute')
43 -> print "TEST7: Left-most min_sample: v=%v";
44 End-of-File
46 _filter <$tmp.out
48 # success, all done
49 exit