diff options
Diffstat (limited to 'testsuite/systemtap.string/strlen.stp')
-rw-r--r-- | testsuite/systemtap.string/strlen.stp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/testsuite/systemtap.string/strlen.stp b/testsuite/systemtap.string/strlen.stp new file mode 100644 index 00000000..028cf004 --- /dev/null +++ b/testsuite/systemtap.string/strlen.stp @@ -0,0 +1,15 @@ +probe begin +{ + printf("strlen(\"%s\") = %d\n", a, strlen(a)) + + a = "1" + printf("strlen(\"%s\") = %d\n", a, strlen(a)) + + a = "0123456789" + printf("strlen(\"%s\") = %d\n", a, strlen(a)) + + a = "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" + printf("strlen(\"%s\") = %d\n", a, strlen(a)) + + exit() +} |