Drop unused condition check
[pcp.git] / qa / 359
blobd6f8b3704806035e0458060a32666b391d378637
1 #!/bin/sh
2 # PCP QA Test No. 359
3 # Simple sanity check that we can get through validation of all
4 # of the metrics without any surprises
6 # Copyright (c) 2010 Ken McDonell. All Rights Reserved.
9 seq=`basename $0`
10 echo "QA output created by $seq"
12 # get standard environment, filters and checks
13 . ./common.product
14 . ./common.filter
15 . ./common.check
17 status=0 # success is the default!
18 $sudo rm -rf $tmp.* $seq.full
19 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
21 _filter()
23 sed \
24 -e '/No value(s) available/d' \
25 -e '/Metric not supported by this version of monitored application/d' \
26 -e '/cgroup\.groups: pmLookupName: Unknown metric name/d' \
27 -e '/proc\.psinfo\.cgroups: No data available/d' \
28 -e '/^sample\.needprofile:/d' \
29 -e '/^sample\.bad\.unknown:/d' \
30 -e '/^sample\.bad\.nosupport:/d' \
31 -e '/^sampledso\.needprofile:/d' \
32 -e '/^sampledso\.bad\.unknown:/d' \
33 -e '/^sampledso\.bad\.nosupport:/d' \
34 -e '/^proc\.schedstat.*: Unknown or .*/d' \
35 -e '/^proc\.schedstat.*: No permission/d' \
36 -e '/^proc\.psinfo.*: No permission/d' \
37 -e '/^proc\.psinfo\.cgroups: Unknown or illegal instance identifier/d' \
38 -e '/^proc\.psinfo\.labels: Unknown or illegal instance identifier/d' \
39 -e '/^proc\.memory.*: No permission/d' \
40 -e '/^proc\.id.*: No permission/d' \
41 -e '/^proc\.fd.*: No permission/d' \
42 -e '/^proc\.io.*: /d' \
43 -e '/^proc\.namespaces.*: /d' \
44 -e '/^papi\..*: No permission/d' \
45 -e '/^pipe\..*: Not Connected/d' \
46 -e '/^postgresql\..*: Missing metric value(s)/d' \
47 -e '/^logger\.perfile\.reg\.records: No permission/d' \
48 -e '/^logger\.perfile\.fifo\.records: Try again./d' \
49 -e '/^logger\.perfile\.reg\.records: Try again./d' \
50 -e '/^containers\..*: pmLookupDesc: Unknown or illegal metric/d' \
51 -e '/^elasticsearch\..*: Try again./d' \
52 -e '/^apache\..*: Try again./d' \
53 -e '/^oracle\..*: Try again./d' \
54 -e '/^nginx\..*: Try again./d' \
55 -e '/^zswap\..*: Try again./d' \
56 -e '/Container not found/d' \
57 #endif
60 # real QA test starts here
62 echo "First attempt ... expect nothing"
63 pminfo -v | _filter
64 echo "Second attempt ... expect nothing"
65 pminfo -v | _filter
67 echo "Once more, but with --container ... expect nothing"
68 containers=`pmprobe -v pmcd.feature.containers 2>/dev/null | awk '{ print $3 }'`
69 if [ "$containers" = "1" ]; then
70 pminfo -v --container=no.such.container | _filter
73 # success, all done
74 exit