{"thread":{"id":"12206","subject":"Solaris test failure -- FAIL 61: invalid bool (set)","startedAt":"2008-02-19T21:22:20Z","lastAt":"2008-02-20T05:04:20Z","messageCount":9,"participants":["Whit Armstrong","Johannes Schindelin","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"69311","messageId":"8ec76080802191322t2417ea48y1537011f1031dff8@mail.gmail.com","threadId":"12206","inReplyTo":null,"subject":"Solaris test failure -- FAIL 61: invalid bool (set)","fromName":"Whit Armstrong","fromEmail":"armstrong.whit@gmail.com","sentAt":"2008-02-19T21:22:20Z","receivedAt":"2008-02-19T21:22:20Z","isPatch":false,"sender":{"key":"armstrong.whit@gmail.com","avatar":"https://gravatar.com/avatar/3977f2e287db4d4de47839714313edee1222fa9d68677e1de922ec243da4b77d?d=mp&s=160"},"body":"Does anyone have experience with this test failure in t1300-repo-config.sh:\n\n* FAIL 61: invalid bool (set)\n\n\n                git config --bool bool.nobool foobar\n*   ok 62: set --bool\n\n* failed 1 among 70 test(s)\nmake[1]: *** [t1300-repo-config.sh] Error 1\nmake[1]: Leaving directory `/home/warmstro/download/git-1.5.4.2/t'\nmake: *** [test] Error 2\n\n\nmachine information:\nxs5-trd-p1.grn:warmstro> uname -a\nSunOS xs5-trd-p1 5.9 Generic_118558-38 sun4u sparc SUNW,Sun-Fire-V240 Solaris\nxs5-trd-p1.grn:warmstro>\n\nAny suggestions would be much appreciated.\n\nThanks,\nWhit\n"},{"id":"69326","messageId":"alpine.LSU.1.00.0802192220440.7826@racer.site","threadId":"12206","inReplyTo":"8ec76080802191322t2417ea48y1537011f1031dff8@mail.gmail.com","subject":"Re: Solaris test failure -- FAIL 61: invalid bool (set)","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-02-19T22:21:35Z","receivedAt":"2008-02-19T22:21:35Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 19 Feb 2008, Whit Armstrong wrote:\n\n> Does anyone have experience with this test failure in t1300-repo-config.sh:\n> \n> * FAIL 61: invalid bool (set)\n> \n> \n>                 git config --bool bool.nobool foobar\n> *   ok 62: set --bool\n> \n> * failed 1 among 70 test(s)\n\nThat is not very instructive.  Can you call the test with\n\n\t$ sh t1300-repo-config.sh -i -v\n\n?\n\n> make[1]: Leaving directory `/home/warmstro/download/git-1.5.4.2/t'\n\nAh, I guess it is 1.5.4.2.\n\nCiao,\nDscho\n"},{"id":"69329","messageId":"8ec76080802191517k5f070d45l497063d93e080272@mail.gmail.com","threadId":"12206","inReplyTo":"alpine.LSU.1.00.0802192220440.7826@racer.site","subject":"Re: Solaris test failure -- FAIL 61: invalid bool (set)","fromName":"Whit Armstrong","fromEmail":"armstrong.whit@gmail.com","sentAt":"2008-02-19T23:17:42Z","receivedAt":"2008-02-19T23:17:42Z","isPatch":false,"sender":{"key":"armstrong.whit@gmail.com","avatar":"https://gravatar.com/avatar/3977f2e287db4d4de47839714313edee1222fa9d68677e1de922ec243da4b77d?d=mp&s=160"},"body":"Yes, it's git-1.5.4.2.  Sorry for the omission.\n\noutput from  $ sh t1300-repo-config.sh -i -v (had to use bash instead\nof sh, hope that's ok):\n\n*   ok 60: invalid bool (--get)\n\n* expecting failure:\n\n        git config --bool bool.nobool foobar\nt1300-repo-config.sh: line -176: 18181 Segmentation Fault      (core\ndumped) git config --bool bool.nobool foobar\n* FAIL 61: invalid bool (set)\n\n\n                git config --bool bool.nobool foobar\nxs5-trd-p1.grn:warmstro>\n\nThanks,\nWhit\n\n\nOn Feb 19, 2008 5:21 PM, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:\n> Hi,\n>\n> On Tue, 19 Feb 2008, Whit Armstrong wrote:\n>\n> > Does anyone have experience with this test failure in t1300-repo-config.sh:\n> >\n> > * FAIL 61: invalid bool (set)\n> >\n> >\n> >                 git config --bool bool.nobool foobar\n> > *   ok 62: set --bool\n> >\n> > * failed 1 among 70 test(s)\n>\n> That is not very instructive.  Can you call the test with\n>\n>         $ sh t1300-repo-config.sh -i -v\n>\n> ?\n>\n> > make[1]: Leaving directory `/home/warmstro/download/git-1.5.4.2/t'\n>\n> Ah, I guess it is 1.5.4.2.\n>\n> Ciao,\n> Dscho\n>\n>\n"},{"id":"69332","messageId":"alpine.LSU.1.00.0802200030390.8333@wbgn129.biozentrum.uni-wuerzburg.de","threadId":"12206","inReplyTo":"8ec76080802191517k5f070d45l497063d93e080272@mail.gmail.com","subject":"Re: Solaris test failure -- FAIL 61: invalid bool (set)","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-02-19T23:31:27Z","receivedAt":"2008-02-19T23:31:27Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 19 Feb 2008, Whit Armstrong wrote:\n\n> Yes, it's git-1.5.4.2.  Sorry for the omission.\n> \n> output from  $ sh t1300-repo-config.sh -i -v (had to use bash instead\n> of sh, hope that's ok):\n> \n> *   ok 60: invalid bool (--get)\n> \n> * expecting failure:\n> \n>         git config --bool bool.nobool foobar\n> t1300-repo-config.sh: line -176: 18181 Segmentation Fault      (core\n> dumped) git config --bool bool.nobool foobar\n> * FAIL 61: invalid bool (set)\n\nAnd?  Did you actually start that command line with a debugger in \nt/trash/?\n\nHth,\nDscho\n"},{"id":"69334","messageId":"20080219234422.GA9987@coredump.intra.peff.net","threadId":"12206","inReplyTo":"8ec76080802191517k5f070d45l497063d93e080272@mail.gmail.com","subject":"Re: Solaris test failure -- FAIL 61: invalid bool (set)","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-02-19T23:44:22Z","receivedAt":"2008-02-19T23:44:22Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Feb 19, 2008 at 06:17:42PM -0500, Whit Armstrong wrote:\n\n>         git config --bool bool.nobool foobar\n> t1300-repo-config.sh: line -176: 18181 Segmentation Fault      (core\n> dumped) git config --bool bool.nobool foobar\n\nAh. The problem is that we use git_config_int() to parse the command\nline option which, upon failure, attempts to print a message with\nconfig_file_name, which is NULL (since we're not parsing a config file\ncurrently). On most systems, printf simply prints \"(null)\", but on\nSolaris, it segfaults. But we shouldn't be passing NULL anyway on any\nsystem, since it makes the message ugly.\n\nThis patch fixes it.\n\n-- >8 --\ngit_config_*: don't assume we are parsing a config file\n\nThese functions get called by other code, including parsing config\noptions from the command line. In that case, config_file_name is NULL,\nleading to an ugly message or even a segfault on some implementations of\nprintf.\n\n---\ndiff --git a/config.c b/config.c\nindex 8064cae..c105c13 100644\n--- a/config.c\n+++ b/config.c\n@@ -280,11 +280,18 @@ int git_parse_ulong(const char *value, unsigned long *ret)\n \treturn 0;\n }\n \n+static void die_bad_config(const char *name)\n+{\n+\tif (config_file_name)\n+\t\tdie(\"bad config value '%s' in %s\", name, config_file_name);\n+\tdie(\"bad config value for '%s'\", name);\n+}\n+\n int git_config_int(const char *name, const char *value)\n {\n \tlong ret;\n \tif (!git_parse_long(value, &ret))\n-\t\tdie(\"bad config value for '%s' in %s\", name, config_file_name);\n+\t\tdie_bad_config(name);\n \treturn ret;\n }\n \n@@ -292,7 +299,7 @@ unsigned long git_config_ulong(const char *name, const char *value)\n {\n \tunsigned long ret;\n \tif (!git_parse_ulong(value, &ret))\n-\t\tdie(\"bad config value for '%s' in %s\", name, config_file_name);\n+\t\tdie_bad_config(name);\n \treturn ret;\n }\n \n"},{"id":"69335","messageId":"20080219234945.GB9987@coredump.intra.peff.net","threadId":"12206","inReplyTo":"20080219234422.GA9987@coredump.intra.peff.net","subject":"Re: Solaris test failure -- FAIL 61: invalid bool (set)","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-02-19T23:49:45Z","receivedAt":"2008-02-19T23:49:45Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Feb 19, 2008 at 06:44:22PM -0500, Jeff King wrote:\n\n> +static void die_bad_config(const char *name)\n> +{\n> +\tif (config_file_name)\n> +\t\tdie(\"bad config value '%s' in %s\", name, config_file_name);\n> +\tdie(\"bad config value for '%s'\", name);\n\nOops. This first one should read:\n\n  bad config value _for_ '%s'...\n\nOtherwise, test t1300:58 fails when trying to match the text. It's\njust a typo in my previous patch.\n\n-Peff\n"},{"id":"69336","messageId":"20080219235250.GA12979@coredump.intra.peff.net","threadId":"12206","inReplyTo":"20080219234945.GB9987@coredump.intra.peff.net","subject":"Re: Solaris test failure -- FAIL 61: invalid bool (set)","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-02-19T23:52:50Z","receivedAt":"2008-02-19T23:52:50Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Feb 19, 2008 at 06:49:45PM -0500, Jeff King wrote:\n\n> Otherwise, test t1300:58 fails when trying to match the text. It's\n> just a typo in my previous patch.\n\nBah, and there are even more errors at the end of the test (though I am\nnot sure if they are related to the fix, or were there already). I don't\nhave time to look at this anymore right now, but I will try to run the\nfull test suite on Solaris later tonight.\n\n-Peff\n"},{"id":"69339","messageId":"8ec76080802191611s3348beb1icd0b24db8b0a9556@mail.gmail.com","threadId":"12206","inReplyTo":"20080219235250.GA12979@coredump.intra.peff.net","subject":"Re: Solaris test failure -- FAIL 61: invalid bool (set)","fromName":"Whit Armstrong","fromEmail":"armstrong.whit@gmail.com","sentAt":"2008-02-20T00:11:01Z","receivedAt":"2008-02-20T00:11:01Z","isPatch":false,"sender":{"key":"armstrong.whit@gmail.com","avatar":"https://gravatar.com/avatar/3977f2e287db4d4de47839714313edee1222fa9d68677e1de922ec243da4b77d?d=mp&s=160"},"body":"Thanks for the quick patch, Jeff.\n\nThat certainly fixes t1300-repo-config.sh.\n\nI must be seeing the same failures as you ( in t3404-rebase-interactive.sh ).\n\nThanks for your help, everyone.\n\n-Whit\n\n\nOn Feb 19, 2008 6:52 PM, Jeff King <peff@peff.net> wrote:\n> On Tue, Feb 19, 2008 at 06:49:45PM -0500, Jeff King wrote:\n>\n> > Otherwise, test t1300:58 fails when trying to match the text. It's\n> > just a typo in my previous patch.\n>\n> Bah, and there are even more errors at the end of the test (though I am\n> not sure if they are related to the fix, or were there already). I don't\n> have time to look at this anymore right now, but I will try to run the\n> full test suite on Solaris later tonight.\n>\n> -Peff\n>\n"},{"id":"69359","messageId":"20080220050420.GA16745@coredump.intra.peff.net","threadId":"12206","inReplyTo":"8ec76080802191611s3348beb1icd0b24db8b0a9556@mail.gmail.com","subject":"Re: Solaris test failure -- FAIL 61: invalid bool (set)","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-02-20T05:04:20Z","receivedAt":"2008-02-20T05:04:20Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Feb 19, 2008 at 07:11:01PM -0500, Whit Armstrong wrote:\n\n> That certainly fixes t1300-repo-config.sh.\n> \n> I must be seeing the same failures as you ( in t3404-rebase-interactive.sh ).\n\nI actually was seeing errors later in t1300, but they were fixed by\nputting GNU coreutils at the front of my path (btw, we had discussed\npreviously using \"diff -u\" to compare actual and expected output in many\ntests -- Solaris diff doesn't understand \"-u\").\n\nI see the errors in t3404. They are caused by the Solaris /bin/sh not\nunderstanding $() syntax. We create a \"fake-editor\" script to simulate\nthe editor during interactive rebase, and it is hard-coded to /bin/sh.\n\nSo we should probably do something like:\n\ndiff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh\nindex e5ed745..62e65d7 100755\n--- a/t/t3404-rebase-interactive.sh\n+++ b/t/t3404-rebase-interactive.sh\n@@ -61,8 +61,8 @@ test_expect_success 'setup' '\n \tgit tag I\n '\n \n-cat > fake-editor.sh <<\\EOF\n-#!/bin/sh\n+echo \"#!$SHELL\" >fake-editor\n+cat >> fake-editor.sh <<\\EOF\n case \"$1\" in\n */COMMIT_EDITMSG)\n \ttest -z \"$FAKE_COMMIT_MESSAGE\" || echo \"$FAKE_COMMIT_MESSAGE\" > \"$1\"\n\nThere are probably more instances of this problem, but I haven't\nchecked. I had high hopes of running the testsuite to completion\ntonight, but I am getting stuck now in t3900.\n\n-Peff\n"}]}