{"thread":{"id":"31900","subject":"Re: make test","startedAt":"2012-10-22T14:19:39Z","lastAt":"2012-10-22T14:19:39Z","messageCount":1,"participants":["Joachim Schmitz"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"201694","messageId":"001a01cdb060$45fbc7d0$d1f35770$@schmitz-digital.de","threadId":"31900","inReplyTo":null,"subject":"Re: make test","fromName":"Joachim Schmitz","fromEmail":"jojo@schmitz-digital.de","sentAt":"2012-10-22T14:19:39Z","receivedAt":"2012-10-22T14:19:39Z","isPatch":false,"sender":{"key":"jojo@schmitz-digital.de","avatar":"https://avatars.githubusercontent.com/u/1786669?v=4"},"body":"\"Joachim Schmitz\" <jojo@schmitz-digital.de> schrieb im Newsbeitrag news:<k5gov5$fe1$1@ger.gmane.org>...\n> Hi folks\n> \n> I'm trying to understand why certain tests in 'make test' fail. Here's the \n> first one\n> \n> $ ../git --version\n> git version 1.8.0.rc2.5.g6b89306\n> $ GIT_TEST_CMP_USE_COPIED_CONTEXT=true ./t0000-basic.sh # our diff doesn't \n> understand -u\n> ok 1 - .git/objects should be empty after git init in an empty repo\n> ...\n> ok 3 - success is reported like this\n> not ok 4 - pretend we have a known breakage # TODO known breakage\n> \n>     This is expected, right?\n> \n> ok 5 - pretend we have fixed a known breakage (run in sub test-lib)\n> ...\n> ok 11 - tests clean up after themselves\n> \n>     the next is not though? Why might it be failing, where to check?\n> \n> not ok - 12 tests clean up even on failures\n> #\n> #               mkdir failing-cleanup &&\n> #               (\n> #               cd failing-cleanup &&\n> #\n> #               cat >failing-cleanup.sh <<-EOF &&\n> #               #!/bin/sh\n> #\n> #               test_description='Failing tests with cleanup commands'\n> #\n> #               # Point to the t/test-lib.sh, which isn't in ../ as usual\n> #               TEST_DIRECTORY=\"/home/jojo/git/git/t\"\n> #               . \"$TEST_DIRECTORY\"/test-lib.sh\n> #\n> #               test_expect_success 'tests clean up even after a failure' '\n> #                       touch clean-after-failure &&\n> #                       test_when_finished rm clean-after-failure &&\n> #                       (exit 1)\n> #               '\n> #               test_expect_success 'failure to clean up causes the test to \n> fail' '\n> #                       test_when_finished \"(exit 2)\"\n> #               '\n> #               test_done\n> #\n> #               EOF\n> #\n> #               chmod +x failing-cleanup.sh &&\n> #               test_must_fail ./failing-cleanup.sh >out 2>err &&\n> #               ! test -s err &&\n> #               ! test -f \"trash \n> directory.failing-cleanup/clean-after-failure\" &&\n> #               sed -e 's/Z$//' -e 's/^> //' >expect <<-\\EOF &&\n> #               > not ok - 1 tests clean up even after a failure\n> #               > #     Z\n> #               > #     touch clean-after-failure &&\n> #               > #     test_when_finished rm clean-after-failure &&\n> #               > #     (exit 1)\n> #               > #     Z\n> #               > not ok - 2 failure to clean up causes the test to fail\n> #               > #     Z\n> #               > #     test_when_finished \"(exit 2)\"\n> #               > #     Z\n> #               > # failed 2 among 2 test(s)\n> #               > 1..2\n> #               EOF\n> #               test_cmp expect out\n> #               )\n> #\n> ok 13 - git update-index without --add should fail adding\n> ...\n> ok 47 - very long name in the index handled sanely\n> # still have 1 known breakage(s)\n> # failed 1 among remaining 46 test(s)\n> 1..47\n\nAs mentioned elsethread this works if using bash rather than the system's sh (which is a ksh)\n\nBut there are several other failures. After some investigations and experiments I found the following tests to fail with the system\nprovided grep (for which I had to set GIT_TEST_CMP_USE_COPIED_CONTEXT), but succeed with GNU grep:\nt3308 #14, #15, #17and #19\nt3310 #10, #12, #14 and #18\nt4047 #38 and #39\nt4050 #2 and #3\nt4116 #3, #4 and #5\nt5509 #2\nt7401 #18\n\nThe following fail with the system provided tar, but succeed with GNU tar:\nt0024 #2\nt4116 #4,\nt5000 #14, #16, #20, #24, #26 and #51\nt5001 #2, #6, #10 and #15\n\nThe following tests fail with the system provided sh (which is a ksh really), but succeed with bash:\nt0000 #12\nt0001 #20\nt1450 #17 and #18\n(t0204 #3 and #8 succeed in sh but fail in bash. They succeed in bash too when /usr/local/bin is in PATH first though, which would\nsort the diff and tar problem too, need to investigate why)\nt3006 #2 and #3\n\nt3403 #4, #5, #8 and #9\nt3404 #2 - #13, #14 - #18, #20 - #41, #44, #46 - #70\nt3409 #2 - #5\nt3410 #2 and #3\nt3411 #2 and #3\nt3412 #8, #10 - #12, #15, #17, #23, #25, -26, #28, #29, #31\nt3413 #3, #5 - #10, #14, #15\nand many more...\n\nThe following needs bash and /usr/local/bin first in PATH (\"PATH=/usr/local/bin:$PATH make test\")\nt0204 #3 and #8 (or just sh, see above)\nt3032 #11\nt3900 #24, #25\nt4201 #8\nt5000 #14\nt5150 #6\n\nI though \"SANE_TOOL_PATH=/usr/local/bin\" plus \"SHELL_PATH=/usr/local/bin/bash\" would to fix the all but it does not and instead\nbrings up some other failures too:\nt5521 #2 and #5\nt5526 #2, #5, #8, #10, #12, #13, #16 - #19, #21 - #25\nt5702 #3\nt5800 #2, #3, #5 - #14\nt9001 #66\n\nWith additionally having \"PATH=/usr/local/bin:$PATH\" all but one work, so there must be something wrong with SANE_TOOL_PATH?.\nThe single failure remaining is\nt0301 #12 \"helper (cache --timeout=1) times out\"\nI don't understand this at all, neither the -v options nor running it with bash -x helps me in understanding what the issue is.\n\nBye, Jojo\n"}]}