diff options
Diffstat (limited to 'testsuite/systemtap.printf')
-rw-r--r-- | testsuite/systemtap.printf/char1.exp | 2 | ||||
-rw-r--r-- | testsuite/systemtap.printf/char1.stp | 1 | ||||
-rw-r--r-- | testsuite/systemtap.printf/memory1.stp | 14 |
3 files changed, 16 insertions, 1 deletions
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/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"); |