| 1 |
set test "argv" |
| 2 |
if {![installtest_p]} { untested $test; return } |
| 3 |
|
| 4 |
set result_string {argc=0} |
| 5 |
stap_run3 "$test naked" $srcdir/$subdir/argv.stp |
| 6 |
set result_string {argc=1 |
| 7 |
argv[1]=hello} |
| 8 |
stap_run3 "$test one" $srcdir/$subdir/argv.stp hello -w |
| 9 |
set result_string {argc=2 |
| 10 |
argv[1]=hello |
| 11 |
argv[2]=world} |
| 12 |
stap_run3 "$test two" $srcdir/$subdir/argv.stp hello world -w |
| 13 |
set result_string {argc=1 |
| 14 |
argv[1]=hello} |
| 15 |
stap_run3 "$test one other" $srcdir/$subdir/argv.stp -G argc=1 -G argv_1=hello |
| 16 |
set result_string {argc=2 |
| 17 |
argv[1]=hello |
| 18 |
argv[2]=world} |
| 19 |
stap_run3 "$test two other" $srcdir/$subdir/argv.stp -G argc=2 -G argv_1=hello -G argv_2=world |
| 20 |
set result_string {argc=2 |
| 21 |
argv[1]=hello |
| 22 |
argv[2]=world} |
| 23 |
stap_run3 "$test two mixed" $srcdir/$subdir/argv.stp smelly panda -G argv_1=hello -G argv_2=world -w |
| 24 |
set result_string {argc=3 |
| 25 |
argv[1]=hello |
| 26 |
argv[2]=world |
| 27 |
argv[3]=mom} |
| 28 |
stap_run3 "$test three mixed" $srcdir/$subdir/argv.stp hello world -G argc=3 -G argv_3=mom -w |