Re: [PATCH 24/38] test: Make test independent of specific PC

Eugene Loh
2024-07-22T00:10:58Z

On 7/19/24 17:02, Kris Van Hees wrote:

> On Thu, Jun 27, 2024 at 01:38:50AM -0400, eugene.loh@oracle.com wrote:
>> From: Eugene Loh <eugene.loh@oracle.com>
> I agree in principle that this test should not depend on a specific PC value,
> but that leaves the issue that with this patch, I do not think there is any
> real test to verify that the PC value is sane. So, that probably should be
> added.

Hmm, yeah, I guess so.  Okay, I posted v2 (with a tweaked title "test:
Handle dtrace:::ERROR arg3 specially").  Also, I posted a v2 of patch
25/38.  You already R-b'ed it, but it gets modified (in a very minor
way) by the effects of this patch.  I'll assume your R-b still stands,
but take a look if you're curious.

>> Signed-off-by: Eugene Loh <eugene.loh@oracle.com>
>> ---
>> test/unittest/error/tst.DTRACEFLT_UNKNOWN.d | 6 +++---
>> test/unittest/error/tst.DTRACEFLT_UNKNOWN.r | 2 +-
>> 2 files changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/test/unittest/error/tst.DTRACEFLT_UNKNOWN.d b/test/unittest/error/tst.DTRACEFLT_UNKNOWN.d
>> index 001903ff..bfc77bf5 100644
>> --- a/test/unittest/error/tst.DTRACEFLT_UNKNOWN.d
>> +++ b/test/unittest/error/tst.DTRACEFLT_UNKNOWN.d
>> @@ -1,6 +1,6 @@
>> /*
>> * Oracle Linux DTrace.
>> - * Copyright (c) 2006, 2020, Oracle and/or its affiliates. All rights reserved.
>> + * Copyright (c) 2006, 2024, 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.
>> */
>> @@ -19,8 +19,8 @@
>>
>> ERROR
>> {
>> - printf("The arguments are %u %u %u %u %u\n",
>> - arg1, arg2, arg3, arg4, arg5);
>> + printf("The arguments are %u %u PC %u %u\n",
>> + arg1, arg2, arg4, arg5);
>> printf("The value of arg4 = %u\n", DTRACEFLT_UNKNOWN);
>> exit(0);
>> }
>> diff --git a/test/unittest/error/tst.DTRACEFLT_UNKNOWN.r b/test/unittest/error/tst.DTRACEFLT_UNKNOWN.r
>> index b11f6c99..3e7caac4 100644
>> --- a/test/unittest/error/tst.DTRACEFLT_UNKNOWN.r
>> +++ b/test/unittest/error/tst.DTRACEFLT_UNKNOWN.r
>> @@ -1,4 +1,4 @@
>> -The arguments are 2 2 4 1 64
>> +The arguments are 2 2 PC 1 64
>> The value of arg4 = 0
>>
>> -- @@stderr --
>> --
>> 2.18.4
>>