diff options
author | hunt <hunt> | 2006-08-21 16:39:35 +0000 |
---|---|---|
committer | hunt <hunt> | 2006-08-21 16:39:35 +0000 |
commit | fc98aa95b304065ebbf8beb77699d7b686591259 (patch) | |
tree | 6de0c75a45af70b7d3ceba77ef62c2dfaa0b756f /testsuite/systemtap.string/strlen.stp | |
parent | 8267555c5fefa23a30988e3327c4aaeeed662c54 (diff) | |
download | systemtap-steved-fc98aa95b304065ebbf8beb77699d7b686591259.tar.gz systemtap-steved-fc98aa95b304065ebbf8beb77699d7b686591259.tar.xz systemtap-steved-fc98aa95b304065ebbf8beb77699d7b686591259.zip |
New tests for string functions.
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() +} |