summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.context/args.tcl
diff options
context:
space:
mode:
authorhunt <hunt>2007-07-02 07:22:21 +0000
committerhunt <hunt>2007-07-02 07:22:21 +0000
commit81bceb41bf645dbef2ec8fe1522ad1b68a02d17d (patch)
tree9956ad4f6bc5122387a040adb442032cb752aecd /testsuite/systemtap.context/args.tcl
parenta147cc55c352fecdfe6835af8100403594b79dad (diff)
downloadsystemtap-steved-81bceb41bf645dbef2ec8fe1522ad1b68a02d17d.tar.gz
systemtap-steved-81bceb41bf645dbef2ec8fe1522ad1b68a02d17d.tar.xz
systemtap-steved-81bceb41bf645dbef2ec8fe1522ad1b68a02d17d.zip
2007-07-02 Martin Hunt <hunt@redhat.com>
* systemtap.context/*: New context tests.
Diffstat (limited to 'testsuite/systemtap.context/args.tcl')
-rw-r--r--testsuite/systemtap.context/args.tcl53
1 files changed, 53 insertions, 0 deletions
diff --git a/testsuite/systemtap.context/args.tcl b/testsuite/systemtap.context/args.tcl
new file mode 100644
index 00000000..d6b776de
--- /dev/null
+++ b/testsuite/systemtap.context/args.tcl
@@ -0,0 +1,53 @@
+spawn stap args.stp
+expect {
+ -timeout 240
+ "READY" {
+ puts "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"
+ }
+ }
+ 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"
+ }
+ }
+ 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"
+ }
+ }
+ 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"
+ }
+ }
+ exec echo 5 > /proc/stap_test_cmd
+ expect {
+ -timeout 5
+ "yyy_char 97 98 99\r\nyyy_char returns 81\r\n" {
+ pass "char function arguments"
+ }
+ }
+ 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"
+ }
+ }
+ }
+ eof {}
+}
+send "\003"
+close
+wait