pmrep: update TODO, man page
[pcp.git] / qa / 786
blobaaf3993f598dd9e001fc985a110a4e2730440ab2
1 #!/bin/sh
2 # PCP QA Test No. 786
3 # exercise pmGetContextHostName and pmGetContextHostName_r
5 # Copyright (c) 2014 Ken McDonell. 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=1 # failure is the default!
17 $sudo rm -rf $tmp.* $seq.full
18 trap "cd $here; rm -rf $tmp.*; exit \$status" 0 1 2 3 15
20 host=`hostname`
22 _filter()
24 sed -e "s/$host/HOSTNAME/"
27 # real QA test starts here
28 for arg in "" "-h $host" -L "-a archives/babylon.percpu_v2" "-h localhost" \
29 "-h local:" "-h unix:" \
30 "-h no.such.host.pcp.io" "-a /no/such/archive"
32 echo
33 echo "=== $arg ==="
34 src/getcontexthost $arg 2>&1
35 done | _filter
37 # success, all done
38 status=0
40 exit