Fix some bashism not working on fedora
authorJulien Desfossez <ju@klipix.org>
Thu, 17 Feb 2011 17:18:15 +0000 (12:18 -0500)
committerJulien Desfossez <ju@klipix.org>
Thu, 17 Feb 2011 17:18:15 +0000 (12:18 -0500)
Signed-off-by: Julien Desfossez <julien.desfossez@polymtl.ca>
ust-systemtap-tracepoints/runtest.sh

index 9301162730f25bd980e724d65a25d2d9922cc989..748109067ad9dee409b32741dd195f1ecdbe140a 100644 (file)
@@ -9,7 +9,8 @@
 
 # You need to be root to run the SystemTap tests because of the rmmod
 
-BINARY=tracepoint_benchmark
+BINARY=./tracepoint_benchmark
+MODNAME=tpbench
 REPORT=/tmp/testreport
 TMPLOG=/tmp/testlog
 WRAPPER=""
@@ -43,13 +44,13 @@ ust_disk() {
 stap_flight_recorder() {
        echo -n "* SystemTap Flight recorder : " | tee >> $REPORT
        WRAPPER=""
-       $STAP $STAPPROBE -F -m $BINARY
+       $STAP $STAPPROBE -F -m $MODNAME
 }
 
 stap_disk() {
        echo -n "* SystemTap Write to disk : " | tee >> $REPORT
        WRAPPER=""
-       $STAP $STAPPROBE -o $STAPTMP -m $BINARY &
+       $STAP $STAPPROBE -o $STAPTMP -m $MODNAME &
        sleep 5
 }
 
@@ -63,7 +64,7 @@ case "$1" in
                ;;
        stap_flight_recorder)
                TEST=stap_flight_recorder
-               CLEANUP="rmmod $BINARY 2>/dev/null"
+               CLEANUP="rmmod $MODNAME 2>/dev/null"
                ;;
        stap_disk)
                TEST=stap_disk
@@ -80,16 +81,16 @@ for nr_threads in 1 2 4 8; do
        echo Number of threads: $nr_threads | tee >> $REPORT
        echo -n "* Baseline : " | tee >> $REPORT
 
-       $CLEANUP
+       eval $CLEANUP
 
        sync
-       /usr/bin/time -f "%E" -o $TMPLOG ./$BINARY ${nr_threads}
+       /usr/bin/time -f "%E" -o $TMPLOG $BINARY ${nr_threads}
        cat $TMPLOG >> $REPORT
 
        $TEST
 
        sync
-       /usr/bin/time -f "%E" -o $TMPLOG $WRAPPER ./$BINARY ${nr_threads}
+       /usr/bin/time -f "%E" -o $TMPLOG $WRAPPER $BINARY ${nr_threads}
        cat $TMPLOG >> $REPORT
 done
 
This page took 0.024162 seconds and 4 git commands to generate.