Drop unused condition check
[pcp.git] / qa / 868
blob958ee7290755777198102c185a3ea8c4399951c1
1 #!/bin/sh
2 # PCP QA Test No. 868
3 # Some error cases for pmdaproc.sh
5 # Copyright (c) 2015 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 # test for-some-thing || _notrun No support for some-thing
18 status=1 # failure is the default!
19 $sudo rm -rf $tmp $tmp.* $seq.full
20 trap "cd $here; rm -rf $tmp.*; exit \$status" 0 1 2 3 15
22 # real QA test starts here
24 cat >$tmp.sh <<'End-of-File'
25 #!/bin/sh
27 . $PCP_DIR/etc/pcp.env
28 . $PCP_SHARE_DIR/lib/pmdaproc.sh
30 iam=sample
31 forced_restart=false
32 pmda_dir=$PCP_VAR_DIR/pmdas/sample
34 pmdaSetup
35 pmdaInstall
36 End-of-File
38 echo
39 echo "=== Duplicate names in the PMNS ==="
40 $sudo sh $tmp.sh -N
42 cat >$tmp.sh <<'End-of-File'
43 #!/bin/sh
45 . $PCP_DIR/etc/pcp.env
46 . $PCP_SHARE_DIR/lib/pmdaproc.sh
48 iam=sample
49 forced_restart=false
50 pmda_dir=/really/bad/directory
51 pmns_dupok=true
53 pmdaSetup
54 pmdaInstall
55 End-of-File
57 echo
58 echo "=== Bad path for pmda_dir ==="
59 $sudo sh $tmp.sh -N
61 # success, all done
62 status=0
64 exit