]> sourceware.org Git - systemtap.git/commitdiff
Clean up sdt_misc.exp a bit.
authorDavid Smith <dsmith@redhat.com>
Wed, 9 Jul 2014 15:47:24 +0000 (10:47 -0500)
committerDavid Smith <dsmith@redhat.com>
Wed, 9 Jul 2014 15:47:24 +0000 (10:47 -0500)
* testsuite/systemtap.base/sdt_misc.exp: Make log output match the
  commands being run. Catch errors on "system" calls to avoid the test
  aborting with a tcl error. Do an initial cleanup to avoid test
  leftovers, which might have been created by another user.

testsuite/systemtap.base/sdt_misc.exp

index 8f0f57687cd3979b7907aa48df48ee59e6ed03d8..ddf696df68b9e2b52bea92874c497208ae233ebf 100644 (file)
@@ -33,6 +33,9 @@ proc cleanup_handler { verbose } {
     }
 }
 
+# Start with a clean slate
+cleanup_handler 0
+
 # Compile a C program to use as the user-space probing target
 set stap_path $env(SYSTEMTAP_PATH)/stap
 set sup_dpath "[pwd]/sdt_misc_.d"
@@ -170,20 +173,20 @@ for {set i 0} {$i < [llength $pbtype_flags]} {incr i} {
            }
 
            # This is perhaps a wee bit clumsy
-           verbose -log "$loop_exepath >| ,semclean 2>&1 & TEST=\$! ; \
+           verbose -log "$loop_exepath > ,semclean 2>&1 & TEST=\$! ; \
                $stap_path --runtime=$runtime $srcdir/$subdir/sdt_misc.stp $loop_exepath >| ,semout ; \
                /bin/kill -SIGINT \$TEST"
-           system "$loop_exepath >,semclean 2>&1 & TEST=\$! ; \
+           catch {system "$loop_exepath > ,semclean 2>&1 & TEST=\$! ; \
                $stap_path --runtime=$runtime $srcdir/$subdir/sdt_misc.stp $loop_exepath >| ,semout ; \
-               /bin/kill -SIGINT \$TEST"
+               /bin/kill -SIGINT \$TEST"}
        } elseif {[uprobes_p]} {
            # This is perhaps a wee bit clumsy
-           verbose -log "$loop_exepath >| ,semclean 2>&1 & TEST=\$! ; \
+           verbose -log "$loop_exepath > ,semclean 2>&1 & TEST=\$! ; \
                $stap_path $srcdir/$subdir/sdt_misc.stp $loop_exepath >| ,semout ; \
                /bin/kill -SIGINT \$TEST"
-           system "$loop_exepath >,semclean 2>&1 & TEST=\$! ; \
+           catch {system "$loop_exepath > ,semclean 2>&1 & TEST=\$! ; \
                $stap_path $srcdir/$subdir/sdt_misc.stp $loop_exepath >| ,semout ; \
-               /bin/kill -SIGINT \$TEST"
+               /bin/kill -SIGINT \$TEST"}
        } else {
            untested "$test $pbtype_mssg attach"
            continue
@@ -456,20 +459,20 @@ for {set i 0} {$i < [llength $pbtype_flags]} {incr i} {
            }
 
            # This is perhaps a wee bit clumsy
-           verbose -log "$loop_exepath >| ,semclean 2>&1 & TEST=\$! ; \
+           verbose -log "$loop_exepath > ,semclean 2>&1 & TEST=\$! ; \
                $stap_path --runtime=$runtime $srcdir/$subdir/sdt_misc.stp $loop_exepath $supl_sopath >| ,semout ; \
                /bin/kill -SIGINT \$TEST"
-           system "$loop_exepath >,semclean 2>&1 & TEST=\$! ; \
+           catch {system "$loop_exepath > ,semclean 2>&1 & TEST=\$! ; \
                $stap_path --runtime=$runtime $srcdir/$subdir/sdt_misc.stp $loop_exepath $supl_sopath >| ,semout ; \
-               /bin/kill -SIGINT \$TEST"
+               /bin/kill -SIGINT \$TEST"}
        } elseif {[uprobes_p]} {
            # This is perhaps a wee bit clumsy
-           verbose -log "$loop_exepath >| ,semclean 2>&1 & TEST=\$! ; \
+           verbose -log "$loop_exepath > ,semclean 2>&1 & TEST=\$! ; \
                $stap_path $srcdir/$subdir/sdt_misc.stp $loop_exepath $supl_sopath >| ,semout ; \
                /bin/kill -SIGINT \$TEST"
-           system "$loop_exepath >,semclean 2>&1 & TEST=\$! ; \
+           catch {system "$loop_exepath > ,semclean 2>&1 & TEST=\$! ; \
                $stap_path $srcdir/$subdir/sdt_misc.stp $loop_exepath $supl_sopath >| ,semout ; \
-               /bin/kill -SIGINT \$TEST"
+               /bin/kill -SIGINT \$TEST"}
        } else {
            untested "$test $pbtype_mssg shared attach"
            continue
This page took 0.0343 seconds and 5 git commands to generate.