{"thread":{"id":"15057","subject":"Install on opensolaris 2008.05","startedAt":"2008-08-17T12:55:57Z","lastAt":"2008-08-17T20:52:40Z","messageCount":4,"participants":["Sean Brandt","Jeff King","Pierre Habouzit"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"87442","messageId":"7a675f570808170555ie640c86jb5561cc6f7b68c73@mail.gmail.com","threadId":"15057","inReplyTo":null,"subject":"Install on opensolaris 2008.05","fromName":"Sean Brandt","fromEmail":"sean@fuzzymagic.com","sentAt":"2008-08-17T12:55:57Z","receivedAt":"2008-08-17T12:55:57Z","isPatch":false,"sender":{"key":"sean@fuzzymagic.com","avatar":"https://gravatar.com/avatar/d0c3ae40d6faa10b3591a0f728a12e80e1786906ee4b71f650f7fef05f35312c?d=mp&s=160"},"body":"I'm building an opensolaris box, and am running into test failures\nwhen compiling git.\n\n I'm installing on opensolaris 2008.05 and the tests fail in\nt0002-gitfile.sh  ( test numbers 2 and 3 ) is this expected/ok?\n\n*** t0002-gitfile.sh ***\n*   ok 1: initial setup\n* FAIL 2: bad setup: invalid .git file format\n\n                echo \"gitdir $REAL\" >.git &&\n                if git rev-parse 2>.err\n                then\n                        echo \"git rev-parse accepted an invalid .git file\"\n                        false\n                fi &&\n                if ! grep -qe \"Invalid gitfile format\" .err\n                then\n                        echo \"git rev-parse returned wrong error\"\n                        false\n                fi\n\n* FAIL 3: bad setup: invalid .git file path\n\n                echo \"gitdir: $REAL.not\" >.git &&\n                if git rev-parse 2>.err\n                then\n                        echo \"git rev-parse accepted an invalid .git file path\"\n                        false\n                fi &&\n                if ! grep -qe \"Not a git repository\" .err\n                then\n                        echo \"git rev-parse returned wrong error\"\n                        false\n                fi\n\n*   ok 4: final setup + check rev-parse --git-dir\n*   ok 5: check hash-object\n*   ok 6: check cat-file\n*   ok 7: check update-index\n*   ok 8: check write-tree\n*   ok 9: check commit-tree\n*   ok 10: check rev-list\n* failed 2 among 10 test(s)\ngmake[1]: *** [t0002-gitfile.sh] Error 1\ngmake[1]: Leaving directory `/root/git-1.5.6.5/t'\n\n\n\nThanks\n\n- Sean\n"},{"id":"87456","messageId":"20080817200321.GA17785@sigill.intra.peff.net","threadId":"15057","inReplyTo":"7a675f570808170555ie640c86jb5561cc6f7b68c73@mail.gmail.com","subject":"Re: Install on opensolaris 2008.05","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-08-17T20:03:21Z","receivedAt":"2008-08-17T20:03:21Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sun, Aug 17, 2008 at 08:55:57AM -0400, Sean Brandt wrote:\n\n>  I'm installing on opensolaris 2008.05 and the tests fail in\n> t0002-gitfile.sh  ( test numbers 2 and 3 ) is this expected/ok?\n\nNo, it's not expected nor ok (though it there is a reasonable chance it\nis a portability problem in the test script, and not a real git\nbreakage).\n\nWhat does\n\n  make test GIT_TEST_OPTS=\"-v -i\"\n\ntell you?\n\n>                 if ! grep -qe \"Invalid gitfile format\" .err\n\nJust a guess, but I think Solaris grep doesn't understand \"-q\".\n\nDoes the patch below help?\n\n---\ndiff --git a/t/t0002-gitfile.sh b/t/t0002-gitfile.sh\nindex 4db4ac4..e4970fe 100755\n--- a/t/t0002-gitfile.sh\n+++ b/t/t0002-gitfile.sh\n@@ -32,7 +32,7 @@ test_expect_success 'bad setup: invalid .git file format' '\n \t\techo \"git rev-parse accepted an invalid .git file\"\n \t\tfalse\n \tfi &&\n-\tif ! grep -qe \"Invalid gitfile format\" .err\n+\tif ! grep -e \"Invalid gitfile format\" .err\n \tthen\n \t\techo \"git rev-parse returned wrong error\"\n \t\tfalse\n@@ -46,7 +46,7 @@ test_expect_success 'bad setup: invalid .git file path' '\n \t\techo \"git rev-parse accepted an invalid .git file path\"\n \t\tfalse\n \tfi &&\n-\tif ! grep -qe \"Not a git repository\" .err\n+\tif ! grep -e \"Not a git repository\" .err\n \tthen\n \t\techo \"git rev-parse returned wrong error\"\n \t\tfalse\n"},{"id":"87496","messageId":"1DC600E8-5D3A-44F7-994E-2B46254F192C@fuzzymagic.com","threadId":"15057","inReplyTo":"20080817200321.GA17785@sigill.intra.peff.net","subject":"Re: Install on opensolaris 2008.05","fromName":"Sean Brandt","fromEmail":"sean@fuzzymagic.com","sentAt":"2008-08-17T20:50:13Z","receivedAt":"2008-08-17T20:50:13Z","isPatch":false,"sender":{"key":"sean@fuzzymagic.com","avatar":"https://gravatar.com/avatar/d0c3ae40d6faa10b3591a0f728a12e80e1786906ee4b71f650f7fef05f35312c?d=mp&s=160"},"body":"Ahh, looks like it's a grep problem, thanks. opensolaris grep doesn't  \nlike the options in the test.\n\nBy default it provides ggrep (gnu grep ) which does have the  \nappropriate options.\n\nAfter making some changes so that the right grep is available ( moving  \nthe old one out of the way and symlinking ggrep in place ) the tests  \nproceed past the original point to here:\n\n\n* passed all 6 test(s)\n*** t0004-unwritable.sh ***\n* expecting success:\n\n         >file &&\n         git add file &&\n         test_tick &&\n         git commit -m initial &&\n         echo >file &&\n         git add file\n\n\nCreated initial commit 1bd44cb: initial\n  0 files changed, 0 insertions(+), 0 deletions(-)\n  create mode 100644 file\n*   ok 1: setup\n\n* expecting success:\n\n         (\n                 chmod a-w .git/objects .git/objects/?? &&\n                 test_must_fail git write-tree\n         )\n         status=$?\n         chmod 775 .git/objects .git/objects/??\n         (exit $status)\n\n\n47d83249b05cf06491633be38ea8637c5b356acc\n* FAIL 2: write-tree should notice unwritable repository\n\n\n                 (\n                         chmod a-w .git/objects .git/objects/?? &&\n                         test_must_fail git write-tree\n                 )\n                 status=$?\n                 chmod 775 .git/objects .git/objects/??\n                 (exit $status)\n\n\ngmake[1]: *** [t0004-unwritable.sh] Error 1\ngmake[1]: Leaving directory `/root/git-1.5.6.5/t'\ngmake: *** [test] Error 2\n\n\n\n\n- Sean\n\nOn Aug 17, 2008, at 4:03 PM, Jeff King wrote:\n\n> On Sun, Aug 17, 2008 at 08:55:57AM -0400, Sean Brandt wrote:\n>\n>> I'm installing on opensolaris 2008.05 and the tests fail in\n>> t0002-gitfile.sh  ( test numbers 2 and 3 ) is this expected/ok?\n>\n> No, it's not expected nor ok (though it there is a reasonable chance  \n> it\n> is a portability problem in the test script, and not a real git\n> breakage).\n>\n> What does\n>\n>  make test GIT_TEST_OPTS=\"-v -i\"\n>\n> tell you?\n>\n>>                if ! grep -qe \"Invalid gitfile format\" .err\n>\n> Just a guess, but I think Solaris grep doesn't understand \"-q\".\n>\n> Does the patch below help?\n>\n> ---\n> diff --git a/t/t0002-gitfile.sh b/t/t0002-gitfile.sh\n> index 4db4ac4..e4970fe 100755\n> --- a/t/t0002-gitfile.sh\n> +++ b/t/t0002-gitfile.sh\n> @@ -32,7 +32,7 @@ test_expect_success 'bad setup: invalid .git file  \n> format' '\n> \t\techo \"git rev-parse accepted an invalid .git file\"\n> \t\tfalse\n> \tfi &&\n> -\tif ! grep -qe \"Invalid gitfile format\" .err\n> +\tif ! grep -e \"Invalid gitfile format\" .err\n> \tthen\n> \t\techo \"git rev-parse returned wrong error\"\n> \t\tfalse\n> @@ -46,7 +46,7 @@ test_expect_success 'bad setup: invalid .git file  \n> path' '\n> \t\techo \"git rev-parse accepted an invalid .git file path\"\n> \t\tfalse\n> \tfi &&\n> -\tif ! grep -qe \"Not a git repository\" .err\n> +\tif ! grep -e \"Not a git repository\" .err\n> \tthen\n> \t\techo \"git rev-parse returned wrong error\"\n> \t\tfalse\n"},{"id":"87497","messageId":"20080817205240.GC17148@artemis","threadId":"15057","inReplyTo":"1DC600E8-5D3A-44F7-994E-2B46254F192C@fuzzymagic.com","subject":"Re: Install on opensolaris 2008.05","fromName":"Pierre Habouzit","fromEmail":"madcoder@debian.org","sentAt":"2008-08-17T20:52:40Z","receivedAt":"2008-08-17T20:52:40Z","isPatch":false,"sender":{"key":"madcoder@debian.org","avatar":"https://avatars.githubusercontent.com/u/44708?v=4"},"body":"On Sun, Aug 17, 2008 at 08:50:13PM +0000, Sean Brandt wrote:\n> Ahh, looks like it's a grep problem, thanks. opensolaris grep doesn't \n> like the options in the test.\n> \n> By default it provides ggrep (gnu grep ) which does have the appropriate \n> options.\n> \n> After making some changes so that the right grep is available ( moving \n> the old one out of the way and symlinking ggrep in place ) the tests \n> proceed past the original point to here:\n> \n[...]\n> * FAIL 2: write-tree should notice unwritable repository\n[...]\n> gmake[1]: *** [t0004-unwritable.sh] Error 1\n> gmake[1]: Leaving directory `/root/git-1.5.6.5/t'\n                                ^^^^\n\n  Do not run the test-suite as root ?\n\n-- \n·O·  Pierre Habouzit\n··O                                                madcoder@debian.org\nOOO                                                http://www.madism.org\n"}]}