git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 21, 2026, 17:17 UTC
Message-ID
<xmqq33xcz2i7.fsf@gitster.g>
In-Reply-To
<xmqqa4s38rbe.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
Show 26 quoted lines
> "Jamie Magee via GitGitGadget" <gitgitgadget@gmail.com> writes:
>
>> -# Determine if cmd_ancestry is supported on this platform.
>> +# Enable these tests only when cmd_ancestry reports real process names.
>> +# The procinfo stub emits no event; under user-mode emulation (e.g.
>> +# qemu-user) /proc reports the emulator, not the guest. Spawn test-tool
>> +# from test-tool and require "test-tool" in the child's ancestry.
>
> T.r.i.c.k.y. ;-)
>
>>  test_expect_success 'detect cmd_ancestry support' '
>>  	test_when_finished "rm -f trace.detect" &&
>>  	GIT_TRACE2_BRIEF=1 GIT_TRACE2="$(pwd)/trace.detect" \
>> -		test-tool trace2 001return 0 &&
>> -	if grep -q "^cmd_ancestry" trace.detect
>> +		test-tool trace2 004child test-tool trace2 001return 0 &&
>> +	if grep -q "^cmd_ancestry.*test-tool" trace.detect
>
> This will be happy even if "test-tool-trash" that happens to have
> "test-tool" as its prefix appears on a cmd_ancestry line (for that
> matter, things like "cmd_ancestry-not-quite" that has "cmd_ancestry"
> as its prefix would be accepted).  I guess that is OK because we are
> testing this in a fairly tightly controlled environment (trace keys
> are taken from known vocabulary, not arbitrary strings, for example).
>
> Will queue.  Thanks.

Just to clarify, 'Will queue' simply means that the patch will appear in 'seen'. It does not imply that I have personally reviewed the change and found it acceptable to merge into 'next'.

I would appreciate a review from someone familiar with the trace2 facility.

Thanks.
Previous: Junio C HamanoNext: Weijie Yuan
Message 3 of 7 in “t0213: skip ancestry tests under user-mode emulation”
  1. t0213: skip ancestry tests under user-mode emulationJamie Magee via GitGitGadget, Jul 6, 2026
  2. Junio C HamanoJul 7, 2026
  3. Junio C HamanoJul 21, 2026
  4. Weijie YuanJul 21, 2026
  5. Junio C HamanoJul 21, 2026
  6. Weijie YuanJul 22, 2026
  7. Junio C HamanoAug 3, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.