Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Jamie Magee via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org,  Jamie Magee <jamie.magee@gmail.com>
Subject: Re: [PATCH] t0213: skip ancestry tests under user-mode emulation
Date: Mon, 06 Jul 2026 19:30:13 -0700	[thread overview]
Message-ID: <xmqqa4s38rbe.fsf@gitster.g> (raw)
In-Reply-To: <pull.2168.git.1783359242130.gitgitgadget@gmail.com> (Jamie Magee via GitGitGadget's message of "Mon, 06 Jul 2026 17:34:01 +0000")

"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.

>  	then
>  		test_set_prereq TRACE2_ANCESTRY
>  	fi
>
> base-commit: e9019fcafe0040228b8631c30f97ae1adb61bcdc

      reply	other threads:[~2026-07-07  2:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-06 17:34 [PATCH] t0213: skip ancestry tests under user-mode emulation Jamie Magee via GitGitGadget
2026-07-07  2:30 ` Junio C Hamano [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=xmqqa4s38rbe.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=jamie.magee@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox