Re: [PATCH] t0213: skip ancestry tests under user-mode emulation

Junio C Hamano <[email protected]> Mon, 03 Aug 2026 13:59:25 -0700
Newsgroups org.kernel.vger.git
Message-ID <[email protected]>
"Jamie Magee via GitGitGadget" <[email protected]> writes:

> From: Jamie Magee <[email protected]>
>
> The tests added in 3c8c638df6 (t0213: add trace2 cmd_ancestry tests,
> 2026-02-13) expect the cmd_ancestry event to name "test-tool" and
> "git". On Linux those names come from the "comm" field of
> /proc/<pid>/stat. Under user-mode emulation (e.g. qemu-user) /proc
> reports the emulator ("qemu-riscv64") instead, so the event is still
> emitted, the TRACE2_ANCESTRY probe enables the tests, and tests 2-5
> fail even though they pass on native riscv64.
>
> Require the probe to see "test-tool" in the ancestry of a test-tool
> spawned from test-tool, so the tests skip when the names are unreliable.
>
> Cc: Matthew John Cheetham <[email protected]>
> Signed-off-by: Jamie Magee <[email protected]>
> ---
>     t0213: skip ancestry tests under user-mode emulation

While nobody with similar environment that would benefit from this
change has stepped up since this patch was posted almost a month
ago (and I do not have such an environment to test it on, either),
this seems low impact enough to cause regressions in environments
where the change does not intend to affect (i.e., native environments
where process names are trustworthy).

So I am tempted to merge this down, only if it is to shrink the
number of in-flight topics I have to carry and watch out for
updates, as nobody seems to be motivated enough to recruit testers
or reviewers to move the topic forward.

Those who are not in the user-mode emulation environment and are
negatively affected because this patch drops TRACE2_ANCESTRY from
your envionment should block me with a real review on the patch,
preferrably with suggested improvements.

Thanks.