[DTrace-devel] [PATCH] test: add test for probe* bvar support for pid probes

Eugene Loh eugene.loh at oracle.com
Thu Sep 8 16:37:32 UTC 2022


I'm a little confused.  The subject line says probe*, but the patch only 
has probefunc.  The xfail line says probe*.  The body of the commit 
message says probefunc.  I'm unclear what the intended scope of the 
patch is.

Also, the commit message says "because it does not work right." 
Grammatically, "it" would refer to the test, but the message might be 
clearer if one indicts specifically the pid bvar support rather than the 
test.

Possibly, the script should also have a time-out or ERROR probe but that 
may be overkill -- I don't have a solid case to make for them.  The test 
is fine (in this respect) as is.

On 9/7/22 16:15, Kris Van Hees via DTrace-devel wrote:
> This test exercises the correct support for probefunc for pid probes.
> The test is marked @@xfail because it does not currently work right.
>
> Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
> ---
>   test/unittest/pid/tst.probefunc.d | 26 ++++++++++++++++++++++++++
>   1 file changed, 26 insertions(+)
>   create mode 100644 test/unittest/pid/tst.probefunc.d
>
> diff --git a/test/unittest/pid/tst.probefunc.d b/test/unittest/pid/tst.probefunc.d
> new file mode 100644
> index 00000000..a8f273cf
> --- /dev/null
> +++ b/test/unittest/pid/tst.probefunc.d
> @@ -0,0 +1,26 @@
> +/*
> + * Oracle Linux DTrace.
> + * Copyright (c) 2005, 2022, Oracle and/or its affiliates. All rights reserved.
> + * Licensed under the Universal Permissive License v 1.0 as shown at
> + * http://oss.oracle.com/licenses/upl.
> + */
> +
> +/* @@runtest-opts: -c /bin/date */
> +/* @@trigger: none */
> +/* @@xfail: dtv2 -- probe* builtin variables do not work for pid probes yet */
> +
> +pid$target:libc.so:malloc:entry
> +{
> +	trace(probefunc);
> +}
> +
> +pid$target:libc.so:malloc:entry
> +/probefunc == "malloc"/
> +{
> +	exit(0);
> +}
> +
> +pid$target:libc.so:malloc:entry
> +{
> +	exit(1);
> +}



More information about the DTrace-devel mailing list