3 # check bug #580005 - trace PMDA doesn't exit if address in use
5 # Copyright (c) 2015 Red Hat.
6 # Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
10 echo "QA output created by $seq"
12 # get standard filters
17 [ -f $PCP_PMDAS_DIR/trace
/pmdatrace
] || _notrun
"trace pmda not installed"
23 _restore_config
$PCP_PMCDCONF_PATH
24 $sudo $PCP_RC_DIR/pcp restart | _filter_pcp_start
29 status
=1 # failure is the default!
31 trap "_cleanup; exit \$status" 0 1 2 3 15
33 case "$PCP_PLATFORM" in
36 TRACELOG
=$PCP_LOG_DIR/pmcd
/trace.log
37 cat >> $tmp.conf
<< EOF
38 # temporary pmcd.conf for qa/$seq
39 pmcd 2 dso pmcd_init $PCP_PMDAS_DIR/pmcd/pmda_pmcd.so
40 linux 60 dso linux_init $PCP_PMDAS_DIR/linux/pmda_linux.so
41 trace 10 pipe binary $PCP_PMDAS_DIR/trace/pmdatrace -d 10 -l ${TRACELOG}1
42 trace 99 pipe binary $PCP_PMDAS_DIR/trace/pmdatrace -d 99 -l ${TRACELOG}2
47 TRACELOG
=$PCP_LOG_DIR/pmcd
/trace.log
48 cat >> $tmp.conf
<< EOF
49 # temporary pmcd.conf for qa/$seq
50 pmcd 2 dso pmcd_init $PCP_PMDAS_DIR/pmcd/pmda_pmcd.dylib
51 darwin 78 dso darwin_init $PCP_PMDAS_DIR/darwin/pmda_darwin.dylib
52 trace 10 pipe binary $PCP_PMDAS_DIR/trace/pmdatrace -d 10 -l ${TRACELOG}1
53 trace 99 pipe binary $PCP_PMDAS_DIR/trace/pmdatrace -d 99 -l ${TRACELOG}2
58 TRACELOG
=$PCP_LOG_DIR/pmcd
/trace.log
59 cat >> $tmp.conf
<< EOF
60 # temporary pmcd.conf for qa/$seq
61 pmcd 2 dso pmcd_init $PCP_PMDAS_DIR/pmcd/pmda_pmcd.so
62 solaris 75 dso solaris_init $PCP_PMDAS_DIR/solaris/pmda_solaris.so
63 trace 10 pipe binary $PCP_PMDAS_DIR/trace/pmdatrace -d 10 -l ${TRACELOG}1
64 trace 99 pipe binary $PCP_PMDAS_DIR/trace/pmdatrace -d 99 -l ${TRACELOG}2
69 echo "Unknown platfrom $PCP_PLATFORM"
74 # real QA test starts here
75 $sudo rm -f ${TRACELOG}?
$seq.full
76 _save_config
$PCP_PMCDCONF_PATH
77 $sudo cp $tmp.conf
$PCP_PMCDCONF_PATH
78 $sudo $PCP_RC_DIR/pcp restart | _filter_pcp_start
82 for log
in ${TRACELOG}?
84 fgrep
"Address already in use" <$log >/dev
/null
2>&1
90 -e 's/[A-Z][a-z][a-z] [A-Z][a-z][a-z] *[0-9][0-9]* [0-9][0-9]:[0-9][0-9]:[0-9][0-9] [0-9][0-9][0-9][0-9]$/DATE/'\
91 -e 's/[A-Z][a-z][a-z] [A-Z][a-z][a-z] *[0-9][0-9]* [0-9][0-9]:[0-9][0-9]:[0-9][0-9]/TIMESTAMP/g' \
93 -e 's/\([0-9][0-9]*\)/PID/'
100 echo "--- No match on 'Address already in use' in trace logs ---"
101 echo "--- trace log #1 ---"
103 echo "--- trace log #2 ---"
105 echo "--- End of trace logs ---"