File: argv.exp

package info (click to toggle)
systemtap 5.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 47,556 kB
  • sloc: cpp: 81,117; ansic: 54,933; xml: 49,795; exp: 43,595; sh: 11,526; python: 5,003; perl: 2,252; tcl: 1,312; makefile: 1,006; javascript: 149; lisp: 105; awk: 101; asm: 91; java: 70; sed: 16
file content (28 lines) | stat: -rw-r--r-- 950 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
set test "argv"
if {![installtest_p]} { untested $test; return }

set result_string {argc=0}
stap_run3 "$test naked"  $srcdir/$subdir/argv.stp
set result_string {argc=1
argv[1]=hello}
stap_run3 "$test one"  $srcdir/$subdir/argv.stp hello -w
set result_string {argc=2
argv[1]=hello
argv[2]=world}
stap_run3 "$test two"  $srcdir/$subdir/argv.stp hello world -w
set result_string {argc=1
argv[1]=hello}
stap_run3 "$test one other"  $srcdir/$subdir/argv.stp -G argc=1 -G argv_1=hello
set result_string {argc=2
argv[1]=hello
argv[2]=world}
stap_run3 "$test two other"  $srcdir/$subdir/argv.stp -G argc=2 -G argv_1=hello -G argv_2=world
set result_string {argc=2
argv[1]=hello
argv[2]=world}
stap_run3 "$test two mixed"  $srcdir/$subdir/argv.stp smelly panda -G argv_1=hello -G argv_2=world -w
set result_string {argc=3
argv[1]=hello
argv[2]=world
argv[3]=mom}
stap_run3 "$test three mixed"  $srcdir/$subdir/argv.stp hello world -G argc=3 -G argv_3=mom -w