[DTrace-devel] [PATCH v3] Add support for array/struct/union to trace()

Eugene Loh eugene.loh at oracle.com
Tue Feb 1 23:10:17 UTC 2022


On 2/1/22 5:15 PM, Kris Van Hees wrote:

> On Tue, Feb 01, 2022 at 01:50:28PM -0500, Eugene Loh via DTrace-devel wrote:
>
>> Is the output in tst.array.r stable?  Or are only the first 7 bytes
>> ("dtrace\0") stable?  The current tst.array.r might work for a broad range
>> of cases, but strictly speaking it probably ought to be fixed.  E.g., maybe
>> add some .r.p file that does
>> sed 's/ 0: 64 74 72 61 63 65 00 .*  dtrace\..*/ 0: 64 74 72 61 63 65 00 00
>> 00 00 00 00 00 00 00 00  dtrace........../'
> It is stable.

?  It is checking the garbage that is beyond the NUL terminating char.  
That means the test relies on irrelevant details to pass.

>> The additional tst.struct<n>.d tests are nice, but we often try to name
>> tests more meaningfully.  That would be easy enough to do here.  E.g.
>> tst.struct-int8.d and so on.
> I don't think that adds any value.

?  It would name things in a way that reflect what they are.  It would 
improve consistency even with other tests in this same directory.  Other 
code reviews have asked for similar changes (instead of enumerating 
variations of a test name, to use test names that suggest the differences).



More information about the DTrace-devel mailing list