[DTrace-devel] [PATCH] Allow for changing number of syscalls

Kris Van Hees kris.van.hees at oracle.com
Wed Dec 9 12:23:22 PST 2020


On Mon, Dec 07, 2020 at 05:13:25PM -0500, eugene.loh at oracle.com wrote:
> From: Eugene Loh <eugene.loh at oracle.com>
> 
> DTrace reports how many probes were matched.  Since the number of
> syscalls can depend on the kernel, the number of matched syscalls
> expected should not be hardcoded in our test result files.  This
> problem seems to impact only test/unittest/syscall/tst.entry.d .
> 
> Add a .r.p post-processing file to mask out the exact number of
> matched probes for this test.
> 
> Signed-off-by: Eugene Loh <eugene.loh at oracle.com>

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

> ---
>  test/unittest/syscall/tst.entry.r   | 2 +-
>  test/unittest/syscall/tst.entry.r.p | 8 ++++++++
>  2 files changed, 9 insertions(+), 1 deletion(-)
>  create mode 100755 test/unittest/syscall/tst.entry.r.p
> 
> diff --git a/test/unittest/syscall/tst.entry.r b/test/unittest/syscall/tst.entry.r
> index 8066c23f..52510e61 100644
> --- a/test/unittest/syscall/tst.entry.r
> +++ b/test/unittest/syscall/tst.entry.r
> @@ -2,4 +2,4 @@
>                        mmap:entry 
>  
>  -- @@stderr --
> -dtrace: script 'test/unittest/syscall/tst.entry.d' matched 333 probes
> +dtrace: script 'test/unittest/syscall/tst.entry.d' matched NNN probes
> diff --git a/test/unittest/syscall/tst.entry.r.p b/test/unittest/syscall/tst.entry.r.p
> new file mode 100755
> index 00000000..74bf4560
> --- /dev/null
> +++ b/test/unittest/syscall/tst.entry.r.p
> @@ -0,0 +1,8 @@
> +#!/usr/bin/gawk -f
> +# Oracle Linux DTrace.
> +# Copyright (c) 2020, 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.
> +
> +/^dtrace: script .* matched [0-9]* probes/ { $(NF-1) = "NNN" }
> +{print}
> -- 
> 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