[DTrace-devel] [PATCH 05/12] Fix the -xctfpath option

Eugene Loh eugene.loh at oracle.com
Tue Jul 19 14:44:18 UTC 2022


On 7/19/22 06:29, Kris Van Hees wrote:

> On Mon, Jul 18, 2022 at 12:28:42PM -0700, Eugene Loh via DTrace-devel wrote:
>
>> Should there also be a "positive" test?  I do not know what, but I imagine
>> something like a tst.ctfpath.d:
>>      /* @@runtest-opts: -xctfpath=/lib/modules/$(uname
>> -r)/kernel/vmlinux.ctfa */
>>      BEGIN { exit(0); }
> Well, this test *is* a positive test.  It verifies that the -xctfpath option is
> recognized, accepted, and processed.  It just looks weird because I use a
> dtrace failure to determine that the option took.  It is the most obvious way
> to test this.
>
> The test you propose would actually pass if -xctfpath was ignored altogether,
> which is certainly not what we want.

Sure. I did not mean this test should replace the one you have ("Does 
DTrace core dump if you try to use the -xctfpath option?"), but that it 
should be added.  The pair of tests, together, check "Does DTrace 
succeed when -xctfpath is set correctly but fail when it is set 
incorrectly?"



More information about the DTrace-devel mailing list