summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--testsuite/ChangeLog7
-rw-r--r--testsuite/systemtap.printf/printd.exp20
-rw-r--r--testsuite/systemtap.printf/printd.stp16
-rw-r--r--testsuite/systemtap.printf/printdln.stp12
4 files changed, 33 insertions, 22 deletions
diff --git a/testsuite/ChangeLog b/testsuite/ChangeLog
index c5e4f8f0..3d71c5a4 100644
--- a/testsuite/ChangeLog
+++ b/testsuite/ChangeLog
@@ -1,5 +1,12 @@
2007-10-25 Martin Hunt <hunt@redhat.com>
+ * systemtap.printf/printd.exp: New.
+ Runs printd.stp and printdln.stp.
+ * systemtap.printf/printdln.stp: Removed bad tests.
+ * systemtap.printf/printd.stp: Ditto.
+
+2007-10-25 Martin Hunt <hunt@redhat.com>
+
* systemtap.printf/print_char.*: New test.
* systemtap.printf/print.*: New test.
* systemtap.printf/println.*: New test.
diff --git a/testsuite/systemtap.printf/printd.exp b/testsuite/systemtap.printf/printd.exp
new file mode 100644
index 00000000..5ba90341
--- /dev/null
+++ b/testsuite/systemtap.printf/printd.exp
@@ -0,0 +1,20 @@
+# printd and printdln tests
+
+# both tests have the same result
+
+set ::result_string {hello world
+hello<-->world<-->777
+foo *** bar
+foo *** bar *** baz
+foo,99
+99,foo
+123 456 789
+hello-999
+999-hello
+}
+
+foreach x {"d" "dln"} {
+ set test "print$x"
+ stap_run_exact $test $srcdir/$subdir/$test.stp
+}
+
diff --git a/testsuite/systemtap.printf/printd.stp b/testsuite/systemtap.printf/printd.stp
index 500b0600..8dcff3f5 100644
--- a/testsuite/systemtap.printf/printd.stp
+++ b/testsuite/systemtap.printf/printd.stp
@@ -3,36 +3,26 @@
probe begin {
a = "hello"
- b = " "
c = "world"
d = 777
- e = "<-->"
# print variables
- printd(b,a)
+ printd(" ",a,c)
println("")
- printd(b,a,c)
- println("")
- printd(e,a,c,d)
+ printd("<-->",a,c,d)
println("")
# print literals
- printd(",","foo")
- println("")
printd(" *** ","foo","bar")
println("")
printd(" *** ","foo","bar","baz")
println("")
- printd(", " , 777)
- println("")
printd(",","foo",99)
println("")
- println(",",99, "foo")
+ printd(",",99, "foo")
println("")
- printd("",123,456,789)
- println("")
printd(" ",123,456,789)
println("")
diff --git a/testsuite/systemtap.printf/printdln.stp b/testsuite/systemtap.printf/printdln.stp
index 86886ac1..ed78eac5 100644
--- a/testsuite/systemtap.printf/printdln.stp
+++ b/testsuite/systemtap.printf/printdln.stp
@@ -3,26 +3,20 @@
probe begin {
a = "hello"
- b = " "
c = "world"
d = 777
- e = "<-->"
# print variables
- printdln(b,a)
- printdln(b,a,c)
- printdln(e,a,c,d)
+ printdln(" ",a,c)
+ printdln("<-->",a,c,d)
# print literals
- printdln(",","foo")
printdln(" *** ","foo","bar")
printdln(" *** ","foo","bar","baz")
- printdln(", " , 777)
printdln(",","foo",99)
- println(",",99, "foo")
+ printdln(",",99, "foo")
- printdln("",123,456,789)
printdln(" ",123,456,789)
# mixed