[DTrace-devel] [PATCH] Fix progenyof to compare TGIDs
Nick Alcock
nick.alcock at oracle.com
Tue Apr 14 18:19:51 UTC 2026
On 28 Mar 2026, eugene loh uttered the following:
> From: Eugene Loh <eugene.loh at 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 at oracle.com>
Reviewed-by: Nick Alcock <nick.alcock at 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)
More information about the DTrace-devel
mailing list