{"thread":{"id":"44327","subject":"[regression] `make profile-install` fails in 2.10.1","startedAt":"2016-10-19T15:19:14Z","lastAt":"2016-10-20T16:23:21Z","messageCount":7,"participants":["Jan Keromnes","Jeff King","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"304390","messageId":"CAA6PgK5vtnZSqqZafMVGoy0Rv38=8e__uQvXaf2SyPePHuPjJA@mail.gmail.com","threadId":"44327","inReplyTo":null,"subject":"[regression] `make profile-install` fails in 2.10.1","fromName":"Jan Keromnes","fromEmail":"janx@linux.com","sentAt":"2016-10-19T11:15:56Z","receivedAt":"2016-10-19T15:19:14Z","isPatch":false,"sender":{"key":"janx@linux.com","avatar":"https://gravatar.com/avatar/2d842511ba2875cc54f5434fb9c6a6ef813eb53bd511b6fe05b645f6c151e344?d=mp&s=160"},"body":"Hello,\n\nTL;DR - Probably a regression of a previously reported bug. [0]\n\nI'm trying to `profile-install` Git from source on Ubuntu 16.04, to\nhave the latest stable Git optimized for my machine.\n\nHowever, this often fails, because the profile build runs all Git\ntests (to get an idea of how Git behaves on my hardware, and optimize\nfor it), but it bails out if there are any test failures (for me, this\nhas happened on most Git version upgrades this year, see also [0] and\n[1]).\n\n- Problem: Is there a way to `make profile-install` but ignore\noccasional test failures, as these are not critical to get a useful\nhardware profile? (Note: In a previous thread, Dennis Kaarsemaker\nmentioned this is fixing a symptom, not the root cause, but it would\nstill be great to get a working profile in spite of occasional test\nfailures.)\n\n- Related problem: `t3700-add.sh` fails again in 2.10.1 for me. More\ndetails below, and I can provide further debug information if you\ndon't already know the problem.\n\nThanks,\nJan\n\n[0] \"`make profile-install` fails in 2.9.3\" -\nhttps://marc.info/?l=git&m=147274608823171&w=2\n\n[1] \"Fwd: Git 2.8.1 fails test 32 of t7300-clean.sh, breaks profile\nbuild\" - https://marc.info/?l=git&m=146193443529229&w=2\n\n---\n\nSteps to reproduce:\n\n    curl https://www.kernel.org/pub/software/scm/git/git-2.10.1.tar.xz\n| tar xJ \\\n     && cd git-2.10.1 \\\n     && make prefix=/usr profile-install install-man -j18\n\nExpected result:\n\n    - runs all tests to get a profile (ignoring occasional failures)\n    - rebuilds Git with the profile\n    - installs Git\n\nActual result:\n\n    - runs all tests to get a profile\n    - at least one test fails, interrupting the whole process\n    - Git is not installed\n\nFailure log:\n\n    (snip)\n    *** t3700-add.sh ***\n    ok 1 - Test of git add\n    ok 2 - Post-check that foo is in the index\n    ok 3 - Test that \"git add -- -q\" works\n    ok 4 - git add: Test that executable bit is not used if core.filemode=0\n    ok 5 - git add: filemode=0 should not get confused by symlink\n    (snip)\n    ok 38 - git add --chmod=[+-]x stages correctly\n    ok 39 - git add --chmod=+x with symlinks\n    not ok 40 - git add --chmod=[+-]x changes index with already added file\n    #\n    #               echo foo >foo3 &&\n    #               git add foo3 &&\n    #               git add --chmod=+x foo3 &&\n    #               test_mode_in_index 100755 foo3 &&\n    #               echo foo >xfoo3 &&\n    #               chmod 755 xfoo3 &&\n    #               git add xfoo3 &&\n    #               git add --chmod=-x xfoo3 &&\n    #               test_mode_in_index 100644 xfoo3\n    #\n    ok 41 - git add --chmod=[+-]x does not change the working tree\n    ok 42 - no file status change if no pathspec is given\n    ok 43 - no file status change if no pathspec is given in subdir\n    ok 44 - all statuses changed in folder if . is given\n    # failed 1 among 44 test(s)\n    1..44\n    Makefile:43: recipe for target 't3700-add.sh' failed\n    make[3]: Leaving directory '/tmp/git/git-2.10.1/t'\n    make[3]: *** [t3700-add.sh] Error 1\n    Makefile:36: recipe for target 'test' failed\n    make[2]: Leaving directory '/tmp/git/git-2.10.1/t'\n    make[2]: *** [test] Error 2\n    Makefile:2273: recipe for target 'test' failed\n    make[1]: *** [test] Error 2\n    make[1]: Leaving directory '/tmp/git/git-2.10.1'\n    Makefile:1679: recipe for target 'profile' failed\n    make: *** [profile] Error 2\n    The command '/bin/sh -c mkdir /tmp/git  && cd /tmp/git  && curl\nhttps://www.kernel.org/pub/software/scm/git/git-2.10.1.tar.xz | tar xJ\n && cd git-2.10.1  && make prefix=/usr profile-install install-man\n-j18  && rm -rf /tmp/git' returned a non-zero code: 2\n"},{"id":"304422","messageId":"20161019210519.ubk5q54rrvbafch7@sigill.intra.peff.net","threadId":"44327","inReplyTo":"CAA6PgK5vtnZSqqZafMVGoy0Rv38=8e__uQvXaf2SyPePHuPjJA@mail.gmail.com","subject":"Re: [regression] `make profile-install` fails in 2.10.1","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2016-10-19T21:05:19Z","receivedAt":"2016-10-19T21:05:29Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Oct 19, 2016 at 01:15:56PM +0200, Jan Keromnes wrote:\n\n> - Problem: Is there a way to `make profile-install` but ignore\n> occasional test failures, as these are not critical to get a useful\n> hardware profile? (Note: In a previous thread, Dennis Kaarsemaker\n> mentioned this is fixing a symptom, not the root cause, but it would\n> still be great to get a working profile in spite of occasional test\n> failures.)\n\nNo, there isn't a way currently. I agree with Dennis that we do want to\nultimately fix the flaky tests, but at the same time, it does seem\nreasonable to use a partial test run for your profile results.\n\nI suspect you'd need to switch the call to:\n\n  $(MAKE) PROFILE=GEN -j1 -k test || true\n\nto make it best-effort.\n\n> - Related problem: `t3700-add.sh` fails again in 2.10.1 for me. More\n> details below, and I can provide further debug information if you\n> don't already know the problem.\n\nI can't reproduce any problems with raciness there, but there is a known\nproblem with running the script as root (which I guess you might be\ndoing from your \"make prefix=/usr\" call). There's some discussion in\nhttp://public-inbox.org/git/20161010035756.38408-1-jeremyhu@apple.com/T/#u,\nbut it looks like the patch stalled.\n\n-Peff\n"},{"id":"304433","messageId":"xmqqh988j7oo.fsf@gitster.mtv.corp.google.com","threadId":"44327","inReplyTo":"20161019210519.ubk5q54rrvbafch7@sigill.intra.peff.net","subject":"Re: [regression] `make profile-install` fails in 2.10.1","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-10-19T22:27:35Z","receivedAt":"2016-10-19T22:27:53Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> I can't reproduce any problems with raciness there, but there is a known\n> problem with running the script as root (which I guess you might be\n> doing from your \"make prefix=/usr\" call). There's some discussion in\n> http://public-inbox.org/git/20161010035756.38408-1-jeremyhu@apple.com/T/#u,\n> but it looks like the patch stalled.\n\nOuch.  Thanks for a reminder.  How about doing this for now?\n\n-- >8 --\nFrom: Junio C Hamano <gitster@pobox.com>\nDate: Mon, 10 Oct 2016 10:41:51 -0700\nSubject: [PATCH] t3700: fix broken test under !SANITY\n\nAn \"add --chmod=+x\" test recently added by 610d55af0f (\"add: modify\nalready added files when --chmod is given\", 2016-09-14) used \"xfoo3\"\nas a test file.  The paths xfoo[1-3] were used by earlier tests for\nsymbolic links but they were expected to have been removed by the\ntest script reached this new test.\n\nThe removal with \"git reset --hard\" however happened in tests that\nare protected by POSIXPERM,SANITY prerequisites.  Platforms and test\nenvironments that lacked these would have seen xfoo3 as a leftover\nsymbolic link, pointing somewhere else, and chmod test would have\ngiven a wrong result.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n t/t3700-add.sh | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/t/t3700-add.sh b/t/t3700-add.sh\nindex 924a266126..53c0cb6dea 100755\n--- a/t/t3700-add.sh\n+++ b/t/t3700-add.sh\n@@ -350,6 +350,7 @@ test_expect_success POSIXPERM,SYMLINKS 'git add --chmod=+x with symlinks' '\n '\n \n test_expect_success 'git add --chmod=[+-]x changes index with already added file' '\n+\trm -f foo3 xfoo3 &&\n \techo foo >foo3 &&\n \tgit add foo3 &&\n \tgit add --chmod=+x foo3 &&\n-- \n2.10.1-633-g7f0e449216\n\n"},{"id":"304434","messageId":"xmqqd1iwj7jf.fsf@gitster.mtv.corp.google.com","threadId":"44327","inReplyTo":"xmqqh988j7oo.fsf@gitster.mtv.corp.google.com","subject":"Re: [regression] `make profile-install` fails in 2.10.1","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-10-19T22:30:44Z","receivedAt":"2016-10-19T22:30:53Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Ouch.  Thanks for a reminder.  How about doing this for now?\n\nAnd the hack I used to quickly test it looks like this:\n\n    $ cd t\n    $ GIT_I_AM_INSANE=Yes sh ./t3700-add.sh\n\nWe may want a more general \n\n    GIT_OVERRIDE_PREREQ='!SANITY,!POSIXPERM,MINGW' make test\n\nor something like that, though.\n\n t/test-lib.sh | 7 +++++++\n 1 file changed, 7 insertions(+)\n\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 0055ebba46..9c5bcd9d1d 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -89,6 +89,7 @@ unset VISUAL EMAIL LANGUAGE COLUMNS $(\"$PERL_PATH\" -e '\n \t\tUNZIP\n \t\tPERF_\n \t\tCURL_VERBOSE\n+\t\tI_AM_INSANE\n \t));\n \tmy @vars = grep(/^GIT_/ && !/^GIT_($ok)/o, @env);\n \tprint join(\"\\n\", @vars);\n@@ -1081,6 +1082,12 @@ test_lazy_prereq NOT_ROOT '\n # containing directory doesn't have read or execute permissions.\n \n test_lazy_prereq SANITY '\n+\n+\tif test -n \"$GIT_I_AM_INSANE\"\n+\tthen\n+\t\treturn 1\n+\tfi &&\n+\n \tmkdir SANETESTD.1 SANETESTD.2 &&\n \n \tchmod +w SANETESTD.1 SANETESTD.2 &&\n"},{"id":"304435","messageId":"20161019223706.re6a5m7n43vjfyzh@sigill.intra.peff.net","threadId":"44327","inReplyTo":"xmqqh988j7oo.fsf@gitster.mtv.corp.google.com","subject":"Re: [regression] `make profile-install` fails in 2.10.1","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2016-10-19T22:37:06Z","receivedAt":"2016-10-19T22:37:14Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Oct 19, 2016 at 03:27:35PM -0700, Junio C Hamano wrote:\n\n> Ouch.  Thanks for a reminder.  How about doing this for now?\n> [...]\n>  test_expect_success 'git add --chmod=[+-]x changes index with already added file' '\n> +\trm -f foo3 xfoo3 &&\n>  \techo foo >foo3 &&\n\nYeah, this makes sense. It does make me feel like the test should simply\nbe using xfoo27, or some name that is not otherwise used in the rest of\nthe script, but I don't mind doing the minimal thing.\n\n-Peff\n"},{"id":"304436","messageId":"20161019223840.j3lvfswazuozxkjo@sigill.intra.peff.net","threadId":"44327","inReplyTo":"xmqqd1iwj7jf.fsf@gitster.mtv.corp.google.com","subject":"Re: [regression] `make profile-install` fails in 2.10.1","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2016-10-19T22:38:40Z","receivedAt":"2016-10-19T22:38:47Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Oct 19, 2016 at 03:30:44PM -0700, Junio C Hamano wrote:\n\n> > Ouch.  Thanks for a reminder.  How about doing this for now?\n> \n> And the hack I used to quickly test it looks like this:\n> \n>     $ cd t\n>     $ GIT_I_AM_INSANE=Yes sh ./t3700-add.sh\n> \n> We may want a more general \n> \n>     GIT_OVERRIDE_PREREQ='!SANITY,!POSIXPERM,MINGW' make test\n> \n> or something like that, though.\n\nI don't think I've ever wanted to do that myself, but I can see how it\nmight be useful (e.g., claiming we don't support symlinks is another\none).\n\nI usually just try to recreate the actual environment (e.g., run the\ntests as root, run them on a loopback case-insensitive fs, etc) as that\ngives a more realistic recreation.\n\n-Peff\n"},{"id":"304473","messageId":"xmqqinsnhtwa.fsf@gitster.mtv.corp.google.com","threadId":"44327","inReplyTo":"20161019223840.j3lvfswazuozxkjo@sigill.intra.peff.net","subject":"Re: [regression] `make profile-install` fails in 2.10.1","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-10-20T16:23:01Z","receivedAt":"2016-10-20T16:23:21Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> I usually just try to recreate the actual environment (e.g., run the\n> tests as root, run them on a loopback case-insensitive fs, etc) as that\n> gives a more realistic recreation.\n\nTrue.  I just do not want to run the tests as root myself ;-)  I\nwonder if fakeroot would give us good enough illusion for that--I\nhaven't used it for a long while.\n"}]}