[DTrace-devel] [PATCH 1/3] test: Clean up some comments

Eugene Loh eugene.loh at oracle.com
Fri Apr 22 17:50:37 UTC 2022


On 4/21/22 9:44 AM, Kris Van Hees wrote:

> On Mon, Jan 10, 2022 at 09:10:27PM -0500, eugene.loh--- via DTrace-devel wrote:
>> From: Eugene Loh <eugene.loh at oracle.com>
>>
>> Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
>> ---
>>   test/unittest/providers/err.D_PDESC_INVAL.wrongdec4.d | 4 ++--
>>   test/unittest/providers/err.D_PDESC_ZERO.wrongdec1.d  | 4 ++--
>>   2 files changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/test/unittest/providers/err.D_PDESC_INVAL.wrongdec4.d b/test/unittest/providers/err.D_PDESC_INVAL.wrongdec4.d
>> index 6d4c7d40..421d6474 100644
>> --- a/test/unittest/providers/err.D_PDESC_INVAL.wrongdec4.d
>> +++ b/test/unittest/providers/err.D_PDESC_INVAL.wrongdec4.d
>> @@ -1,6 +1,6 @@
>>   /*
>>    * Oracle Linux DTrace.
>> - * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
>> + * Copyright (c) 2006, 2022, 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.
>>    */
>> @@ -8,7 +8,7 @@
>>   /*
>>    * ASSERTION:
>>    * 	Simple profile provider test.
>> - *	call profile<provider name>; called with no "::::".
>> + *	call profile::::<provider name>; called with four ":".
> This is still wrong.
>
> How about:
>      * ASSERTION: A probe description with more than 4 components is invalid.
>
>>    *	should fail with compilation error.
>>    *
>>    *
>> diff --git a/test/unittest/providers/err.D_PDESC_ZERO.wrongdec1.d b/test/unittest/providers/err.D_PDESC_ZERO.wrongdec1.d
>> index 1d795a9b..7342a489 100644
>> --- a/test/unittest/providers/err.D_PDESC_ZERO.wrongdec1.d
>> +++ b/test/unittest/providers/err.D_PDESC_ZERO.wrongdec1.d
>> @@ -1,6 +1,6 @@
>>   /*
>>    * Oracle Linux DTrace.
>> - * Copyright (c) 2006, 2020, Oracle and/or its affiliates. All rights reserved.
>> + * Copyright (c) 2006, 2022, 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.
>>    */
>> @@ -8,7 +8,7 @@
>>   /*
>>    * ASSERTION:
>>    * 	Simple profile provider test.
>> - *	call profile::<provider name>; called with two "::".
>> + *	call profile::<provider name>; called with two ":".
>>    *	should fail with compilation error.
> This is still wrong.
>
> How about:
>      * ASSERTION: If no probes match <prov>::<probe>, report an error.
>
> And incidentally, the other tests in this directory also have crappy test
> descriptions.  For one, the tests are not specific to the profile provider.
> And the way the assertions are written is just awkward.
>
> Perhaps update them all similar to what I desccribe here in a new revision
> of this patch?
Yeah but that also raises the issue that these tests don't even belong 
in providers/.  I guess I'll drop this patch.  Too much tedium for too 
little value.
>>    *
>>    * SECTION: profile Provider/tick-n probes
>> -- 
>> 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