summaryrefslogtreecommitdiff
path: root/qa/957
blob: 0cbe1731dab90568e0a1631911d8c617888b7141 (plain)
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
#!/bin/sh
# PCP QA Test No. 957
# Run valgrind on the Linux kernel PMDA metrics
#
# Copyright (c) 2014 Red Hat.
#

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

# get standard environment, filters and checks
. ./common.product
. ./common.filter
. ./common.check

_check_valgrind
pmns=$PCP_VAR_DIR/pmns/root_linux
[ -f $pmns ] || _notrun "Cannot find the Linux PMDA namespace root"

status=1	# failure is the default!
$sudo rm -rf $tmp.* $seq.full
trap "cd $here; rm -rf $tmp.*; exit \$status" 0 1 2 3 15

_filter()
{
    sed \
	-e '/No value.s. available/d' \
	-e '/^Warning: noted but unhandled ioctl/d' \
	-e '/^This could cause spurious value errors/d' \
	-e '/^See README_MISSING_SYSCALL_OR_IOCTL/d' \
    #
}

# real QA test starts here
pmda="-Kclear -Kadd,60,$PCP_PMDAS_DIR/linux/pmda_linux.so,linux_init"
trees=`pminfo -n $pmns | $PCP_AWK_PROG -F. '{ print $1 }' | sort -u`

for subtree in $trees
do
    echo
    echo "=== CHECKING SUBTREE: $subtree"
    echo
    _run_valgrind pminfo -v -L $pmda $subtree 2>&1 | _filter
done

# success, all done
status=0
exit