]> sourceware.org Git - systemtap.git/commitdiff
PR12331: Add testcase for --sysroot and --sysenv
authorWade Farnsworth <wade_farnsworth@mentor.com>
Thu, 8 Mar 2012 14:51:00 +0000 (07:51 -0700)
committerJosh Stone <jistone@redhat.com>
Fri, 9 Mar 2012 00:38:04 +0000 (16:38 -0800)
Signed-off-by: Wade Farnsworth <wade_farnsworth@mentor.com>
testsuite/systemtap.base/sysroot_sysenv.exp [new file with mode: 0644]
testsuite/systemtap.base/sysroot_sysenv.stp [new file with mode: 0644]

diff --git a/testsuite/systemtap.base/sysroot_sysenv.exp b/testsuite/systemtap.base/sysroot_sysenv.exp
new file mode 100644 (file)
index 0000000..72b6822
--- /dev/null
@@ -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 (file)
index 0000000..950936f
--- /dev/null
@@ -0,0 +1,3 @@
+probe process(@1).begin {
+  println("process begin")
+}
This page took 0.029872 seconds and 5 git commands to generate.