This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug testsuite/19234] New: user_string_n2_quoted() vs. user_string_n_quoted.exp


https://sourceware.org/bugzilla/show_bug.cgi?id=19234

            Bug ID: 19234
           Summary: user_string_n2_quoted() vs. user_string_n_quoted.exp
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: testsuite
          Assignee: systemtap at sourceware dot org
          Reporter: mcermak at redhat dot com
  Target Milestone: ---

Created attachment 8778
  --> https://sourceware.org/bugzilla/attachment.cgi?id=8778&action=edit
proposed testcase patch

Commit bfd1c4ccc2 made testcase user_string_n_quoted.exp fail. The commit
introduces new behavior of user_string_n2_quoted(), still having the old
behavior available using --compatible=2.9 (using which the testcase passes
again, good).

The behaviour is as follows:

=======
 7.2 S x86_64 # stap --compatible=2.9 -e 'probe syscall.write { if (pid() ==
target()) for (i=21; i>13; i--) printf("%d - %s\n", i,
user_string_n2_quoted(buf_uaddr, 99, i)) exit() }' -c 'echo this_is_a_test >
/dev/null'
21 - "this_is_a_test\n"
20 - "this_is_a_test\n"
19 - "this_is_a_test\n"
18 - "this_is_a_test\n"
17 - "this_is_a_te"...
16 - "this_is_a_t"...
15 - "this_is_a_"...
14 - "this_is_a"...
 7.2 S x86_64 # stap -e 'probe syscall.write { if (pid() == target()) for
(i=21; i>13; i--) printf("%d - %s\n", i, user_string_n2_quoted(buf_uaddr, 99,
i)) exit() }' -c 'echo this_is_a_test > /dev/null'
21 - "this_is_a_test\n"
20 - "this_is_a_test\n"
19 - "this_is_a_test"...
18 - "this_is_a_tes"...
17 - "this_is_a_te"...
16 - "this_is_a_t"...
15 - "this_is_a_"...
14 - "this_is_a"...
 7.2 S x86_64 #
=======

Using the old behavior there is no 'i' for which the retval would be
'"this_is_a_test"...' or '"this_is_a_tes"...'. From this perspective the new
behavior looks more reasonable. There are differences in how
user_string_n_quoted() and user_string_n2_quoted() understand the length of the
output string, but that make some sense too (tm). So I propose attached
testcase patch.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]