Drop unused condition check
[pcp.git] / qa / 170
blobe6b9df746b582694327d984da5f808dbf5e8b8bc
1 #! /bin/sh
2 # PCP QA Test No. 170
3 # Test $PCP_RC_DIR/pcp script pmcd log location
5 # Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
8 seq=`basename $0`
9 echo "QA output created by $seq"
11 . ./common.product
12 . ./common.check
13 . ./common.filter
15 status=0
17 _cleanup()
19 _restore_config $PCP_PMCDOPTIONS_PATH
20 $sudo rm -f $tmp.*
21 $sudo $PCP_RC_DIR/pcp restart | _filter_pcp_start
22 _wait_for_pmcd
23 _wait_for_pmlogger
24 exit $status
27 trap _cleanup 0 1 2 3 15
29 # real QA test starts here
31 rm -rf $tmp.* $seq.full
32 echo "First, the standard logfile:" | tee -a $seq.full
33 $sudo $PCP_RC_DIR/pcp stop >/dev/null
34 $sudo rm -f $PCP_LOG_DIR/pmcd/pmcd.log
35 $sudo $PCP_RC_DIR/pcp start | tee -a $seq.full >$tmp.out
36 _wait_for_pmcd
37 _wait_for_pmlogger
38 grep -i 'starting pmcd' $tmp.out | _filter_pcp_start
39 if [ -f $PCP_LOG_DIR/pmcd/pmcd.log ]
40 then
41 echo '$PCP_LOG_DIR/pmcd/pmcd.log created'
42 else
43 echo 'Error: $PCP_LOG_DIR/pmcd/pmcd.log not created'
44 status=1
46 echo ""
48 _save_config $PCP_PMCDOPTIONS_PATH
49 cp $PCP_PMCDOPTIONS_PATH $tmp.options
50 cat <<End-Of-File >>$tmp.options
51 # Dummy lines added by PCP QA test 170
53 -l $tmp.1.pmcd.log
54 -l $tmp.2.pmcd.log
55 End-Of-File
56 $sudo cp $tmp.options $PCP_PMCDOPTIONS_PATH
58 echo "The logfile from the hacked \$PCP_PMCDOPTIONS_PATH (pmcd.options):" | tee -a $seq.full
59 $sudo $PCP_RC_DIR/pcp restart | tee -a $seq.full >$tmp.out
60 _wait_for_pmcd
61 _wait_for_pmlogger
62 grep -i 'starting pmcd' $tmp.out | sed -e "s/$$/MYPID/" | _filter_pcp_start
63 if [ -f $tmp.1.pmcd.log ]
64 then
65 echo 'Error: $tmp.1.pmcd.log created unexpectedly'
66 ls -l $tmp.1.pmcd.log
67 cat $tmp.1.pmcd.log
68 status=1
70 if [ -f $tmp.2.pmcd.log ]
71 then
72 echo '$tmp.2.pmcd.log created'
73 else
74 echo 'Error: $tmp.2.pmcd.log not created'
75 status=1
78 exit