This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH][Cleanup] testsuite cleanup patches


Hi,

I found that testsuite failed to cleanup some temporary files.
Here are 3 patches which fix following issues.

1. Bulk output files created by systemtap.printf/*b.exp are not erased.
  Basically, this issue was caused by passing local variables to as_root.

- testsuite-cleanup-tmpfile.patch fixes this issue by passing evaluated
 command string to as_root.


2. PROCFS.ko created by systemtap.base/procfs.exp is not erased.

- testsuite-cleanup-procfs.patch erases it at the tail of procfs.exp.


3. systemtap_test_module* created by systemtap.context/context.exp
   are not unloaded nor be erased. Actually, the context.exp has
   its cleanup routine but not uses it.

- testsuite-cleanup-context-testdir.patch invokes the cleanup routine
  at the tail of context.exp.


Here is an unsolved issue:
4. Some /tmp/stapXXXXX directories are not erased. I found one of these
   was created by systemtap.base/debugpath.exp, but there might be other
   scripts which also failed to erase. we need to dig it deeply.

Thanks,

-- 
Masami Hiramatsu

Software Engineer
Hitachi Computer Products (America) Inc.
Software Solutions Division

e-mail: mhiramat@redhat.com

---
 testsuite/systemtap.printf/end1b.exp      |    8 ++++----
 testsuite/systemtap.printf/mixed_outb.exp |    8 ++++----
 testsuite/systemtap.printf/out1b.exp      |    8 ++++----
 testsuite/systemtap.printf/out2b.exp      |    8 ++++----
 testsuite/systemtap.printf/out3b.exp      |    8 ++++----
 5 files changed, 20 insertions(+), 20 deletions(-)

Index: src/testsuite/systemtap.printf/end1b.exp
===================================================================
--- src.orig/testsuite/systemtap.printf/end1b.exp	2008-02-05 17:53:43.000000000 -0500
+++ src/testsuite/systemtap.printf/end1b.exp	2008-02-05 17:55:07.000000000 -0500
@@ -18,24 +18,24 @@
 if {[catch {exec stap -b -o $tmpfile $test} res]} {
     untested $TEST_NAME
     puts "stap failed: $res"
-    as_root {/bin/rm -f [glob ${tmpfile}*]}
+    as_root "/bin/rm -f [glob ${tmpfile}*]"
     return
 }
 
 if {[catch {eval [list exec $stap_merge_path -o $tmpfile] [glob "${tmpfile}_*"]} res]} {
     puts "merge failed: $res"
     fail "$TEST_NAME failed"
-    as_root {/bin/rm -f [glob ${tmpfile}*]}
+    as_root "/bin/rm -f [glob ${tmpfile}*]"
     return
 }
 
 if {[catch {exec cmp $tmpfile $srcdir/$subdir/large_output} res]} {
     puts "$res"
     fail "$TEST_NAME failed"
-    as_root {/bin/rm -f [glob ${tmpfile}*]}
+    as_root "/bin/rm -f [glob ${tmpfile}*]"
     return
 }
 
 pass "$TEST_NAME passed"
-as_root {/bin/rm -f [glob ${tmpfile}*]}
+as_root "/bin/rm -f [glob ${tmpfile}*]"
 
Index: src/testsuite/systemtap.printf/mixed_outb.exp
===================================================================
--- src.orig/testsuite/systemtap.printf/mixed_outb.exp	2008-02-05 17:53:43.000000000 -0500
+++ src/testsuite/systemtap.printf/mixed_outb.exp	2008-02-05 17:55:07.000000000 -0500
@@ -18,24 +18,24 @@
 if {[catch {exec stap -DMAXACTION=100000 -b -o $tmpfile $test} res]} {
     untested $TEST_NAME
     puts "stap failed: $res"
-    as_root {/bin/rm -f [glob ${tmpfile}*]}
+    as_root "/bin/rm -f [glob ${tmpfile}*]"
     return
 }
 
 if {[catch {eval [list exec $stap_merge_path -o $tmpfile] [glob "${tmpfile}_*"]} res]} {
     puts "merge failed: $res"
     fail "$TEST_NAME failed"
-    as_root {/bin/rm -f [glob ${tmpfile}*]}
+    as_root "/bin/rm -f [glob ${tmpfile}*]"
     return
 }
 
 if {[catch {exec cmp $tmpfile $srcdir/$subdir/large_output} res]} {
     puts "$res"
     fail "$TEST_NAME failed"
-    as_root {/bin/rm -f [glob ${tmpfile}*]}
+    as_root "/bin/rm -f [glob ${tmpfile}*]"
     return
 }
 
 pass "$TEST_NAME passed"
-as_root {/bin/rm -f [glob ${tmpfile}*]}
+as_root "/bin/rm -f [glob ${tmpfile}*]"
 
Index: src/testsuite/systemtap.printf/out1b.exp
===================================================================
--- src.orig/testsuite/systemtap.printf/out1b.exp	2008-02-05 17:53:43.000000000 -0500
+++ src/testsuite/systemtap.printf/out1b.exp	2008-02-05 17:55:07.000000000 -0500
@@ -18,24 +18,24 @@
 if {[catch {exec stap -b -o $tmpfile $test} res]} {
     untested $TEST_NAME
     puts "stap failed: $res"
-    as_root {/bin/rm -f [glob ${tmpfile}*]}
+    as_root "/bin/rm -f [glob ${tmpfile}*]"
     return
 }
 
 if {[catch {eval [list exec $stap_merge_path -o $tmpfile] [glob "${tmpfile}_*"]} res]} {
     puts "merge failed: $res"
     fail "$TEST_NAME failed"
-    as_root {/bin/rm -f [glob ${tmpfile}*]}
+    as_root "/bin/rm -f [glob ${tmpfile}*]"
     return
 }
 
 if {[catch {exec cmp $tmpfile $srcdir/$subdir/large_output} res]} {
     puts "$res"
     fail "$TEST_NAME failed"
-    as_root {/bin/rm -f [glob ${tmpfile}*]}
+    as_root "/bin/rm -f [glob ${tmpfile}*]"
     return
 }
 
 pass "$TEST_NAME passed"
-as_root {/bin/rm -f [glob ${tmpfile}*]}
+as_root "/bin/rm -f [glob ${tmpfile}*]"
 
Index: src/testsuite/systemtap.printf/out2b.exp
===================================================================
--- src.orig/testsuite/systemtap.printf/out2b.exp	2008-02-05 17:53:43.000000000 -0500
+++ src/testsuite/systemtap.printf/out2b.exp	2008-02-05 17:55:07.000000000 -0500
@@ -18,24 +18,24 @@
 if {[catch {exec stap -b -o $tmpfile $test} res]} {
     untested $TEST_NAME
     puts "stap failed: $res"
-    as_root {/bin/rm -f [glob ${tmpfile}*]}
+    as_root "/bin/rm -f [glob ${tmpfile}*]"
     return
 }
 
 if {[catch {eval [list exec $stap_merge_path -o $tmpfile] [glob "${tmpfile}_*"]} res]} {
     puts "merge failed: $res"
     fail "$TEST_NAME failed"
-    as_root {/bin/rm -f [glob ${tmpfile}*]}
+    as_root "/bin/rm -f [glob ${tmpfile}*]"
     return
 }
 
 if {[catch {exec cmp $tmpfile $srcdir/$subdir/large_output} res]} {
     puts "$res"
     fail "$TEST_NAME failed"
-    as_root {/bin/rm -f [glob ${tmpfile}*]}
+    as_root "/bin/rm -f [glob ${tmpfile}*]"
     return
 }
 
 pass "$TEST_NAME passed"
-as_root {/bin/rm -f [glob ${tmpfile}*]}
+as_root "/bin/rm -f [glob ${tmpfile}*]"
 
Index: src/testsuite/systemtap.printf/out3b.exp
===================================================================
--- src.orig/testsuite/systemtap.printf/out3b.exp	2008-02-05 17:53:43.000000000 -0500
+++ src/testsuite/systemtap.printf/out3b.exp	2008-02-05 17:55:07.000000000 -0500
@@ -18,24 +18,24 @@
 if {[catch {exec stap -DMAXACTION=100000 -b -o $tmpfile $test} res]} {
     untested $TEST_NAME
     puts "stap failed: $res"
-    as_root {/bin/rm -f [glob ${tmpfile}*]}
+    as_root "/bin/rm -f [glob ${tmpfile}*]"
     return
 }
 
 if {[catch {eval [list exec $stap_merge_path -o $tmpfile] [glob "${tmpfile}_*"]} res]} {
     puts "merge failed: $res"
     fail "$TEST_NAME failed"
-    as_root {/bin/rm -f [glob ${tmpfile}*]}
+    as_root "/bin/rm -f [glob ${tmpfile}*]"
     return
 }
 
 if {[catch {exec cmp $tmpfile $srcdir/$subdir/large_output} res]} {
     puts "$res"
     fail "$TEST_NAME failed"
-    as_root {/bin/rm -f [glob ${tmpfile}*]}
+    as_root "/bin/rm -f [glob ${tmpfile}*]"
     return
 }
 
 pass "$TEST_NAME passed"
-as_root {/bin/rm -f [glob ${tmpfile}*]}
+as_root "/bin/rm -f [glob ${tmpfile}*]"
 
---
 testsuite/systemtap.base/procfs.exp |    2 ++
 1 file changed, 2 insertions(+)

Index: src/testsuite/systemtap.base/procfs.exp
===================================================================
--- src.orig/testsuite/systemtap.base/procfs.exp	2008-02-05 17:53:42.000000000 -0500
+++ src/testsuite/systemtap.base/procfs.exp	2008-02-05 17:55:08.000000000 -0500
@@ -110,3 +110,5 @@
 # test procfs probes
 set output_string "\\mfinal value = goodbye\\M\r\n"
 stap_run $test proc_read_write $output_string -e $systemtap_script -m $test
+
+exec /bin/rm -f ${test}.ko
---
 testsuite/systemtap.context/context.exp |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Index: src/testsuite/systemtap.context/context.exp
===================================================================
--- src.orig/testsuite/systemtap.context/context.exp	2008-01-07 16:12:53.000000000 -0500
+++ src/testsuite/systemtap.context/context.exp	2008-02-04 18:44:43.000000000 -0500
@@ -76,6 +76,5 @@
     source $test.tcl
 }
 
-
-
+cleanup
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]