summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.printf/memory1.stp
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/systemtap.printf/memory1.stp')
-rw-r--r--testsuite/systemtap.printf/memory1.stp14
1 files changed, 14 insertions, 0 deletions
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");