All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nick Alcock <nick.alcock@oracle.com>
To: dtrace@lists.linux.dev, dtrace-devel@oss.oracle.com
Subject: Re: [PATCH] Fix progenyof to compare TGIDs
Date: Tue, 14 Apr 2026 19:19:51 +0100	[thread overview]
Message-ID: <87pl412ym0.fsf@esperi.org.uk> (raw)
In-Reply-To: <20260328164159.15149-1-eugene.loh@oracle.com> (eugene loh's message of "Sat, 28 Mar 2026 12:41:59 -0400")

On 28 Mar 2026, eugene loh uttered the following:

> From: Eugene Loh <eugene.loh@oracle.com>
>
> Switch the BPF progenyof helper to read TASK_TGID so it matches the
> process IDs returned by ppid and expand the progenyof test to cover both
> pid and ppid.  The original tst.progenyof.d only exercised probes in the
> main DTrace thread where tid == tgid, so it never exposed the mismatch.
>
> Signed-off-by: Eugene Loh <eugene.loh@oracle.com>

Reviewed-by: Nick Alcock <nick.alcock@oracle.com>

> diff --git a/test/unittest/funcs/tst.progenyof2.sh b/test/unittest/funcs/tst.progenyof2.sh
> new file mode 100755
> index 000000000..1f284cdd8
> --- /dev/null
> +++ b/test/unittest/funcs/tst.progenyof2.sh
> @@ -0,0 +1,31 @@
> +#!/bin/bash
> +#
> +# Oracle Linux DTrace.
> +# Copyright (c) 2026, 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.
> +
> +dtrace=$1
> +
> +DIRNAME="$tmpdir/progenyof2.$$.$RANDOM"
> +mkdir -p $DIRNAME
> +cd $DIRNAME
> +
> +# make the trigger
> +
> +cat << EOF > a.c
> +int main(void) {
> +	return 0;
> +}

It might in future be worth creating a thread in this test too... and
having a variant which has a process which creates a thread and exec()s
from that thread.

-- 
NULL && (void)

      reply	other threads:[~2026-04-14 18:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-28 16:41 [PATCH] Fix progenyof to compare TGIDs eugene.loh
2026-04-14 18:19 ` Nick Alcock [this message]

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=87pl412ym0.fsf@esperi.org.uk \
    --to=nick.alcock@oracle.com \
    --cc=dtrace-devel@oss.oracle.com \
    --cc=dtrace@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.