[PATCH v2.5][DRAFT] Add test for target_set tapset.
Josh Stone
jistone@redhat.com
Sat Jun 20 05:57:00 GMT 2009
----- "Przemyslaw Pawelczyk" <przemyslaw@pawelczyk.it> wrote:
> +probe nd_syscall.nanosleep
> +{
> + if (target_set_pid(pid()) && @cast(req_uaddr, "timespec",
> "kernel<linux/time.h>")->tv_sec == $1)
> + target_set_report()
> +}
> +
> +%( arch == "x86_64" || arch == "ppc64" || arch == "ia64" %?
> +probe nd_syscall.compat_nanosleep
> +{
> + if (target_set_pid(pid()) && @cast(req_uaddr, "compat_timespec",
> "kernel<linux/compat.h>")->tv_sec == $1)
> + target_set_report()
> +}
> +%)
I just realized that this gets a LOT easier with the syscall tapset instead:
probe syscall.nanosleep, syscall.compat_nanosleep ?
{
if (target_set_pid(pid()) && $rqtp->tv_sec == $1)
target_set_report()
}
We generally assume that debuginfo is installed for running the testsuite, so let's not focus anymore on problems that aren't related to the thing we're trying to test...
Josh
More information about the Systemtap
mailing list