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] Use user specific systemtap cache in testsuite


Hi,

I was seeing strange testsuite failures and finally tracked it down to
having run sudo make instalcheck once which created a cache directory
owned by root. After that make check would sometimes fail if it couldn't
properly access the cache dir. The following patch makes sure that the
cache directory in the testsuite is user specific so they don't
conflict.

make installcheck still depends on clean which does try to remove the
cache dirs (but might silently fail). I don't think this is really
necessary anymore.

But currently the testsuite hangs at the end because of this commit:

commit 7938bd829dfd82c40b35d536b5913e666c1454d2
Author: Frank Ch. Eigler <fche@elastic.org>
Date:   Tue May 27 17:40:00 2008 -0400

    testsuite: use catch{close}catch{wait} to ensure child process
pipe/zombie cleanup

It seems not everybody is seeing this though. And I don't immediately
see what is causing the hang in this patch.

Cheers,

Mark
diff --git a/testsuite/ChangeLog b/testsuite/ChangeLog
index f5f51fa..d49d777 100644
--- a/testsuite/ChangeLog
+++ b/testsuite/ChangeLog
@@ -1,3 +1,12 @@
+2008-05-28  Mark Wielaard  <mwielaard@redhat.com>
+
+	* lib/systemtap.exp (setup_systemtap_environment): Create user
+	based cache dir.
+	* systemtap.base/cache.exp: Likewise.
+	* Makefile.am (clean-local): Try to remove all .systemtap and
+	.cache_test dirs.
+
+
 2008-05-27  Frank Ch. Eigler  <fche@elastic.org>
 
 	* lib/systemtap.exp (closewait): New proc for aggressive child
diff --git a/testsuite/Makefile.am b/testsuite/Makefile.am
index 2602a16..fe089f5 100644
--- a/testsuite/Makefile.am
+++ b/testsuite/Makefile.am
@@ -9,7 +9,7 @@ all-local:
 
 clean-local:
 	-rm -f ./stap site.exp systemtap.sum systemtap.log
-	-rm -rf .systemtap .cache_test 2>/dev/null
+	-rm -rf .systemtap* .cache_test* 2>&1 /dev/null
 
 DEJAZILLA=@dejazilla@
 
diff --git a/testsuite/lib/systemtap.exp b/testsuite/lib/systemtap.exp
index 4586ee2..74fcc7a 100644
--- a/testsuite/lib/systemtap.exp
+++ b/testsuite/lib/systemtap.exp
@@ -38,8 +38,9 @@ proc setup_systemtap_environment {} {
         set env(SRCDIR) $srcdir/..
     }
 
-    # Use a local systemtap directory and cache
-    set env(SYSTEMTAP_DIR) [exec pwd]/.systemtap
+    # Use a local systemtap directory and cache.  Add user name so
+    # make check and sudo make check don't clobber each other.
+    set env(SYSTEMTAP_DIR) [exec pwd]/.systemtap-[exec whoami]
 
     # PATH, SYSTEMTAP_TAPSET, SYSTEMTAP_RUNTIME, LD_LIBRARY_PATH are already set.
     foreach var {PATH STAP SRCDIR SYSTEMTAP_TAPSET SYSTEMTAP_RUNTIME SYSTEMTAP_DIR LD_LIBRARY_PATH} {
diff --git a/testsuite/systemtap.base/cache.exp b/testsuite/systemtap.base/cache.exp
index a908910..cae45fe 100644
--- a/testsuite/systemtap.base/cache.exp
+++ b/testsuite/systemtap.base/cache.exp
@@ -64,8 +64,9 @@ proc stap_compile { TEST_NAME flags script args } {
 }
 
 # Since we need a clean cache directory, we'll use a temporary
-# systemtap directory and cache
-set local_systemtap_dir [exec pwd]/.cache_test
+# systemtap directory and cache (add user name so make check and
+# sudo make installcheck don't clobber each others)
+set local_systemtap_dir [exec pwd]/.cache_test-[exec whoami]
 exec /bin/rm -rf $local_systemtap_dir
 if [info exists env(SYSTEMTAP_DIR)] {
     set old_systemtap_dir $env(SYSTEMTAP_DIR)

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