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 v4 3/3] PR12331: Add testcase for --sysroot and --sysenv


Signed-off-by: Wade Farnsworth <wade_farnsworth@mentor.com>
---
 testsuite/systemtap.base/sysroot_sysenv.exp |   15 +++++++++++++++
 testsuite/systemtap.base/sysroot_sysenv.stp |    3 +++
 2 files changed, 18 insertions(+), 0 deletions(-)
 create mode 100644 testsuite/systemtap.base/sysroot_sysenv.exp
 create mode 100644 testsuite/systemtap.base/sysroot_sysenv.stp

diff --git a/testsuite/systemtap.base/sysroot_sysenv.exp b/testsuite/systemtap.base/sysroot_sysenv.exp
new file mode 100644
index 0000000..72b6822
--- /dev/null
+++ b/testsuite/systemtap.base/sysroot_sysenv.exp
@@ -0,0 +1,15 @@
+set test "sysroot_sysenv"
+
+if {[installtest_p] && [utrace_p] && [uprobes_p]} {
+  spawn stap --sysroot=/ --sysenv=PATH=$env(PATH) $srcdir/$subdir/$test.stp ls -c "ls > /dev/null"
+  expect {
+    -timeout 180
+    -re {^process begin\r\n} { pass "$test" }
+    timeout { fail "$test (timeout)" }
+    eof { fail "$test" }
+  }
+} else {
+  untested "$test"
+}
+catch {close}
+wait
diff --git a/testsuite/systemtap.base/sysroot_sysenv.stp b/testsuite/systemtap.base/sysroot_sysenv.stp
new file mode 100644
index 0000000..950936f
--- /dev/null
+++ b/testsuite/systemtap.base/sysroot_sysenv.stp
@@ -0,0 +1,3 @@
+probe process(@1).begin {
+  println("process begin")
+}
-- 
1.7.0.4


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