* Solaris test failure -- FAIL 61: invalid bool (set)
@ 2008-02-19 21:22 Whit Armstrong
2008-02-19 22:21 ` Johannes Schindelin
0 siblings, 1 reply; 9+ messages in thread
From: Whit Armstrong @ 2008-02-19 21:22 UTC (permalink / raw)
To: git
Does anyone have experience with this test failure in t1300-repo-config.sh:
* FAIL 61: invalid bool (set)
git config --bool bool.nobool foobar
* ok 62: set --bool
* failed 1 among 70 test(s)
make[1]: *** [t1300-repo-config.sh] Error 1
make[1]: Leaving directory `/home/warmstro/download/git-1.5.4.2/t'
make: *** [test] Error 2
machine information:
xs5-trd-p1.grn:warmstro> uname -a
SunOS xs5-trd-p1 5.9 Generic_118558-38 sun4u sparc SUNW,Sun-Fire-V240 Solaris
xs5-trd-p1.grn:warmstro>
Any suggestions would be much appreciated.
Thanks,
Whit
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Solaris test failure -- FAIL 61: invalid bool (set)
2008-02-19 21:22 Solaris test failure -- FAIL 61: invalid bool (set) Whit Armstrong
@ 2008-02-19 22:21 ` Johannes Schindelin
2008-02-19 23:17 ` Whit Armstrong
0 siblings, 1 reply; 9+ messages in thread
From: Johannes Schindelin @ 2008-02-19 22:21 UTC (permalink / raw)
To: Whit Armstrong; +Cc: git
Hi,
On Tue, 19 Feb 2008, Whit Armstrong wrote:
> Does anyone have experience with this test failure in t1300-repo-config.sh:
>
> * FAIL 61: invalid bool (set)
>
>
> git config --bool bool.nobool foobar
> * ok 62: set --bool
>
> * failed 1 among 70 test(s)
That is not very instructive. Can you call the test with
$ sh t1300-repo-config.sh -i -v
?
> make[1]: Leaving directory `/home/warmstro/download/git-1.5.4.2/t'
Ah, I guess it is 1.5.4.2.
Ciao,
Dscho
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Solaris test failure -- FAIL 61: invalid bool (set)
2008-02-19 22:21 ` Johannes Schindelin
@ 2008-02-19 23:17 ` Whit Armstrong
2008-02-19 23:31 ` Johannes Schindelin
2008-02-19 23:44 ` Jeff King
0 siblings, 2 replies; 9+ messages in thread
From: Whit Armstrong @ 2008-02-19 23:17 UTC (permalink / raw)
To: Johannes Schindelin, git
Yes, it's git-1.5.4.2. Sorry for the omission.
output from $ sh t1300-repo-config.sh -i -v (had to use bash instead
of sh, hope that's ok):
* ok 60: invalid bool (--get)
* expecting failure:
git config --bool bool.nobool foobar
t1300-repo-config.sh: line -176: 18181 Segmentation Fault (core
dumped) git config --bool bool.nobool foobar
* FAIL 61: invalid bool (set)
git config --bool bool.nobool foobar
xs5-trd-p1.grn:warmstro>
Thanks,
Whit
On Feb 19, 2008 5:21 PM, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> Hi,
>
> On Tue, 19 Feb 2008, Whit Armstrong wrote:
>
> > Does anyone have experience with this test failure in t1300-repo-config.sh:
> >
> > * FAIL 61: invalid bool (set)
> >
> >
> > git config --bool bool.nobool foobar
> > * ok 62: set --bool
> >
> > * failed 1 among 70 test(s)
>
> That is not very instructive. Can you call the test with
>
> $ sh t1300-repo-config.sh -i -v
>
> ?
>
> > make[1]: Leaving directory `/home/warmstro/download/git-1.5.4.2/t'
>
> Ah, I guess it is 1.5.4.2.
>
> Ciao,
> Dscho
>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Solaris test failure -- FAIL 61: invalid bool (set)
2008-02-19 23:17 ` Whit Armstrong
@ 2008-02-19 23:31 ` Johannes Schindelin
2008-02-19 23:44 ` Jeff King
1 sibling, 0 replies; 9+ messages in thread
From: Johannes Schindelin @ 2008-02-19 23:31 UTC (permalink / raw)
To: Whit Armstrong; +Cc: git
Hi,
On Tue, 19 Feb 2008, Whit Armstrong wrote:
> Yes, it's git-1.5.4.2. Sorry for the omission.
>
> output from $ sh t1300-repo-config.sh -i -v (had to use bash instead
> of sh, hope that's ok):
>
> * ok 60: invalid bool (--get)
>
> * expecting failure:
>
> git config --bool bool.nobool foobar
> t1300-repo-config.sh: line -176: 18181 Segmentation Fault (core
> dumped) git config --bool bool.nobool foobar
> * FAIL 61: invalid bool (set)
And? Did you actually start that command line with a debugger in
t/trash/?
Hth,
Dscho
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Solaris test failure -- FAIL 61: invalid bool (set)
2008-02-19 23:17 ` Whit Armstrong
2008-02-19 23:31 ` Johannes Schindelin
@ 2008-02-19 23:44 ` Jeff King
2008-02-19 23:49 ` Jeff King
1 sibling, 1 reply; 9+ messages in thread
From: Jeff King @ 2008-02-19 23:44 UTC (permalink / raw)
To: Whit Armstrong; +Cc: Junio C Hamano, Johannes Schindelin, git
On Tue, Feb 19, 2008 at 06:17:42PM -0500, Whit Armstrong wrote:
> git config --bool bool.nobool foobar
> t1300-repo-config.sh: line -176: 18181 Segmentation Fault (core
> dumped) git config --bool bool.nobool foobar
Ah. The problem is that we use git_config_int() to parse the command
line option which, upon failure, attempts to print a message with
config_file_name, which is NULL (since we're not parsing a config file
currently). On most systems, printf simply prints "(null)", but on
Solaris, it segfaults. But we shouldn't be passing NULL anyway on any
system, since it makes the message ugly.
This patch fixes it.
-- >8 --
git_config_*: don't assume we are parsing a config file
These functions get called by other code, including parsing config
options from the command line. In that case, config_file_name is NULL,
leading to an ugly message or even a segfault on some implementations of
printf.
---
diff --git a/config.c b/config.c
index 8064cae..c105c13 100644
--- a/config.c
+++ b/config.c
@@ -280,11 +280,18 @@ int git_parse_ulong(const char *value, unsigned long *ret)
return 0;
}
+static void die_bad_config(const char *name)
+{
+ if (config_file_name)
+ die("bad config value '%s' in %s", name, config_file_name);
+ die("bad config value for '%s'", name);
+}
+
int git_config_int(const char *name, const char *value)
{
long ret;
if (!git_parse_long(value, &ret))
- die("bad config value for '%s' in %s", name, config_file_name);
+ die_bad_config(name);
return ret;
}
@@ -292,7 +299,7 @@ unsigned long git_config_ulong(const char *name, const char *value)
{
unsigned long ret;
if (!git_parse_ulong(value, &ret))
- die("bad config value for '%s' in %s", name, config_file_name);
+ die_bad_config(name);
return ret;
}
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: Solaris test failure -- FAIL 61: invalid bool (set)
2008-02-19 23:44 ` Jeff King
@ 2008-02-19 23:49 ` Jeff King
2008-02-19 23:52 ` Jeff King
0 siblings, 1 reply; 9+ messages in thread
From: Jeff King @ 2008-02-19 23:49 UTC (permalink / raw)
To: Whit Armstrong; +Cc: Junio C Hamano, Johannes Schindelin, git
On Tue, Feb 19, 2008 at 06:44:22PM -0500, Jeff King wrote:
> +static void die_bad_config(const char *name)
> +{
> + if (config_file_name)
> + die("bad config value '%s' in %s", name, config_file_name);
> + die("bad config value for '%s'", name);
Oops. This first one should read:
bad config value _for_ '%s'...
Otherwise, test t1300:58 fails when trying to match the text. It's
just a typo in my previous patch.
-Peff
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Solaris test failure -- FAIL 61: invalid bool (set)
2008-02-19 23:49 ` Jeff King
@ 2008-02-19 23:52 ` Jeff King
2008-02-20 0:11 ` Whit Armstrong
0 siblings, 1 reply; 9+ messages in thread
From: Jeff King @ 2008-02-19 23:52 UTC (permalink / raw)
To: Whit Armstrong; +Cc: Junio C Hamano, Johannes Schindelin, git
On Tue, Feb 19, 2008 at 06:49:45PM -0500, Jeff King wrote:
> Otherwise, test t1300:58 fails when trying to match the text. It's
> just a typo in my previous patch.
Bah, and there are even more errors at the end of the test (though I am
not sure if they are related to the fix, or were there already). I don't
have time to look at this anymore right now, but I will try to run the
full test suite on Solaris later tonight.
-Peff
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Solaris test failure -- FAIL 61: invalid bool (set)
2008-02-19 23:52 ` Jeff King
@ 2008-02-20 0:11 ` Whit Armstrong
2008-02-20 5:04 ` Jeff King
0 siblings, 1 reply; 9+ messages in thread
From: Whit Armstrong @ 2008-02-20 0:11 UTC (permalink / raw)
To: Jeff King; +Cc: Junio C Hamano, Johannes Schindelin, git
Thanks for the quick patch, Jeff.
That certainly fixes t1300-repo-config.sh.
I must be seeing the same failures as you ( in t3404-rebase-interactive.sh ).
Thanks for your help, everyone.
-Whit
On Feb 19, 2008 6:52 PM, Jeff King <peff@peff.net> wrote:
> On Tue, Feb 19, 2008 at 06:49:45PM -0500, Jeff King wrote:
>
> > Otherwise, test t1300:58 fails when trying to match the text. It's
> > just a typo in my previous patch.
>
> Bah, and there are even more errors at the end of the test (though I am
> not sure if they are related to the fix, or were there already). I don't
> have time to look at this anymore right now, but I will try to run the
> full test suite on Solaris later tonight.
>
> -Peff
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Solaris test failure -- FAIL 61: invalid bool (set)
2008-02-20 0:11 ` Whit Armstrong
@ 2008-02-20 5:04 ` Jeff King
0 siblings, 0 replies; 9+ messages in thread
From: Jeff King @ 2008-02-20 5:04 UTC (permalink / raw)
To: Whit Armstrong; +Cc: Junio C Hamano, Johannes Schindelin, git
On Tue, Feb 19, 2008 at 07:11:01PM -0500, Whit Armstrong wrote:
> That certainly fixes t1300-repo-config.sh.
>
> I must be seeing the same failures as you ( in t3404-rebase-interactive.sh ).
I actually was seeing errors later in t1300, but they were fixed by
putting GNU coreutils at the front of my path (btw, we had discussed
previously using "diff -u" to compare actual and expected output in many
tests -- Solaris diff doesn't understand "-u").
I see the errors in t3404. They are caused by the Solaris /bin/sh not
understanding $() syntax. We create a "fake-editor" script to simulate
the editor during interactive rebase, and it is hard-coded to /bin/sh.
So we should probably do something like:
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh
index e5ed745..62e65d7 100755
--- a/t/t3404-rebase-interactive.sh
+++ b/t/t3404-rebase-interactive.sh
@@ -61,8 +61,8 @@ test_expect_success 'setup' '
git tag I
'
-cat > fake-editor.sh <<\EOF
-#!/bin/sh
+echo "#!$SHELL" >fake-editor
+cat >> fake-editor.sh <<\EOF
case "$1" in
*/COMMIT_EDITMSG)
test -z "$FAKE_COMMIT_MESSAGE" || echo "$FAKE_COMMIT_MESSAGE" > "$1"
There are probably more instances of this problem, but I haven't
checked. I had high hopes of running the testsuite to completion
tonight, but I am getting stuck now in t3900.
-Peff
^ permalink raw reply related [flat|nested] 9+ messages in thread
end of thread, other threads:[~2008-02-20 5:04 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-19 21:22 Solaris test failure -- FAIL 61: invalid bool (set) Whit Armstrong
2008-02-19 22:21 ` Johannes Schindelin
2008-02-19 23:17 ` Whit Armstrong
2008-02-19 23:31 ` Johannes Schindelin
2008-02-19 23:44 ` Jeff King
2008-02-19 23:49 ` Jeff King
2008-02-19 23:52 ` Jeff King
2008-02-20 0:11 ` Whit Armstrong
2008-02-20 5:04 ` Jeff King
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).