[DTrace-devel] [PATCH] test: Fix tst.goodkey.d

Eugene Loh eugene.loh at oracle.com
Fri Sep 2 16:04:33 UTC 2022


Reviewed-by: Eugene Loh <eugene.loh at oracle.com>
with some comments...

On 9/1/22 23:32, Kris Van Hees via DTrace-devel wrote:
> The tests uses vtimestamp which is not implemented yet.  It is valid to

s/tests/test/

I'd go with a comma before "which."  (There is some technical, 
grammatical rule about this.)

> substitute timestamp instead.

Is there a comment in .r.p that refers to vtimestamp that should be changed?

Does a copyright year have to be updated?

The requirement for that last key is that it's always changing.  So how 
about replacing vtimestamp with i instead?  Using timestamp will 
probably work, but i definitely should.

> The post-processor also needs tweaking because it was not properly
> substituting numbers in the output with only a single space between them.

At this point, should the xfail be removed?

> Signed-off-by: Kris Van Hees<kris.van.hees at oracle.com>
> ---
>   test/unittest/aggs/tst.goodkey.d   | 2 +-
>   test/unittest/aggs/tst.goodkey.r.p | 2 +-
>   2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/test/unittest/aggs/tst.goodkey.d b/test/unittest/aggs/tst.goodkey.d
> index 26f52fad..97ed0847 100644
> --- a/test/unittest/aggs/tst.goodkey.d
> +++ b/test/unittest/aggs/tst.goodkey.d
> @@ -24,7 +24,7 @@ tick-10ms
>   /i != 5/
>   {
>   	i++;
> -	@counts[execname, pid, id, tid, arg0, vtimestamp ] = count();
> +	@counts[execname, pid, id, tid, arg0, timestamp ] = count();
>   
>   }
>   
> diff --git a/test/unittest/aggs/tst.goodkey.r.p b/test/unittest/aggs/tst.goodkey.r.p
> index 3093029b..fef02bd8 100755
> --- a/test/unittest/aggs/tst.goodkey.r.p
> +++ b/test/unittest/aggs/tst.goodkey.r.p
> @@ -16,7 +16,7 @@ NF != 7 { exit(1); }
>                    }
>   
>       # we do not care what the other numbers are
> -    gsub(/ -?[0-9]+ /, " number ");
> +    gsub(/ -?[0-9]+/, " number ");
>   
>       # ignore the first column (which can be anything)
>       # ignore the last column (which we already checked)
> -- 2.34.1 _______________________________________________ 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