Bug 1003976 - cmdline_arg output format need to be fixed
Summary: cmdline_arg output format need to be fixed
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: systemtap
Version: 18
Hardware: All
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Frank Ch. Eigler
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-03 15:25 UTC by masanari iida
Modified: 2013-09-05 16:50 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-09-05 15:53:34 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description masanari iida 2013-09-03 15:25:36 UTC
Description of problem:
cmdline_arg output need to be fixed.

Version-Release number of selected component (if applicable):
systemtap-2.2.1-1.fc18.i686

How reproducible:
Always

Steps to Reproduce:
1.Run following stap script.

probe kprobe.function("sys_unlinkat")
{
  asmlinkage()
  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 15:53:34 UTC
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 16:50:41 UTC
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.