pmrep: update TODO, man page
[pcp.git] / qa / 720
blobfa5f8c5849596f3b53982d11f6afc19934eea64e
1 #!/bin/sh
2 # PCP QA Test No. 720
3 # Exercise the pmParseHostAttrsSpec API family
5 seq=`basename $0`
6 echo "QA output created by $seq"
8 # get standard environment, filters and checks
9 . ./common.product
10 . ./common.filter
11 . ./common.check
13 _check_valgrind
14 [ $PCP_VER -ge 30800 ] || _notrun "Installed libpcp lacks host parse APIs"
16 status=0 # success is the default!
17 $sudo rm -rf $tmp.* $seq.full
18 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
20 _run_valgrind src/parsehostattrs pcps://nas1.servers.com:44321,4321@firewall.servers.com:44322?compress
21 _run_valgrind src/parsehostattrs pcp://localhost:23?compress
22 _run_valgrind src/parsehostattrs pcp://some.host?user=pcpqa\&compress\&pass=blah
23 _run_valgrind src/parsehostattrs pcp://some.host?user=pcpqa
24 _run_valgrind src/parsehostattrs some.host?user=pcpqa
25 _run_valgrind src/parsehostattrs some.host
26 _run_valgrind src/parsehostattrs pcp://?compress\&exclusive
28 _filter_auth()
30 # filter all the wierd and wonderful ways that SASL and its merry modules
31 # might fail, into one canonical form ("authentication failure").
33 # Noise ...
34 # [Fri Feb 13 23:00:29] pminfo(9819) Alert: GSSAPI Error: Unspecified GSS failure. Minor code may provide more information (Credentials cache file '/tmp/krb5cc_1000' not found)
35 # [Fri Mar 6 19:14:35] pminfo(20207) Alert: No worthy mechs found
37 # equivalence ...
38 # pminfo: ...notApassword": Authentication - generic failure
39 # and
40 # Error: Authentication - user not found
41 # and
42 # pminfo: ...notApassword": Authentication - authentication failure
43 # and
44 # pminfo: ...notApassword": Operation not supported
45 # are considered equivalent to
46 # Error: Authentication - authentication failure
48 tee -a $seq.full | \
49 sed \
50 -e '/pminfo.* GSSAPI Error:/d' \
51 -e '/pminfo.* No worthy mechs found/d' \
52 -e 's/^pminfo: .*Authentication -/Error: Authentication -/g' \
53 -e 's/^pminfo: .*Operation/Error: Authentication -/g' \
54 -e '/Error: Authentication/s/ - generic failure/ - authentication failure/g' \
55 -e '/Error: Authentication/s/ - no mechanism available/ - authentication failure/g' \
56 -e '/Error: Authentication/s/ - user not found/ - authentication failure/g' \
57 -e '/Error: Authentication/s/ - not supported/ - authentication failure/g' \
58 # end
61 echo "pminfo username/password failure valgrind checking" >> $seq.full
62 _run_valgrind pminfo -h pcp://localhost?user=NOsuchUSER\&pass=DEFINITELYnotApassword 2>&1 | _filter_auth