Re: [PATCH] Fix progenyof to compare TGIDs
Nick Alcock <[email protected]> Tue, 14 Apr 2026 19:19:51 +0100
| Newsgroups | dev.linux.lists.dtrace |
|---|---|
| Message-ID | <[email protected]> |
On 28 Mar 2026, eugene loh uttered the following: > From: Eugene Loh <[email protected]> > > 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 <[email protected]> Reviewed-by: Nick Alcock <[email protected]> > 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)