summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.context/num_args.tcl
diff options
context:
space:
mode:
authorJim Keniston <jkenisto@us.ibm.com>2008-06-04 16:51:29 -0700
committerJim Keniston <jkenisto@us.ibm.com>2008-06-04 16:51:29 -0700
commitd2c02d31864a85711e879fdbd15fc77cce492b3e (patch)
tree678bb806abf0f78eb2f036981fadf75fd6f014c0 /testsuite/systemtap.context/num_args.tcl
parent39a8b0bce28cf4ef8fda523ad9c4634692764134 (diff)
downloadsystemtap-steved-d2c02d31864a85711e879fdbd15fc77cce492b3e.tar.gz
systemtap-steved-d2c02d31864a85711e879fdbd15fc77cce492b3e.tar.xz
systemtap-steved-d2c02d31864a85711e879fdbd15fc77cce492b3e.zip
Added systemtap.context/num_args test.
Diffstat (limited to 'testsuite/systemtap.context/num_args.tcl')
-rw-r--r--testsuite/systemtap.context/num_args.tcl58
1 files changed, 58 insertions, 0 deletions
diff --git a/testsuite/systemtap.context/num_args.tcl b/testsuite/systemtap.context/num_args.tcl
new file mode 100644
index 00000000..a564b584
--- /dev/null
+++ b/testsuite/systemtap.context/num_args.tcl
@@ -0,0 +1,58 @@
+spawn stap $srcdir/$subdir/num_args.stp
+expect {
+ -timeout 240
+ "READY" {
+ exec echo 1 > /proc/stap_test_cmd
+ expect {
+ -timeout 5
+ "yyy_int -1 200 300\r\nyyy_int returns 499\r\n" {
+ pass "integer function arguments (numeric)"
+ }
+ timeout {fail "integer function arguments (numeric)"}
+ }
+ exec echo 2 > /proc/stap_test_cmd
+ expect {
+ -timeout 5
+ "yyy_uint 4294967295 200 300\r\nyyy_uint returns 499\r\n" {
+ pass "unsigned function arguments (numeric)"
+ }
+ timeout {fail "unsigned function arguments (numeric)"}
+ }
+ exec echo 3 > /proc/stap_test_cmd
+ expect {
+ -timeout 5
+ "yyy_long -1 200 300\r\nyyy_long returns 499\r\n" {
+ pass "long function arguments (numeric)"
+ }
+ timeout {fail "long function arguments (numeric)"}
+ }
+ exec echo 4 > /proc/stap_test_cmd
+ expect {
+ -timeout 5
+ "yyy_int64 -1 200 300\r\nyyy_int64 returns 499\r\n" {
+ pass "int64 function arguments (numeric)"
+ }
+ timeout {fail "int64 function arguments (numeric)"}
+ }
+ exec echo 5 > /proc/stap_test_cmd
+ expect {
+ -timeout 5
+ "yyy_char a b c\r\nyyy_char returns Q\r\n" {
+ pass "char function arguments (numeric)"
+ }
+ timeout {fail "char function arguments (numeric)"}
+ }
+ exec echo 6 > /proc/stap_test_cmd
+ expect {
+ -timeout 5
+ "yyy_str Hello-System-Tap\r\nyyy_str returns XYZZY\r\n" {
+ pass "string function arguments (numeric)"
+ }
+ timeout {fail "string function arguments (numeric)"}
+ }
+ }
+ eof {fail "function arguments (numeric): unexpected timeout"}
+}
+exec kill -INT -[exp_pid]
+close
+wait