[DTrace-devel] [PATCH v7 5/6] usdt: new tests for USDT arg sanity with overlapping pid probes
Nick Alcock
nick.alcock at oracle.com
Fri Nov 8 20:21:37 UTC 2024
On 8 Nov 2024, Eugene Loh outgrape:
> On 11/8/24 08:13, Nick Alcock wrote:
>
>> On 7 Nov 2024, Eugene Loh uttered the following:
>>
>>> On 11/6/24 06:29, Nick Alcock wrote:
>>>> Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
>>>> ---
>>>> .../usdt/{tst.pidprobes.sh => pidprobes.sh} | 56 +++++++++++++++----
>>> Why the renaming? And, will "./runtest.sh" run pidprobes.sh without any command-line args?
>> Nope! It's a library now, called by tst.pid*sh, including, uh, the new
>> tst.pidprobes.sh I meant to keep around and call it. Oops!
>
> "Nope"? It seems to me that runtest.sh does indeed call pidprobes.sh
> without any command-line args. It looks in test/unittest/usdt and
> sees a .sh file and runs it. The fact that the .sh does not start
> with "tst." is irrelevant. Indeed, we have lots of tests that do not
> start with "tst." (nor "err." nor "drp." etc.). So if pidprobes.sh is
> not supposed to be run by runtest.sh directly, it has to be hidden
> better than simply by stripping tst. from its name.
What? That's not what's supposed to happen!
... oh, wait, I'm wrong, I'm thinking of tst.* versus err.*, but of
course non-tst stuff runs anyway.
I guess library things have to have non-.sh extensions?
> Incidentally, there is an orphaned tst.pidprobes.r file.
Yeah, that's the bug :) there's suppoed to be a tst.pidprobes.sh -- and
now (as of my most recent push, and mail here) there is again.
It was not my intention to disappear your test! :)
>>>> --- a/test/unittest/usdt/tst.pidprobes.sh
>>>> +++ b/test/unittest/usdt/pidprobes.sh
>>>> @@ -5,9 +5,12 @@
>>>> # Licensed under the Universal Permissive License v 1.0 as shown at
>>>> # http://oss.oracle.com/licenses/upl.
>>>> #
>>>> -# This test verifies that USDT and pid probes can share underlying probes.
>>>> +# This test verifies various properties of USDT and pid probes sharing
>>>> +# underlying probes.
>>>> dtrace=$1
>>>> +usdt=$2
>>> Why is there a usdt=$2? It seems that usdt is always "t" and you'd expect that in test/unittest/usdt.
>> Oh crap. Sorry sorry this is a bug -- I lost the tst.pidprobes.sh I
>> meant to add back. Will fix and repush this patch.
>
> The patch has perhaps already landed. So, a delta patch might be needed.
Sigh.
>> -- which reads, in entirety
>>
>> exec $(dirname $_test)/pidprobes.sh $1 "" ""
>
> Or, just let runtest.sh call it directly, as it does anyhow.
In which case I could rename it back to tst.pidprobes.sh and have other
things call that (and have it default to the behaviour it had before if
called with no args)... does that sound better?
--
NULL && (void)
More information about the DTrace-devel
mailing list