diff options
author | Dave Brolley <brolley@redhat.com> | 2009-07-16 11:29:59 -0400 |
---|---|---|
committer | Dave Brolley <brolley@redhat.com> | 2009-07-16 11:29:59 -0400 |
commit | 451535e8b0b1018a51206283d89d233d37ea8621 (patch) | |
tree | 766a67ed307a252e20b0fe077cb7f52505b54571 /testsuite/systemtap.base | |
parent | aa3ed413744f9830c272dbcedc3fffd1974b53ea (diff) | |
parent | f190c8d7aab46fbd15e33493cec7933c93d3c912 (diff) | |
download | systemtap-steved-451535e8b0b1018a51206283d89d233d37ea8621.tar.gz systemtap-steved-451535e8b0b1018a51206283d89d233d37ea8621.tar.xz systemtap-steved-451535e8b0b1018a51206283d89d233d37ea8621.zip |
Merge branch 'master' of git://sources.redhat.com/git/systemtap
Diffstat (limited to 'testsuite/systemtap.base')
-rw-r--r-- | testsuite/systemtap.base/cast.exp | 3 | ||||
-rw-r--r-- | testsuite/systemtap.base/cast.stp | 9 | ||||
-rw-r--r-- | testsuite/systemtap.base/pointer_array.exp | 13 | ||||
-rw-r--r-- | testsuite/systemtap.base/pointer_array.stp | 16 | ||||
-rw-r--r-- | testsuite/systemtap.base/utrace_syscall_args.stp | 2 |
5 files changed, 41 insertions, 2 deletions
diff --git a/testsuite/systemtap.base/cast.exp b/testsuite/systemtap.base/cast.exp index 374132f0..38ef67b9 100644 --- a/testsuite/systemtap.base/cast.exp +++ b/testsuite/systemtap.base/cast.exp @@ -2,5 +2,6 @@ set test "cast" set ::result_string {PID OK PID2 OK execname OK -sa_data OK} +sa_data OK +usage OK} stap_run2 $srcdir/$subdir/$test.stp -g diff --git a/testsuite/systemtap.base/cast.stp b/testsuite/systemtap.base/cast.stp index e2505000..bb889bb8 100644 --- a/testsuite/systemtap.base/cast.stp +++ b/testsuite/systemtap.base/cast.stp @@ -33,6 +33,15 @@ probe begin else printf("sa_data %d != %d\n", data, cast_data) + // Compare usage counter values through a struct address + usage = @cast(curr, "task_struct")->usage->counter + pusage = & @cast(curr, "task_struct")->usage + cast_usage = @cast(pusage, "atomic_t")->counter + if (usage == cast_usage) + println("usage OK") + else + printf("usage %d != %d\n", usage, cast_usage) + exit() } diff --git a/testsuite/systemtap.base/pointer_array.exp b/testsuite/systemtap.base/pointer_array.exp new file mode 100644 index 00000000..0e3af213 --- /dev/null +++ b/testsuite/systemtap.base/pointer_array.exp @@ -0,0 +1,13 @@ +set test "pointer_array" +set ::result_string {/bin/true +/ +b +i +n +/ +t +r +u +e +0} +stap_run2 $srcdir/$subdir/$test.stp -c/bin/true diff --git a/testsuite/systemtap.base/pointer_array.stp b/testsuite/systemtap.base/pointer_array.stp new file mode 100644 index 00000000..1d15ebf4 --- /dev/null +++ b/testsuite/systemtap.base/pointer_array.stp @@ -0,0 +1,16 @@ +probe syscall.execve +{ + if (pid() == target()) { + println(user_string($argv[0])) + printf("%c\n", $argv[0][0]) + printf("%c\n", $argv[0][1]) + printf("%c\n", $argv[0][2]) + printf("%c\n", $argv[0][3]) + printf("%c\n", $argv[0][4]) + printf("%c\n", $argv[0][5]) + printf("%c\n", $argv[0][6]) + printf("%c\n", $argv[0][7]) + printf("%c\n", $argv[0][8]) + println($argv[0][9]) + } +} diff --git a/testsuite/systemtap.base/utrace_syscall_args.stp b/testsuite/systemtap.base/utrace_syscall_args.stp index 6c9e14fc..5c6ca451 100644 --- a/testsuite/systemtap.base/utrace_syscall_args.stp +++ b/testsuite/systemtap.base/utrace_syscall_args.stp @@ -36,7 +36,7 @@ probe begin } probe syscall.open { - if (filename == "foobar") { + if (pid() == target() && filename == "foobar") { syscalls_seen += 1 } } |