Drop unused condition check
[pcp.git] / qa / 740
blob63b7497bfffa06809e18fc7eb7ceaf4248aadd75
1 #!/bin/sh
2 # PCP QA Test No. 740
3 # Exercise transfer of pid, uid, gid from client to PMDA
4 # when using Unix domain sockets.
6 # Copyright (c) 2013 Red Hat.
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 _get_libpcp_config
18 $unix_domain_sockets || _notrun "No unix domain socket support available"
20 status=1 # failure is the default!
21 $sudo rm -rf $tmp.* $seq.full
22 trap "cd $here; rm -rf $tmp.*; exit \$status" 0 1 2 3 15
24 rm -f $seq.out
25 case $PCP_PLATFORM
27 darwin)
28 ln $seq.out.darwin $seq.out || exit 1
31 ln $seq.out.default $seq.out || exit 1
33 esac
35 _filter()
37 grep -i attribute | \
38 sed \
39 -e "s/processid=$pid/processid=PID/" \
40 -e "s/groupid=$gid/groupid=GID/" \
41 -e "s/userid=$uid/userid=UID/" \
42 -e '/ctx=[0-9][0-9]*/s//ctx=N/' \
43 -e '/pmdasample([0-9][0-9]*)/s//pmdasample(PID)/' \
44 -e 's/^\[[A-Z].. [A-Z].. *[0-9][0-9]* ..:..:..]/[DATETIME]/'
47 # real QA test starts here
48 $sudo $PCP_RC_DIR/pcp start >/dev/null 2>&1
49 _wait_for_pmcd
50 _wait_for_pmlogger
52 # store to enable verbose attribute diagnostics
53 authdbg=`pmdbg -l | grep DBG_TRACE_AUTH | awk '{ print $2 }'`
54 pmstore sample.control $authdbg
56 # unix domain fetch (with attribute transfer)
57 pminfo -h unix: sample.long.one &
58 pid=$!
59 uid=`id -u`
60 gid=`id -g`
61 wait $!
63 cat $PCP_LOG_DIR/pmcd/sample.log \
64 | tee -a $here/$seq.full \
65 | _filter
66 pmstore sample.control 0
68 # success, all done
69 status=0
71 exit