pmrep: update TODO, man page
[pcp.git] / qa / 946
blobc443c229663152e62d3f10ba1f17f8538f9a387a
1 #!/bin/sh
2 # PCP QA Test No. 946
3 # Test using the pmfind app to find pmcd servers using the avahi discovery mechanism
5 # Copyright (c) 2014 Red Hat. All Rights Reserved.
8 seq=`basename $0`
9 echo "QA output created by $seq"
11 # get standard environment, filters and checks
12 . ./common.discovery
14 _get_libpcp_config
15 $service_discovery || _notrun "No support for service discovery"
17 # Make sure that the avahi mechanism is available.
18 discovery_available=false
19 avahi-daemon --check 2>/dev/null && discovery_available=true
20 $discovery_available || _notrun "avahi discovery mechanism is not available"
22 status=1 # failure is the default!
23 $sudo rm -rf $tmp.* $seq.full
24 trap "cd $here; rm -rf $tmp.*; exit \$status" 0 1 2 3 15
26 # real QA test starts here
27 _control_service_discovery
29 echo "-m avahi" | tee -a $here/$seq.full
30 pmfind -m avahi | _filter_discovery_unresolved
31 echo "Exit status: $?"
33 echo "-s pmcd -m avahi -r" | tee -a $here/$seq.full
34 pmfind -s pmcd -m avahi -r | _filter_discovery_resolved
35 echo "Exit status: $?"
37 echo "-q -m avahi"
38 pmfind -q -m avahi
39 echo "Exit status: $?"
41 echo "-q -s pmcd -m avahi"
42 pmfind -q -s pmcd -m avahi
43 echo "Exit status: $?"
45 echo "-q -s pmcd -m avahi,timeout=5.0"
46 pmfind -q -s pmcd -m avahi,timeout=5.0
47 # up to 5 seconds may elapse here
48 echo "Exit status: $?"
50 echo "-q -s pmcd -m avahi with AVAHI_DISCOVERY_TIMEOUT=5"
51 AVAHI_DISCOVERY_TIMEOUT=5 pmfind -q -s pmcd -m avahi
52 # up to 5 seconds may elapse here
53 echo "Exit status: $?"
55 echo "-m all" | tee -a $here/$seq.full
56 pmfind -m all | _filter_discovery_unresolved
57 echo "Exit status: $?"
59 echo "-m all --resolve" | tee -a $here/$seq.full
60 pmfind -m all --resolve | _filter_discovery_resolved
61 echo "Exit status: $?"
63 # success, all done
64 status=0
66 exit