1 if {![installtest_p]} {
2 for {set i 0} { $i < 8} {incr i} {
8 # stap -c 'echo "hello world"' -e 'probe begin {}'
9 spawn stap -c {echo "hello world"} -e {probe begin {}}
12 "hello world" {pass "cmd_parse1"}
13 timeout {fail "cmd_parse1: unexpected timeout"}
14 eof {fail "cmd_parse1: unexpected EOF"}
18 # stap -c 'echo "hello "\"world\"' -e 'probe begin {}'
19 spawn stap -c {echo "hello "\"world\"} -e {probe begin {}}
22 "hello \"world\"" {pass "cmd_parse2"}
23 timeout {fail "cmd_parse2: unexpected timeout"}
24 eof {fail "cmd_parse2: unexpected EOF"}
28 #stap -c '(a="hello world"; echo $a)' -e 'probe begin {}'
29 spawn stap -c {(a="hello world"; echo $a)} -e {probe begin {}}
32 "hello world" {pass "cmd_parse3"}
33 timeout {fail "cmd_parse3: unexpected timeout"}
34 eof {fail "cmd_parse3: unexpected EOF"}
38 #stap -c '(a="hello "\"world\"; echo $a)' -e 'probe begin {}'
39 spawn stap -c {(a="hello "\"world\"; echo $a)} -e {probe begin {}}
42 "hello \"world\"" {pass "cmd_parse4"}
43 timeout {fail "cmd_parse4: unexpected timeout"}
44 eof {fail "cmd_parse4: unexpected EOF"}
48 #stap -c '(a="hello "world; echo $a)' -e 'probe begin {}'
49 spawn stap -c {(a="hello "world; echo $a)} -e {probe begin {}}
52 "hello world" {pass "cmd_parse5"}
53 timeout {fail "cmd_parse5: unexpected timeout"}
54 eof {fail "cmd_parse5: unexpected EOF"}
58 #stap -c '(((a=42+7)); echo "The answer is $a")' -e 'probe begin {}'
59 # NB: not ((a=42+7)) - must not assume bash
60 spawn stap -c {(a=49; echo "The answer is $a")} -e {probe begin {}}
63 "The answer is 49" {pass "cmd_parse6"}
64 timeout {fail "cmd_parse6: unexpected timeout"}
65 eof {fail "cmd_parse6: unexpected EOF"}
69 #stap -c '(echo "Hello World" 1>&2) > /dev/null' -e 'probe begin {}'
70 spawn stap -c {(echo "Hello World" 1>&2) > /dev/null} -e {probe begin {}}
73 "Hello World" {pass "cmd_parse7"}
74 timeout {fail "cmd_parse7: unexpected timeout"}
75 eof {fail "cmd_parse7: unexpected EOF"}
82 -re "vm.*" {pass "cmd_parse8"}
83 timeout {fail "cmd_parse8: unexpected timeout"}
84 eof {fail "cmd_parse8: unexpected EOF"}