From: Frank Ch. Eigler Date: Tue, 29 Jan 2013 15:27:52 +0000 (-0500) Subject: testsuite: introduce [uretprobe_p] X-Git-Tag: release-2.1~73 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=9c41fd2ccf0e51ca33f3fc248ebca52931b035b0;p=systemtap.git testsuite: introduce [uretprobe_p] Some test cases assume presence of uretprobes_p, inferred from uprobes_p. With this new predicate, they can check for uretprobes support proper. --- diff --git a/testsuite/lib/systemtap.exp b/testsuite/lib/systemtap.exp index 874050c3a..8582d36d2 100644 --- a/testsuite/lib/systemtap.exp +++ b/testsuite/lib/systemtap.exp @@ -61,6 +61,16 @@ proc uprobes_p {} { } +proc uretprobes_p {} { + set path "/proc/kallsyms" + if {! [uprobes_p]} { return 0 } + if {! [catch {exec grep -q uretprobe $path} dummy]} { return 1 } + if {! [catch {exec grep -q utrace_attach $path} dummy]} { return 1 } + return 0 +} + + + proc dyninst_p {} { global env diff --git a/testsuite/systemtap.unprivileged/unprivileged_myproc.exp b/testsuite/systemtap.unprivileged/unprivileged_myproc.exp index 6613a1826..cb91a80f4 100644 --- a/testsuite/systemtap.unprivileged/unprivileged_myproc.exp +++ b/testsuite/systemtap.unprivileged/unprivileged_myproc.exp @@ -290,14 +290,14 @@ proc test_probes { privilege } { process(string).library(string).function(number).return - process(string).library(string).function(string).return { - setup_kfail UPROBES *-*-* + if {![uretprobes_p]} { setup_kfail URETPROBES *-*-* } } process(number).insn - process(number).insn.block - process(string).insn - process(string).insn.block { - setup_kfail KERNEL *-*-* + setup_kfail UTRACE *-*-* } process(string).library(string).plt.statement(number) - process(string).library(string).plt(string).statement(number) - diff --git a/testsuite/systemtap.unprivileged/unprivileged_probes.exp b/testsuite/systemtap.unprivileged/unprivileged_probes.exp index 6dc422224..33561a2fa 100644 --- a/testsuite/systemtap.unprivileged/unprivileged_probes.exp +++ b/testsuite/systemtap.unprivileged/unprivileged_probes.exp @@ -343,7 +343,7 @@ proc test_unrestricted_probes { privilege } { process(string).library(string).function(number).return - process(string).library(string).function(string).return { - setup_kfail UPROBES *-*-* + if {![uretprobes_p]} { setup_kfail URETPROBES *-*-* } } }