summaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/ChangeLog14
-rwxr-xr-xtestsuite/parseko/source_context.stp5
-rw-r--r--testsuite/systemtap.base/badkprobe.exp11
-rwxr-xr-x[-rw-r--r--]testsuite/systemtap.base/bz6850.stp0
-rw-r--r--testsuite/systemtap.base/uprobes.exp6
-rw-r--r--testsuite/systemtap.base/warnings.exp2
6 files changed, 36 insertions, 2 deletions
diff --git a/testsuite/ChangeLog b/testsuite/ChangeLog
index 5ddee32c..1664f8c2 100644
--- a/testsuite/ChangeLog
+++ b/testsuite/ChangeLog
@@ -1,3 +1,17 @@
+2008-10-10 Frank Ch. Eigler <fche@elastic.org>
+
+ PR6749.
+ * systemtap.base/badkprobe.exp: New test.
+
+2008-10-09 Mark Wielaard <mjw@redhat.com>
+
+ * systemtap.base/uprobes.exp: Cleanup generated files.
+
+2008-10-09 Rajan Arora <rarora@redhat.com>
+
+ * systemtap.base/warnings.exp: Allow for source: lines.
+ * parseko/source_context.stp: New file.
+
2008-10-04 Mark Wielaard <mjw@redhat.com>
* systemtap.base/debugpath.exp: Guess a bit more intelligently
diff --git a/testsuite/parseko/source_context.stp b/testsuite/parseko/source_context.stp
new file mode 100755
index 00000000..403b203b
--- /dev/null
+++ b/testsuite/parseko/source_context.stp
@@ -0,0 +1,5 @@
+probe timer.ms(123)
+{
+printf("Probe successful\n")
+ eeexit ()
+}
diff --git a/testsuite/systemtap.base/badkprobe.exp b/testsuite/systemtap.base/badkprobe.exp
new file mode 100644
index 00000000..9e4de901
--- /dev/null
+++ b/testsuite/systemtap.base/badkprobe.exp
@@ -0,0 +1,11 @@
+set script "probe kernel.statement(-1).absolute {} probe timer.s(1) { exit() }"
+
+set test "bad kprobe registration"
+spawn stap -g -w -e "$script"
+expect {
+ -re "^WARNING: probe .*registration error.*" { pass $test }
+ eof { fail "$test (eof)" }
+ timeout { fail "$test (timeout)" }
+}
+catch {close}
+catch {wait}
diff --git a/testsuite/systemtap.base/bz6850.stp b/testsuite/systemtap.base/bz6850.stp
index d6f41862..d6f41862 100644..100755
--- a/testsuite/systemtap.base/bz6850.stp
+++ b/testsuite/systemtap.base/bz6850.stp
diff --git a/testsuite/systemtap.base/uprobes.exp b/testsuite/systemtap.base/uprobes.exp
index 391f5028..02a0fd33 100644
--- a/testsuite/systemtap.base/uprobes.exp
+++ b/testsuite/systemtap.base/uprobes.exp
@@ -16,12 +16,12 @@ close $fp
if [file exists $path] then { pass "$test prep" } else { fail "$test prep" }
catch {exec gcc -g -o jennie jennie.c} err
-if {$err == "" && [file exists jennie]} then { pass "$test compile" } else { pass "$test compile" }
+if {$err == "" && [file exists jennie]} then { pass "$test compile" } else { fail "$test compile" }
set rc [stap_run_batch $srcdir/$subdir/uprobes.stp]
if {$rc == 0} then { pass "$test -p4" } else { fail "$test -p4" }
-if {! [installtest_p]} { untested "$test -p5"; return }
+if {! [installtest_p]} { untested "$test -p5"; exec rm -f jennie.c jennie; return }
spawn sudo stap -v $srcdir/$subdir/uprobes.stp -c "./jennie 1 2 3 4"
set ok 0
@@ -39,3 +39,5 @@ expect {
}
if {$ok == 10} then { pass "$test -p5" } else { fail "$test -p5 ($ok)" }
catch {wait; close}
+
+exec rm -f jennie.c jennie
diff --git a/testsuite/systemtap.base/warnings.exp b/testsuite/systemtap.base/warnings.exp
index a90860d9..4bbef40d 100644
--- a/testsuite/systemtap.base/warnings.exp
+++ b/testsuite/systemtap.base/warnings.exp
@@ -6,6 +6,8 @@ expect {
-timeout 30
-re {^WARNING:[^\r\n]*\r\n} { incr ok; exp_continue }
-re {^[^\r\n]*.ko\r\n} { incr ok; exp_continue }
+ -re {^[^\r]*source:[^\r\n]*\r\n} {exp_continue}
+ -re {^[^\r\n]*\^[^\r\n]*\r\n} {exp_continue}
timeout { fail "$test (timeout)" }
eof { }
}