From: Taylor Blau <me@ttaylorr.com>
To: Derrick Stolee via GitGitGadget <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, gitster@pobox.com, avarab@gmail.com,
vdye@github.com, stolee@gmail.com,
Derrick Stolee <derrickstolee@github.com>,
Derrick Stolee <dstolee@microsoft.com>
Subject: Re: [PATCH] t/perf/run: fix bin-wrappers computation
Date: Tue, 21 Sep 2021 13:50:18 -0400 [thread overview]
Message-ID: <YUobWlgSjZDGYSvK@nand.local> (raw)
In-Reply-To: <pull.1044.git.1632239172735.gitgitgadget@gmail.com>
On Tue, Sep 21, 2021 at 03:46:12PM +0000, Derrick Stolee via GitGitGadget wrote:
> This is critical to successfully computing performance of commands that
> execute subcommands. The bin-wrappers ensure that the --exec-path is set
> correctly.
Just sanity-checking everything you said: with this bug, we'll set
mydir_abs_wrappers to "/bin-wrappers", then realize that directory
doesn't exist, and fall back to GIT_TEST_INSTALLED=$mydir_abs. Putting
'set -x' at the top of t/perf/run, we can see the relevant section:
+ mydir=build/73cd7d9420bb7d75207e8149521db375c789a81c
+ cd build/73cd7d9420bb7d75207e8149521db375c789a81c
+ pwd
+ mydir_abs=/home/ttaylorr/src/git/t/perf/build/73cd7d9420bb7d75207e8149521db375c789a81c
+ mydir_abs_wrappers=/bin-wrappers
+ test -d /bin-wrappers
+ GIT_TEST_INSTALLED=/home/ttaylorr/src/git/t/perf/build/73cd7d9420bb7d75207e8149521db375c789a81c
+ export GIT_TEST_INSTALLED
OK. But the real problem is in t/test-lib.sh where we read
"$GIT_TEST_INSTALLED". There we ask for the `--exec-path`, which appears
to be wrong, at least in my setup. Printing out the $GIT_EXEC_PATH and
$GIT_TEST_INSTALLED, I get:
/home/ttaylorr/local/git/ds.sparse-checkout/libexec/git-core,
/home/ttaylorr/src/git/t/perf/build/73cd7d9420bb7d75207e8149521db375c789a81c
where the former is the branch I happen to have checked out, and the
latter is the revision that I asked to run performance tests on via
t/perf/run.
So I think we'll run the right top-level Git command since the latter
path ends up first in our $PATH, but the exec path is definitely wrong.
> diff --git a/t/perf/run b/t/perf/run
> index d19dec258a2..55219aa4056 100755
> --- a/t/perf/run
> +++ b/t/perf/run
> @@ -74,7 +74,7 @@ set_git_test_installed () {
> mydir=$1
>
> mydir_abs=$(cd $mydir && pwd)
> - mydir_abs_wrappers="$mydir_abs_wrappers/bin-wrappers"
> + mydir_abs_wrappers="$mydir_abs/bin-wrappers"
This fix looks obviously right to me (and gives me the expected output
from above when I apply it locally).
Thanks,
Taylor
next prev parent reply other threads:[~2021-09-21 17:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-21 15:46 [PATCH] t/perf/run: fix bin-wrappers computation Derrick Stolee via GitGitGadget
2021-09-21 17:50 ` Taylor Blau [this message]
2021-09-21 18:47 ` Derrick Stolee
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=YUobWlgSjZDGYSvK@nand.local \
--to=me@ttaylorr.com \
--cc=avarab@gmail.com \
--cc=derrickstolee@github.com \
--cc=dstolee@microsoft.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=gitster@pobox.com \
--cc=stolee@gmail.com \
--cc=vdye@github.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;
as well as URLs for NNTP newsgroup(s).