diff options
author | Josh Stone <jistone@redhat.com> | 2010-02-15 19:28:43 -0800 |
---|---|---|
committer | Josh Stone <jistone@redhat.com> | 2010-02-16 15:55:01 -0800 |
commit | 2a818a16b0c371977303e464bfc75ad8814a9c7a (patch) | |
tree | 8c29ccf8bb1c6a5bba43ce4e9c60516f4cecfc05 /testsuite/systemtap.string/text_str.stp | |
parent | e6364d7923d49c7bfe1a807cd877cb9b29ca0acf (diff) | |
download | systemtap-steved-2a818a16b0c371977303e464bfc75ad8814a9c7a.tar.gz systemtap-steved-2a818a16b0c371977303e464bfc75ad8814a9c7a.tar.xz systemtap-steved-2a818a16b0c371977303e464bfc75ad8814a9c7a.zip |
PR11277: Use consistent octal in quoted strings
Previously, our octal escapes used variable lengths, which can lead to
ambiguities. Also, 8-bit characters would only output the least digit.
* runtime/string.c (_stp_text_str): Always output 3-digit octal escapes,
and handle 8-bit chars more gracefully.
* testsuite/systemtap.string/text_str.stp: Include an 8-bit character.
* testsuite/systemtap.string/text_str.exp: Above + expect 3-digit octal.
Diffstat (limited to 'testsuite/systemtap.string/text_str.stp')
-rw-r--r-- | testsuite/systemtap.string/text_str.stp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/testsuite/systemtap.string/text_str.stp b/testsuite/systemtap.string/text_str.stp index 05acc431..d61273ad 100644 --- a/testsuite/systemtap.string/text_str.stp +++ b/testsuite/systemtap.string/text_str.stp @@ -37,7 +37,7 @@ probe begin { printf("c=%s\n", text_strn(c,12,1)) a = "\n\nXYZZY\031" - b = "\077\031\a\n\n\r\n" + b = "\077\231\a\n\n\r\n" c = a.b printf("----- Using text_str -----\n"); @@ -70,10 +70,10 @@ probe begin { printf("b=%s\n", text_strn(b,10,1)) printf("c=%s\n", text_strn(c,10,1)) - printf("----- Using text_strn len=14, quoted -----\n"); - printf("a=%s\n", text_strn(a,14,1)) - printf("b=%s\n", text_strn(b,14,1)) - printf("c=%s\n", text_strn(c,14,1)) + printf("----- Using text_strn len=15, quoted -----\n"); + printf("a=%s\n", text_strn(a,15,1)) + printf("b=%s\n", text_strn(b,15,1)) + printf("c=%s\n", text_strn(c,15,1)) exit() } |