From: Nick Alcock <nick.alcock@oracle.com>
To: Eugene Loh <eugene.loh@oracle.com>
Cc: Nick Alcock <nick.alcock@oracle.com>,
dtrace@lists.linux.dev, dtrace-devel@oss.oracle.com
Subject: Re: [PATCH v7 5/6] usdt: new tests for USDT arg sanity with overlapping pid probes
Date: Fri, 08 Nov 2024 13:13:02 +0000 [thread overview]
Message-ID: <87r07l7tsx.fsf@esperi.org.uk> (raw)
In-Reply-To: <c7e23550-b87c-9750-e17f-20b7b060854c@oracle.com> (Eugene Loh's message of "Thu, 7 Nov 2024 15:54:04 -0500")
On 7 Nov 2024, Eugene Loh uttered the following:
> On 11/6/24 06:29, Nick Alcock wrote:
>
>> This generalizes the existing tst.pidprobes.sh to check the args
>> reported by the probe both with and without arg mapping in place.
>>
>> Everything seems to work.
>
> That comment seems to be unnecessary.
I think it's worth noting that all this arg-mapping infrastructure
(mostly entirely untested for fifteen years) still works :)
> Also, is there a "dtrace -lv" test for USDT args? (I'm not even sure if that question makes sense.)
Yep. See the previous patch. (Multiple, actually, Kris had me add a few
more.)
>> Signed-off-by: Nick Alcock <nick.alcock@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!
>> --- 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.
-- which reads, in entirety
exec $(dirname $_test)/pidprobes.sh $1 "" ""
>> @@ -75,7 +86,7 @@ fi
>> # Check that the program output is 0 when the USDT probe is not enabled.
>> # That is, the PYRAMID_ENTRY_ENABLED() is-enabled checks should not pass.
>> -./main > main.out
>> +./main standalone > main.out
>
> I'd vote against this change. Introducing a command-line arg that is not used? Or, add it as a comment? But there is already a
> comment.
I... think that was fallout from my attempt to add deferred support that
I forgot to clean out again. Dropped.
>> echo "my result: 10" > main.out2.expected
>> if ! diff -q main.out2 main.out2.expected > /dev/null; then
>> - echo '"my result"' looks wrong when using DTrace
>> + echo '"my result"' looks wrong
>
> Why? In particular, "when using DTrace" stands in contrast to the earlier message 'echo '"my result"' looks wrong when not using
> DTrace'.
Sorry! I didn't notice that the previous stanza existed and thought
"well of course we're using DTrace, that's redundant". Dropped.
>> -# Sort and check.
>> +# Sort and check (dropping any wake-up firings from deferred probing).
>
> I guess I do not get this. Where does any "dropping" take place?
In the deferred patch that caused massive ructions here and then I tried
to drop by hand very late at night and clearly didn't do as good a job
at as I thought I did. Dropped this reference to, uh, dropping.
>> sort dtrace.out > dtrace.out.sorted
>> sort dtrace.out.expected > dtrace.out.expected.sorted
>> diff --git a/test/unittest/usdt/tst.pidargmap.sh b/test/unittest/usdt/tst.pidargmap.sh
>> new file mode 100755
>> index 000000000000..0c83f8703539
>> --- /dev/null
>> +++ b/test/unittest/usdt/tst.pidargmap.sh
>> @@ -0,0 +1,11 @@
>> +#!/bin/bash
>> +#
>> +# Oracle Linux DTrace.
>> +# Copyright (c) 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.
>> +#
>> +# This test verifies that USDT and pid probes that share underlying probes
>> +# do not apply arg mappings (incorrectly) to the pid probes.
>
> How do we verify that mappings do not apply (incorrectly) to pid probes? Is there supposed to be a check on pid probe args?
Yeah, that's back now, apologies :) verified that it still works, too.
Will send as a followup to this reply in a mo.
--
NULL && (void)
next prev parent reply other threads:[~2024-11-08 13:13 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-06 11:29 [PATCH v7 0/6] usdt typed args, translators and arg mapping Nick Alcock
2024-11-06 11:29 ` [PATCH v7 1/6] usdt: get arg types and xlations into DTrace from the DOF Nick Alcock
2024-11-06 11:29 ` [PATCH v7 2/6] dtprobed: stop skipping zero-tracepoint probes in dof_stash.c Nick Alcock
2024-11-06 11:29 ` [PATCH v7 3/6] cg: add argument mapping in the trampoline Nick Alcock
2024-11-06 11:29 ` [PATCH v7 4/6] usdt: typed args and arg mapping Nick Alcock
2024-11-06 11:29 ` [PATCH v7 5/6] usdt: new tests for USDT arg sanity with overlapping pid probes Nick Alcock
2024-11-07 20:54 ` Eugene Loh
2024-11-08 13:13 ` Nick Alcock [this message]
2024-11-08 13:13 ` [PATCH v8 " Nick Alcock
2024-11-08 18:30 ` [PATCH v7 " Eugene Loh
2024-11-08 20:21 ` Nick Alcock
2024-11-06 11:29 ` [PATCH v7 6/6] usdt: fix create_underlying error path Nick Alcock
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r07l7tsx.fsf@esperi.org.uk \
--to=nick.alcock@oracle.com \
--cc=dtrace-devel@oss.oracle.com \
--cc=dtrace@lists.linux.dev \
--cc=eugene.loh@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox