[DTrace-devel] [PATCH] test: Convert tick-* probes to ioctl:entry for tst.allquant.d

Kris Van Hees kris.van.hees at oracle.com
Wed May 31 06:20:45 UTC 2023


On Tue, May 30, 2023 at 06:20:57PM -0400, eugene.loh--- via DTrace-devel wrote:
> From: Eugene Loh <eugene.loh at oracle.com>
> 
> Historically, many tests have used tick-* probes to get multiple
> probe firings, but those probes can be unreliable, depending on
> how a system is configured.  Tests that required very many probe
> firings have been converted to ioctl:entry.  Tests that required
> very few have been left alone.
> 
> Convert this "in-between" test as well.  It normally passes, but
> with variable execution time and has even been observed to time out.
> 
> Signed-off-by: Eugene Loh <eugene.loh at oracle.com>

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

> ---
>  test/unittest/aggs/tst.allquant.d | 11 +++++++----
>  1 file changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git a/test/unittest/aggs/tst.allquant.d b/test/unittest/aggs/tst.allquant.d
> index d10b0b4d..72bd179d 100644
> --- a/test/unittest/aggs/tst.allquant.d
> +++ b/test/unittest/aggs/tst.allquant.d
> @@ -1,15 +1,18 @@
>  /*
>   * Oracle Linux DTrace.
> - * Copyright (c) 2006, 2020, Oracle and/or its affiliates. All rights reserved.
> + * Copyright (c) 2006, 2023, 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.
>   */
> +/* @@trigger: bogus-ioctl */
> +/* @@nosort */
>  
>  #pragma D option quiet
>  
>  int i;
>  
> -tick-10ms
> +syscall::ioctl:entry
> +/pid == $target/
>  {
>  	@ = quantize(1LL << i);
>  	@ = quantize((1LL << i) + 1);
> @@ -18,8 +21,8 @@ tick-10ms
>  	i++;
>  }
>  
> -tick-10ms
> -/i == 64/
> +syscall::ioctl:entry
> +/pid == $target && i == 64/
>  {
>  	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