From d57671d335d788aa3a738f7f284bfee30151c86c Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Tue, 10 Jun 2008 16:54:29 -0400 Subject: PR6470: new argv[] tapset, docs, test cases --- testsuite/systemtap.base/cmd_parse.exp | 37 ++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'testsuite/systemtap.base/cmd_parse.exp') diff --git a/testsuite/systemtap.base/cmd_parse.exp b/testsuite/systemtap.base/cmd_parse.exp index cbce0455..e33bfa85 100644 --- a/testsuite/systemtap.base/cmd_parse.exp +++ b/testsuite/systemtap.base/cmd_parse.exp @@ -84,3 +84,40 @@ expect { eof {fail "cmd_parse8: unexpected EOF"} } wait + +spawn stap -e {probe begin { printf("%d %s\n", argc, argv[$1]) exit() }} 1 +expect { + -timeout 60 + "1 1" { pass cmd_parse9 } + timeout { fail "cmd_parse9 timeout" } + eof { fail "cmd_parse9 eof" } +} +wait + +spawn stap -e {probe begin { printf("%d %s\n", argc, argv[$1]) exit() }} 5 a b c d +expect { + -timeout 60 + "5 d" { pass cmd_parse10 } + timeout { fail "cmd_parse10 timeout" } + eof { fail "cmd_parse10 eof" } +} +wait + +spawn stap -e {probe begin { printf("%d %s\n", argc, argv[$1]) exit() }} 10 a b c d +expect { + -timeout 60 + "5 " { pass cmd_parse11 } + timeout { fail "cmd_parse11 timeout" } + eof { fail "cmd_parse11 eof" } +} +wait + +spawn stap -e {probe begin { printf("%d %s\n", argc, argv[0]) exit() }} +expect { + -timeout 60 + "0 " { pass cmd_parse12 } + timeout { fail "cmd_parse12 timeout" } + eof { fail "cmd_parse12 eof" } +} +wait + -- cgit