summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.printf/printdln.stp
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/systemtap.printf/printdln.stp')
-rw-r--r--testsuite/systemtap.printf/printdln.stp27
1 files changed, 27 insertions, 0 deletions
diff --git a/testsuite/systemtap.printf/printdln.stp b/testsuite/systemtap.printf/printdln.stp
new file mode 100644
index 00000000..ed78eac5
--- /dev/null
+++ b/testsuite/systemtap.printf/printdln.stp
@@ -0,0 +1,27 @@
+# test the printdln function with string and integers,
+# variables and constants.
+
+probe begin {
+ a = "hello"
+ c = "world"
+ d = 777
+
+ # print variables
+ printdln(" ",a,c)
+ printdln("<-->",a,c,d)
+
+ # print literals
+ printdln(" *** ","foo","bar")
+ printdln(" *** ","foo","bar","baz")
+
+ printdln(",","foo",99)
+ printdln(",",99, "foo")
+
+ printdln(" ",123,456,789)
+
+ # mixed
+ printdln("-",a,999)
+ printdln("-",999,a)
+
+ exit()
+}