Bug 1003976 - cmdline_arg output format need to be fixed
cmdline_arg output format need to be fixed
Product: Fedora
Classification: Fedora
Component: systemtap (Show other bugs)
All Linux
unspecified Severity low
: ---
: ---
Assigned To: Frank Ch. Eigler
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-09-03 11:25 EDT by masanari iida
Modified: 2013-09-05 12:50 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-09-05 11:53:34 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description masanari iida 2013-09-03 11:25:36 EDT
Description of problem:
cmdline_arg output need to be fixed.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.Run following stap script.

probe kprobe.function("sys_unlinkat")
  printf("cmdline_arg(0)= %s\n", cmdline_arg(0))
  printf("cmdline_arg(1)= %s\n", cmdline_arg(1))
  printf("cmdline_arg(2)= %s\n", cmdline_arg(2))
  printf("cmdline_str= %s\n", cmdline_str())

2. Remove a file

Actual results:

cmdline_arg(0)= rm""fabc123
cmdline_arg(1)= -f""bc123
cmdline_arg(2)= abc123
cmdline_str= rm -f abc123

Expected results:

cmdline_arg(0)= rm -f abc123
cmdline_arg(1)= -f
cmdline_arg(2)= abc123
cmdline_str= rm -f abc123

Additional info:
Also the latest version 2.4/0.155, commit release-2.3-70-g1ab99b2
have the same issue.

I put an output of cmdline_str as a good example.
cmdline_arg(0) and cmdline_str should be the same result.
Comment 1 Frank Ch. Eigler 2013-09-05 11:53:34 EDT
Fixed in upstream git commit c71a7f200c.  (Note that cmdline_arg(0)
is not the same as cmdline_str; the comments were misleading.)
Comment 2 David Smith 2013-09-05 12:50:41 EDT
To make sure this stays fixed, I added a new testcase in upstream git commit 5c79255fdd called 'systemtap.base/cmdline.exp'

Note You need to log in before you can comment on or make changes to this bug.