From ad60080828b8a85c569c1b02859d72aca4e795f8 Mon Sep 17 00:00:00 2001 From: David Smith Date: Fri, 29 Aug 2008 09:59:12 -0500 Subject: [PATCH] Added bug 6841 fix utrace syscall test. 2008-08-29 David Smith PR6841 * systemtap.base/utrace_p5.exp: Added system-wide syscall test for bug 6841 fix. --- testsuite/ChangeLog | 6 ++++++ testsuite/systemtap.base/utrace_p5.exp | 27 ++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/testsuite/ChangeLog b/testsuite/ChangeLog index e6649a360..a0e195215 100644 --- a/testsuite/ChangeLog +++ b/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2008-08-29 David Smith + + PR6841 + * systemtap.base/utrace_p5.exp: Added system-wide syscall test for + bug 6841 fix. + 2008-08-27 Stan Cox * systemtap.base/global_end.exp: New. diff --git a/testsuite/systemtap.base/utrace_p5.exp b/testsuite/systemtap.base/utrace_p5.exp index fcd617fe4..332813500 100644 --- a/testsuite/systemtap.base/utrace_p5.exp +++ b/testsuite/systemtap.base/utrace_p5.exp @@ -73,6 +73,23 @@ set thread_end_script { } set thread_end_script_output "thread_ends = \\d+\r\n" +# Script that tests the bug 6841 fix. +set bz6841_script { + global proc,name + probe begin { printf("systemtap starting probe\n") } + probe process.syscall { + proc[pid()] <<< 1 + name[pid()] = execname() + } + probe end { printf("systemtap ending probe\n") + foreach(p+ in proc) { + printf("%s(%d) issues syscall %d times\n", + name[p], p, @sum(proc[p])) + } + } +} +set bz6841_script_output ".+ issues syscall \\d+ times\r\n" + # Try to find utrace_attach symbol in /proc/kallsyms set path "/proc/kallsyms" if {! [catch {exec grep -q utrace_attach $path} dummy]} { @@ -182,5 +199,15 @@ if {$utrace_support_found == 0} { -e $script } +set TEST_NAME "UTRACE_P5_07" +if {$utrace_support_found == 0} { + untested "$TEST_NAME : no kernel utrace support found" +} elseif {![installtest_p]} { + untested "$TEST_NAME" +} else { + stap_run $TEST_NAME run_utrace_p5_multi $bz6841_script_output \ + -e $bz6841_script +} + # Cleanup exec rm -f $exepath $multi_exepath -- 2.43.5