summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.printf
diff options
context:
space:
mode:
authorDavid Smith <dsmith@redhat.com>2009-05-21 16:57:04 -0500
committerDavid Smith <dsmith@redhat.com>2009-05-21 16:57:04 -0500
commitc8e9eb18d8d13d099a4a177fe53de507c1d9ce8b (patch)
treeab2388afb795ed1a7ead2fbbf8b9d1b368a8231f /testsuite/systemtap.printf
parentdd9a3bcbef65bde65491d959e9458bc641924811 (diff)
parent3863e7999255deeaa7f8f4bba7df893773812537 (diff)
downloadsystemtap-steved-c8e9eb18d8d13d099a4a177fe53de507c1d9ce8b.tar.gz
systemtap-steved-c8e9eb18d8d13d099a4a177fe53de507c1d9ce8b.tar.xz
systemtap-steved-c8e9eb18d8d13d099a4a177fe53de507c1d9ce8b.zip
Merge commit 'origin/master' into pr7043
Conflicts: runtime/print.c runtime/transport/transport.c runtime/transport/transport_msgs.h
Diffstat (limited to 'testsuite/systemtap.printf')
-rw-r--r--testsuite/systemtap.printf/basic6.exp3
-rw-r--r--testsuite/systemtap.printf/basic6.stp5
-rw-r--r--testsuite/systemtap.printf/char1.exp2
-rw-r--r--testsuite/systemtap.printf/char1.stp1
-rw-r--r--testsuite/systemtap.printf/end1.exp2
-rw-r--r--testsuite/systemtap.printf/end1b.exp2
-rw-r--r--testsuite/systemtap.printf/memory1.stp14
-rw-r--r--testsuite/systemtap.printf/mixed_out.exp2
-rw-r--r--testsuite/systemtap.printf/mixed_outb.exp2
-rw-r--r--testsuite/systemtap.printf/out1.exp2
-rw-r--r--testsuite/systemtap.printf/out1b.exp2
-rw-r--r--testsuite/systemtap.printf/out2.exp2
-rw-r--r--testsuite/systemtap.printf/out2b.exp2
-rw-r--r--testsuite/systemtap.printf/out3.exp2
-rw-r--r--testsuite/systemtap.printf/out3b.exp2
15 files changed, 34 insertions, 11 deletions
diff --git a/testsuite/systemtap.printf/basic6.exp b/testsuite/systemtap.printf/basic6.exp
new file mode 100644
index 00000000..72bf8f57
--- /dev/null
+++ b/testsuite/systemtap.printf/basic6.exp
@@ -0,0 +1,3 @@
+set test "basic6"
+set ::result_string {Hello%World}
+stap_run2 $srcdir/$subdir/$test.stp
diff --git a/testsuite/systemtap.printf/basic6.stp b/testsuite/systemtap.printf/basic6.stp
new file mode 100644
index 00000000..69721188
--- /dev/null
+++ b/testsuite/systemtap.printf/basic6.stp
@@ -0,0 +1,5 @@
+probe begin
+{
+ printf("Hello%%World");
+ exit()
+}
diff --git a/testsuite/systemtap.printf/char1.exp b/testsuite/systemtap.printf/char1.exp
index 35aa479f..f9343c0e 100644
--- a/testsuite/systemtap.printf/char1.exp
+++ b/testsuite/systemtap.printf/char1.exp
@@ -1,3 +1,3 @@
set test "char1"
-set ::result_string {stap}
+set ::result_string {stapok}
stap_run2 $srcdir/$subdir/$test.stp
diff --git a/testsuite/systemtap.printf/char1.stp b/testsuite/systemtap.printf/char1.stp
index 207d1bc5..564c416b 100644
--- a/testsuite/systemtap.printf/char1.stp
+++ b/testsuite/systemtap.printf/char1.stp
@@ -3,6 +3,7 @@ probe begin
printf("%c", 115)
printf("%c", 116)
printf("%c%c", 97, 112)
+ printf("%c%c", stringat("ok", 0), stringat("ok", 1))
print("\n")
exit()
}
diff --git a/testsuite/systemtap.printf/end1.exp b/testsuite/systemtap.printf/end1.exp
index e4f164f5..ab1de590 100644
--- a/testsuite/systemtap.printf/end1.exp
+++ b/testsuite/systemtap.printf/end1.exp
@@ -4,7 +4,7 @@ set TEST_NAME "$subdir/$test"
if {![installtest_p]} { untested $TEST_NAME; return }
-if {[catch {exec mktemp -t staptestXXXXX} tmpfile]} {
+if {[catch {exec mktemp -t staptestXXXXXX} tmpfile]} {
puts stderr "Failed to create temporary file: $tmpfile"
untested $TEST_NAME
return
diff --git a/testsuite/systemtap.printf/end1b.exp b/testsuite/systemtap.printf/end1b.exp
index 08cfa648..46cdc9c7 100644
--- a/testsuite/systemtap.printf/end1b.exp
+++ b/testsuite/systemtap.printf/end1b.exp
@@ -9,7 +9,7 @@ if (![file executable $stap_merge_path]) {
return
}
-if {[catch {exec mktemp -t staptestXXXXX} tmpfile]} {
+if {[catch {exec mktemp -t staptestXXXXXX} tmpfile]} {
puts stderr "Failed to create temporary file: $tmpfile"
untested "$TEST_NAME : failed to create temporary file"
return
diff --git a/testsuite/systemtap.printf/memory1.stp b/testsuite/systemtap.printf/memory1.stp
index f9cbf60b..15aa565b 100644
--- a/testsuite/systemtap.printf/memory1.stp
+++ b/testsuite/systemtap.printf/memory1.stp
@@ -113,6 +113,20 @@ probe syscall.open {
success = 0;
}
+ expected_16_actual = sprintf (" %02x%02x%02x%02x%02x%02x",
+ stringat(filename, 0),
+ stringat(filename, 1),
+ stringat(filename, 2),
+ stringat(filename, 3),
+ stringat(filename, 4),
+ stringat(filename, 5));
+ testName = "%M dynamic width larger than dynamic precision";
+ result = sprintf ("%*.*M", 14, 6, $filename);
+ if (result != expected_16_actual) {
+ printf ("Test %s failed\n", testName);
+ success = 0;
+ }
+
if (success)
print ("Test passed\n");
diff --git a/testsuite/systemtap.printf/mixed_out.exp b/testsuite/systemtap.printf/mixed_out.exp
index d73a55a6..55320e80 100644
--- a/testsuite/systemtap.printf/mixed_out.exp
+++ b/testsuite/systemtap.printf/mixed_out.exp
@@ -4,7 +4,7 @@ set TEST_NAME "$subdir/$test"
if {![installtest_p]} { untested $TEST_NAME; return }
-if {[catch {exec mktemp -t staptestXXXXX} tmpfile]} {
+if {[catch {exec mktemp -t staptestXXXXXX} tmpfile]} {
puts stderr "Failed to create temporary file: $tmpfile"
untested $TEST_NAME
return
diff --git a/testsuite/systemtap.printf/mixed_outb.exp b/testsuite/systemtap.printf/mixed_outb.exp
index 30c0c92f..c15520b1 100644
--- a/testsuite/systemtap.printf/mixed_outb.exp
+++ b/testsuite/systemtap.printf/mixed_outb.exp
@@ -9,7 +9,7 @@ if (![file executable $stap_merge_path]) {
return
}
-if {[catch {exec mktemp -t staptestXXXXX} tmpfile]} {
+if {[catch {exec mktemp -t staptestXXXXXX} tmpfile]} {
puts stderr "Failed to create temporary file: $tmpfile"
untested "$TEST_NAME : failed to create temporary file"
return
diff --git a/testsuite/systemtap.printf/out1.exp b/testsuite/systemtap.printf/out1.exp
index d5728c0f..f973ae00 100644
--- a/testsuite/systemtap.printf/out1.exp
+++ b/testsuite/systemtap.printf/out1.exp
@@ -4,7 +4,7 @@ set TEST_NAME "$subdir/$test"
if {![installtest_p]} { untested $TEST_NAME; return }
-if {[catch {exec mktemp -t staptestXXXXX} tmpfile]} {
+if {[catch {exec mktemp -t staptestXXXXXX} tmpfile]} {
puts stderr "Failed to create temporary file: $tmpfile"
untested $TEST_NAME
return
diff --git a/testsuite/systemtap.printf/out1b.exp b/testsuite/systemtap.printf/out1b.exp
index 2f702a2f..24efbf4c 100644
--- a/testsuite/systemtap.printf/out1b.exp
+++ b/testsuite/systemtap.printf/out1b.exp
@@ -9,7 +9,7 @@ if (![file executable $stap_merge_path]) {
return
}
-if {[catch {exec mktemp -t staptestXXXXX} tmpfile]} {
+if {[catch {exec mktemp -t staptestXXXXXX} tmpfile]} {
puts stderr "Failed to create temporary file: $tmpfile"
untested "$TEST_NAME : failed to create temporary file"
return
diff --git a/testsuite/systemtap.printf/out2.exp b/testsuite/systemtap.printf/out2.exp
index dd96f394..8c66e73d 100644
--- a/testsuite/systemtap.printf/out2.exp
+++ b/testsuite/systemtap.printf/out2.exp
@@ -4,7 +4,7 @@ set TEST_NAME "$subdir/$test"
if {![installtest_p]} { untested $TEST_NAME; return }
-if {[catch {exec mktemp -t staptestXXXXX} tmpfile]} {
+if {[catch {exec mktemp -t staptestXXXXXX} tmpfile]} {
puts stderr "Failed to create temporary file: $tmpfile"
untested $TEST_NAME
return
diff --git a/testsuite/systemtap.printf/out2b.exp b/testsuite/systemtap.printf/out2b.exp
index 0b56c940..70a98ea2 100644
--- a/testsuite/systemtap.printf/out2b.exp
+++ b/testsuite/systemtap.printf/out2b.exp
@@ -9,7 +9,7 @@ if (![file executable $stap_merge_path]) {
return
}
-if {[catch {exec mktemp -t staptestXXXXX} tmpfile]} {
+if {[catch {exec mktemp -t staptestXXXXXX} tmpfile]} {
puts stderr "Failed to create temporary file: $tmpfile"
untested "$TEST_NAME : failed to create temporary file"
return
diff --git a/testsuite/systemtap.printf/out3.exp b/testsuite/systemtap.printf/out3.exp
index 96ca2bc5..63a67d8f 100644
--- a/testsuite/systemtap.printf/out3.exp
+++ b/testsuite/systemtap.printf/out3.exp
@@ -4,7 +4,7 @@ set TEST_NAME "$subdir/$test"
if {![installtest_p]} { untested $TEST_NAME; return }
-if {[catch {exec mktemp -t staptestXXXXX} tmpfile]} {
+if {[catch {exec mktemp -t staptestXXXXXX} tmpfile]} {
puts stderr "Failed to create temporary file: $tmpfile"
untested $TEST_NAME
return
diff --git a/testsuite/systemtap.printf/out3b.exp b/testsuite/systemtap.printf/out3b.exp
index c42d03b7..d49625e9 100644
--- a/testsuite/systemtap.printf/out3b.exp
+++ b/testsuite/systemtap.printf/out3b.exp
@@ -9,7 +9,7 @@ if (![file executable $stap_merge_path]) {
return
}
-if {[catch {exec mktemp -t staptestXXXXX} tmpfile]} {
+if {[catch {exec mktemp -t staptestXXXXXX} tmpfile]} {
puts stderr "Failed to create temporary file: $tmpfile"
untested "$TEST_NAME : failed to create temporary file"
return