Re: [PATCH 18/22] test: Remove tst.DTRACEFLT_BADADDR2.d dependency on specific PC

Kris Van Hees
2024-09-14T18:10:53Z

On Thu, Aug 29, 2024 at 01:22:15AM -0400, eugene.loh@oracle.com wrote:
> From: Eugene Loh <eugene.loh@oracle.com>
>
> Signed-off-by: Eugene Loh <eugene.loh@oracle.com>

Reviewed-by: Kris Van Hees <kris.van.hees@oracle.com>

> ---
> test/unittest/error/tst.DTRACEFLT_BADADDR2.d | 12 +++---------
> test/unittest/error/tst.DTRACEFLT_BADADDR2.r | 4 ++--
> 2 files changed, 5 insertions(+), 11 deletions(-)
>
> diff --git a/test/unittest/error/tst.DTRACEFLT_BADADDR2.d b/test/unittest/error/tst.DTRACEFLT_BADADDR2.d
> index 23663f3c..a822e63a 100644
> --- a/test/unittest/error/tst.DTRACEFLT_BADADDR2.d
> +++ b/test/unittest/error/tst.DTRACEFLT_BADADDR2.d
> @@ -1,26 +1,23 @@
> /*
> * Oracle Linux DTrace.
> - * Copyright (c) 2006, 2020, Oracle and/or its affiliates. All rights reserved.
> + * Copyright (c) 2006, 2024, 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.
> */
> -/* @@xfail: dtv2 */
>
> /*
> * ASSERTION:
> * To test DTRACEFLT_BADADDR error with non-NULL address
> *
> * SECTION: dtrace Provider
> - *
> */
>
> -
> #pragma D option quiet
>
> ERROR
> {
> - printf("The arguments are %u %u %u %u %u\n",
> - arg1, arg2, arg3, arg4, arg5);
> + printf("The arguments are %u %u %u %u\n",
> + arg1, arg2, arg4, arg5);
> printf("The value of arg4 should be %u\n", DTRACEFLT_BADADDR);
> printf("The value of arg5 should be %u\n", 0x4000);
> exit(0);
> @@ -28,9 +25,6 @@ ERROR
>
> BEGIN
> {
> -/*
> - x = (int *)64;
> - */
> x = (int *)0x4000;
> y = *x;
> trace(y);
> diff --git a/test/unittest/error/tst.DTRACEFLT_BADADDR2.r b/test/unittest/error/tst.DTRACEFLT_BADADDR2.r
> index ada685d6..6c5fa119 100644
> --- a/test/unittest/error/tst.DTRACEFLT_BADADDR2.r
> +++ b/test/unittest/error/tst.DTRACEFLT_BADADDR2.r
> @@ -1,6 +1,6 @@
> -The arguments are 2 2 4 1 16384
> +The arguments are 3 1 1 16384
> The value of arg4 should be 1
> The value of arg5 should be 16384
>
> -- @@stderr --
> -dtrace: error on enabled probe ID 2 (ID 1: dtrace:::BEGIN): invalid address ({ptr}) in action #2 at BPF pc NNN
> +dtrace: error on enabled probe ID 3 (ID 1: dtrace:::BEGIN): invalid address ({ptr}) in action #1 at BPF pc NNN
> --
> 2.43.5
>