3 # lock recursion depth for some pcp apps
5 # Copyright (c) 2012 Ken McDonell. All Rights Reserved.
14 echo "QA output created by $seq"
16 src
/check_fault_injection
>/dev
/null
2>&1 || \
17 _notrun
"libpcp not built with fault injection & lock tracing enabled"
23 _notrun
"PCP source not found at ../src"
26 status
=0 # success is the default!
27 $sudo rm -rf $tmp.
* $seq.full
28 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
30 # we need to run part of the make to get headers and libraries setup
33 for dir
in include libpcp
/src
35 echo "$SRC/$dir ..." >>$seq.full
37 if make 2>$tmp.err
>>$here/$seq.full
39 cat $tmp.err
>>$here/$seq.full
41 echo "Arrgh ... make failed in $SRC/$dir"
53 -e '/lock(/s/^[^ ][^ ]* //p' \
54 | LC_COLLATE
=POSIX
sort \
62 echo "_pre: botch: $1 does not exist"
65 make clean
>/dev
/null
2>&1
66 # This is a gross hack ...
67 # need to over-ride LDFLAGS from the PCP builddefs so we search for
68 # libpcp.so in the libpcp_fault directory
70 if LCFLAGS
=-DPM_MULTI_THREAD_DEBUG=1 LDFLAGS
="-L../../src/libpcp_fault/src" make $2 >$tmp.out
2>&1
73 make clean
>/dev
/null
2>&1
75 echo "_pre: botch: make failed"
86 echo "_post: botch: $1 does not exist"
94 # real QA test starts here
95 export LD_PRELOAD
=$PCP_LIB_DIR/libpcp_fault.so
98 echo "== pminfo ==" |
tee -a $seq.full
99 _pre
$SRC/pminfo pminfo
100 $SRC/pminfo
/pminfo.debug
-v -Dlock >/dev
/null
2>$tmp.trace
101 _post
$SRC/pminfo pminfo
104 echo |
tee -a $seq.full
105 echo "== pmlogger ==" |
tee -a $seq.full
106 sed -e 's/1 sec/50 msec/' <tmparch
/config.foo
>$tmp.config
107 _pre
$SRC/pmlogger
/src pmlogger
108 $SRC/pmlogger
/src
/pmlogger.debug
-Dlock -c $tmp.config
-s 20 -l $tmp.log
$tmp
109 _post
$SRC/pmlogger
/src pmlogger
112 echo |
tee -a $seq.full
113 echo "== pmlogextract ==" |
tee -a $seq.full
116 for i
in 0 index meta
118 cp tmparch
/foo.
$i $tmp-$arch.
$i
121 _pre
$SRC/pmlogextract pmlogextract
122 $SRC/pmlogextract
/pmlogextract.debug
-Dlock $tmp-a $tmp-b $tmp-c $tmp-out 2>$tmp.trace
123 _post
$SRC/pmlogextract pmlogextract
126 echo |
tee -a $seq.full
127 echo "== pmdumplog ==" |
tee -a $seq.full
128 _pre
$SRC/pmdumplog pmdumplog
129 $SRC/pmdumplog
/pmdumplog.debug
-a -Dlock $tmp-out >$tmp.trace
2>&1
130 _post
$SRC/pmdumplog pmdumplog
133 echo |
tee -a $seq.full
134 echo "== dbpmda ==" |
tee -a $seq.full
135 _pre
$SRC/dbpmda
/src dbpmda
137 $SRC/dbpmda
/src
/dbpmda.debug
-Dlock -n $PCP_PMDAS_DIR/simple
/root
-ie >$tmp.trace
2>&1 <<End-of-File
138 open dso $PCP_PMDAS_DIR/simple/pmda_simple.$DSO_SUFFIX simple_init 253
141 fetch simple.numfetch
145 open pipe $PCP_PMDAS_DIR/simple/pmdasimple -d 253
147 fetch simple.numfetch
152 _post
$SRC/dbpmda
/src dbpmda