File: argv.exp

package info (click to toggle)
systemtap 3.1-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 32,860 kB
  • ctags: 12,513
  • sloc: cpp: 58,610; ansic: 58,189; exp: 37,322; sh: 10,633; xml: 7,771; perl: 2,252; python: 2,066; tcl: 1,305; makefile: 969; lisp: 105; java: 100; awk: 94; asm: 91; 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