Re: [PATCH] t3701: two subtests are fixed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Michael,

On Thu, 16 Jun 2022, Michael J Gruber wrote:

> Johannes Schindelin venit, vidit, dixit 2022-06-15 16:50:40:
>
> > On Tue, 14 Jun 2022, Michael J Gruber wrote:
> >
> > > 0527ccb1b5 ("add -i: default to the built-in implementation", 2021-11-30)
> > > switched to the implementation which fixed to subtest. Mark them as
> > > expect_success now.
> >
> > Good catch!
>
> I'm no list regular anymore, but still a "next+ regular". While
> experimenting with my own patch I noticed something got fixed
> unexpectedly. That goes to show that these unexpected successes
> (from expect_failure) go unnoticed too easily. I had missed this on my
> regular rebuilds.

Makes sense.

> > However... that commit specifically contains this change:
> >
> >         diff --git a/ci/run-build-and-tests.sh b/ci/run-build-and-tests.sh
> >         index cc62616d806..660ebe8d108 100755
> >         --- a/ci/run-build-and-tests.sh
> >         +++ b/ci/run-build-and-tests.sh
> >         @@ -29,7 +29,7 @@ linux-gcc)
> >                 export GIT_TEST_COMMIT_GRAPH_CHANGED_PATHS=1
> >                 export GIT_TEST_MULTI_PACK_INDEX=1
> >                 export GIT_TEST_MULTI_PACK_INDEX_WRITE_BITMAP=1
> >         -       export GIT_TEST_ADD_I_USE_BUILTIN=1
> >         +       export GIT_TEST_ADD_I_USE_BUILTIN=0
> >                 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
> >                 export GIT_TEST_WRITE_REV_INDEX=1
> >                 export GIT_TEST_CHECKOUT_WORKERS=2
> >
> > The intention is to have t3701 be run with the non-built-in version of
> > `git add -i` in the `linux-gcc` job, and I am surprised that those two
> > tests do not fail for you in that case.
> >
> > Did you run this through the CI builds?
>
> That's why I mentioned "no list regular" - I didn't know about that knob
> nor the intention to have the test suite run with either implementation
> (rather than switching to the new one for good).
>
> I do local builds, usually with
>
> ```
> DEVELOPER=1 (which I had to disable during the bisect run; gcc12...)
> DEFAULT_TEST_TARGET=prove
> GIT_PROVE_OPTS=--jobs 4
> GIT_TEST_OPTS=--root=/dev/shm/t --chain-lint
> SHELL_PATH=/bin/dash
> SKIP_DASHED_BUILT_INS=y
> ```
>
> in config.mak. Nothing else strikes me as potentially relevant.
>
> Ævar noticed this and has a better version of my patch, I think.

So you did not find it utterly rude and presumptuous that somebody sent a
new iteration of your patch without even so much as consulting with you
whether you're okay with this? I salute your forbearance, then.

Besides, it is not really a better version of your patch. That would have
been:

-- snip --
diff --git a/t/t3701-add-interactive.sh b/t/t3701-add-interactive.sh
index 94537a6b40a..6d1032fe8ae 100755
--- a/t/t3701-add-interactive.sh
+++ b/t/t3701-add-interactive.sh
@@ -538,7 +538,9 @@ test_expect_success 'split hunk "add -p (edit)"' '
 	! grep "^+15" actual
 '

-test_expect_failure 'split hunk "add -p (no, yes, edit)"' '
+test_lazy_prereq BUILTIN_ADD_I 'test_bool_env GIT_TEST_ADD_I_USE_BUILTIN true'
+
+test_expect_success BUILTIN_ADD_I 'split hunk "add -p (no, yes, edit)"' '
 	test_write_lines 5 10 20 21 30 31 40 50 60 >test &&
 	git reset &&
 	# test sequence is s(plit), n(o), y(es), e(dit)
@@ -562,7 +564,7 @@ test_expect_success 'split hunk with incomplete line at end' '
 	test_must_fail git grep --cached before
 '

-test_expect_failure 'edit, adding lines to the first hunk' '
+test_expect_failure BUILTIN_ADD_I 'edit, adding lines to the first hunk' '
 	test_write_lines 10 11 20 30 40 50 51 60 >test &&
 	git reset &&
 	tr _ " " >patch <<-EOF &&
-- snap --

As you can see, this is _actually_ building on your work rather than
replacing it.

But since that replacement made it into -rc1, I will stop spending brain
cycles on it.

Thank you for your contribution, I am glad that you keep sending patches
to the Git mailing list!
Dscho

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux