[DTrace-devel] [PATCH] test: Clean up fbtprovider/tst.return0.d
Kris Van Hees
kris.van.hees at oracle.com
Fri Apr 22 06:53:22 UTC 2022
On Thu, Apr 21, 2022 at 09:23:56PM -0400, eugene.loh--- via DTrace-devel wrote:
> From: Eugene Loh <eugene.loh at oracle.com>
>
> Remove the vestigial -Z since the remaining probe is actually needed
> for the test not to time out. Change references to "arg0" (which is
> not defined for fbt:::return probes) to "arg1".
Removing -Z is correct.
CHanging from arg0 to arg1 is not correct. The test verifies that the return
value (in arg1) is 0 by means of the predicate. But it prints out arg0 (and
also refers to that in the test assertion.
Now, the arg0 value is actually wrong but that is a different issue.
> Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
> ---
> test/unittest/fbtprovider/tst.return0.d | 8 +++-----
> 1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/test/unittest/fbtprovider/tst.return0.d b/test/unittest/fbtprovider/tst.return0.d
> index 3d58e84f..e37a1632 100644
> --- a/test/unittest/fbtprovider/tst.return0.d
> +++ b/test/unittest/fbtprovider/tst.return0.d
> @@ -1,24 +1,22 @@
> /*
> * Oracle Linux DTrace.
> - * Copyright (c) 2006, 2021, Oracle and/or its affiliates. All rights reserved.
> + * Copyright (c) 2006, 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.
> */
>
> /*
> - * ASSERTION: simple fbt provider arg0 and probfunc print test.
> + * ASSERTION: simple fbt provider arg1 and probfunc print test.
> *
> * SECTION: FBT Provider/Probe arguments
> */
>
> -/* @@runtest-opts: -Z */
> -
> #pragma D option quiet
> #pragma D option statusrate=10ms
>
> fbt::do_sys_poll:return
> /arg1 == 0/
> {
> - printf("%s %x returned 0", probefunc, arg0);
> + printf("%s %x returned 0", probefunc, arg1);
> exit(0);
> }
> --
> 2.18.4
>
>
> _______________________________________________
> DTrace-devel mailing list
> DTrace-devel at oss.oracle.com
> https://oss.oracle.com/mailman/listinfo/dtrace-devel
More information about the DTrace-devel
mailing list