[DTrace-devel] [PATCH 2/2] test: Fix scripting test for "quiet"

Kris Van Hees kris.van.hees at oracle.com
Sun Mar 5 02:09:03 UTC 2023


Instead of doing this, I have a patch ready (will post) that gets rid of this
test and instead adds two tests in unittest/options (where it belongs).

On Sat, Mar 04, 2023 at 05:36:38PM -0500, eugene.loh--- via DTrace-devel wrote:
> From: Eugene Loh <eugene.loh at oracle.com>
> 
> This test was broken because the runtest.sh test harness was ignoring
> the initial #! line, invoking the test as a D script rather than as an
> interpreter file.  Hence, the -q was being ignored;  the .r results
> file fit the actual (incorrect) behavior rather than the anticipated
> (correct) behavior.
> 
> Use interpreter-file support in runtest.sh to launch the test as an
> interpreter file.  Fix the results file to match expected "quiet"
> results.  Rename the file from "quite" to "quiet."
> 
> Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
> ---
>  test/unittest/scripting/{tst.quite.d => tst.quiet.d} | 4 ++--
>  test/unittest/scripting/tst.quiet.r                  | 1 +
>  test/unittest/scripting/tst.quite.r                  | 5 -----
>  3 files changed, 3 insertions(+), 7 deletions(-)
>  rename test/unittest/scripting/{tst.quite.d => tst.quiet.d} (75%)
>  create mode 100644 test/unittest/scripting/tst.quiet.r
>  delete mode 100644 test/unittest/scripting/tst.quite.r
> 
> diff --git a/test/unittest/scripting/tst.quite.d b/test/unittest/scripting/tst.quiet.d
> similarity index 75%
> rename from test/unittest/scripting/tst.quite.d
> rename to test/unittest/scripting/tst.quiet.d
> index 46402cbd..90381a2c 100644
> --- a/test/unittest/scripting/tst.quite.d
> +++ b/test/unittest/scripting/tst.quiet.d
> @@ -1,8 +1,8 @@
> -#!/usr/sbin/dtrace -qs
> +#!dtrace -qs
>  
>  /*
>   * 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.
>   */
> diff --git a/test/unittest/scripting/tst.quiet.r b/test/unittest/scripting/tst.quiet.r
> new file mode 100644
> index 00000000..8b137891
> --- /dev/null
> +++ b/test/unittest/scripting/tst.quiet.r
> @@ -0,0 +1 @@
> +
> diff --git a/test/unittest/scripting/tst.quite.r b/test/unittest/scripting/tst.quite.r
> deleted file mode 100644
> index b7bc367e..00000000
> --- a/test/unittest/scripting/tst.quite.r
> +++ /dev/null
> @@ -1,5 +0,0 @@
> -                   FUNCTION:NAME
> -                          :BEGIN 
> -
> --- @@stderr --
> -dtrace: script 'test/unittest/scripting/tst.quite.d' matched 1 probe
> -- 
> 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