From ca24ee856ce8799647483d9289d1dbd91f8cbb04 Mon Sep 17 00:00:00 2001 From: hunt Date: Mon, 17 Sep 2007 17:05:30 +0000 Subject: 2007-09-17 Martin Hunt * systemtap.samples/system_func.stp: PR4466 Add some additional checks to eliminates any races in output. --- testsuite/systemtap.samples/system_func.stp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'testsuite/systemtap.samples') diff --git a/testsuite/systemtap.samples/system_func.stp b/testsuite/systemtap.samples/system_func.stp index 0b074514..d14fb25b 100644 --- a/testsuite/systemtap.samples/system_func.stp +++ b/testsuite/systemtap.samples/system_func.stp @@ -2,7 +2,7 @@ # test the system() function -global saw_echo +global saw_echo, did_cat probe kernel.function("sys_open") { if (!saw_echo) { @@ -16,9 +16,13 @@ probe kernel.function("sys_open") { probe timer.ms(100) { # should fail system("cat __xyzzy123ABC__") + did_cat = 1 } -probe timer.ms(110) { exit() } +probe timer.ms(150) { + if (saw_echo && did_cat) + exit() +} probe begin { # should succeed -- cgit