diff options
author | hunt <hunt> | 2007-05-07 17:11:49 +0000 |
---|---|---|
committer | hunt <hunt> | 2007-05-07 17:11:49 +0000 |
commit | e41dec42de3cf3881c0c5ba79a4938c9158b041f (patch) | |
tree | 0fdba08dfd716c2d5254bb65398d7cc279f05f17 /testsuite/systemtap.samples/system_func.stp | |
parent | 6c81b55b775065b6cd942ba9e2d579be256c87be (diff) | |
download | systemtap-steved-e41dec42de3cf3881c0c5ba79a4938c9158b041f.tar.gz systemtap-steved-e41dec42de3cf3881c0c5ba79a4938c9158b041f.tar.xz systemtap-steved-e41dec42de3cf3881c0c5ba79a4938c9158b041f.zip |
2007-05-07 Martin Hunt <hunt@redhat.com>
PR4466
* systemtap.samples/system_func.stp: Rewrite test to account
for probes not being placed until after begin.
* systemtap.samples/system_func.exp: Only expect 1 sys_open.
Diffstat (limited to 'testsuite/systemtap.samples/system_func.stp')
-rw-r--r-- | testsuite/systemtap.samples/system_func.stp | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/testsuite/systemtap.samples/system_func.stp b/testsuite/systemtap.samples/system_func.stp index 60d9a723..0b074514 100644 --- a/testsuite/systemtap.samples/system_func.stp +++ b/testsuite/systemtap.samples/system_func.stp @@ -2,20 +2,27 @@ # test the system() function +global saw_echo + probe kernel.function("sys_open") { - # very inefficient. Testing only. DO NOT DO THIS - msg="echo sys_open" - system(msg) + if (!saw_echo) { + # very inefficient. Testing only. DO NOT DO THIS + msg="echo sys_open" + system(msg) + saw_echo = 1 + } +} + +probe timer.ms(100) { + # should fail + system("cat __xyzzy123ABC__") } +probe timer.ms(110) { exit() } + probe begin { # should succeed system("whoami") - - # should fail - system("cat __xyzzy123ABC__") - - exit() } probe end { |