From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Fabio D'Alfonso <fabio.dalfonso@fabiodalfonso.com>, git@vger.kernel.org
Subject: Re: t5539 fails on ubuntu for v2.0.0-rc2
Date: Sat, 10 May 2014 10:02:59 -0400 [thread overview]
Message-ID: <20140510140259.GA6836@sigill.intra.peff.net> (raw)
In-Reply-To: <xmqqy4yavewk.fsf@gitster.dls.corp.google.com>
On Fri, May 09, 2014 at 02:08:27PM -0700, Junio C Hamano wrote:
> > 3. Just disable the http tests when run as root.
> >
> > I think I'd favor 3. But I'd like to be sure that being root is the
> > problem.
>
> I agree with both the conclusion and the precondition.
Here's the patch.
The problem starts in v1.9.2, not in v2.0.0, so it's not technically a
regression in this cycle. And we are awfully late in the -rc period. But
it is just a change in the test script, and one that seems rather
unlikely to produce unexpected side effects. I'll leave it you whether
you want to queue it for v2.0.0, or for the next maint release.
-- >8 --
Subject: t/lib-httpd: require SANITY prereq
Our test httpd setup will not generally run as root, because
Apache will want to setuid, and we do not set up the "User"
config directive. On some systems, like current Debian
unstable, Apache fails to start, and we skip the tests:
$ sudo ./t5539-fetch-http-shallow.sh --debug
1..0 # SKIP web server setup failed
$ cat trash*t5539*/httpd/error.log
[...]
(22)Invalid argument: AH00024: Couldn't set permissions on
the rewrite-map mutex; check User and Group directives
AH00016: Configuration Failed
However, on other systems (reportedly Ubuntu 11.04), Apache
seems to start, and then bails during our tests with:
getpwuid: couldn't determine user name from uid 4294967295,
you probably need to modify the User directive
Child 12037 returned a Fatal error... Apache is exiting!
This may be related to the pre-fork/threading model in use
(note that the second one complains of the child dying).
However, it's not even worth investigating; in either case
we just want to skip the tests, and we already recommend
against running the test suite as root. Let's just
explicitly check this condition and skip the tests rather
than expecting Apache to do the right thing.
Signed-off-by: Jeff King <peff@peff.net>
---
t/lib-httpd.sh | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/t/lib-httpd.sh b/t/lib-httpd.sh
index 252cbf1..8b67021 100644
--- a/t/lib-httpd.sh
+++ b/t/lib-httpd.sh
@@ -37,6 +37,11 @@ then
test_done
fi
+if ! test_have_prereq SANITY; then
+ test_skip_or_die $GIT_TEST_HTTPD \
+ "Cannot run httpd tests as root"
+fi
+
HTTPD_PARA=""
for DEFAULT_HTTPD_PATH in '/usr/sbin/httpd' '/usr/sbin/apache2'
--
2.0.0.rc1.436.g03cb729
next prev parent reply other threads:[~2014-05-10 14:03 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-07 19:56 t5539 fails on ubuntu for v2.0.0-rc2 Fabio D'Alfonso
2014-05-07 21:45 ` Junio C Hamano
2014-05-08 4:14 ` Jeff King
2014-05-08 6:02 ` Fabio D'Alfonso
2014-05-08 14:13 ` Fabio D'Alfonso
2014-05-09 15:59 ` Jeff King
2014-05-09 16:43 ` Fabio D'Alfonso
2014-05-09 21:08 ` Junio C Hamano
2014-05-10 14:02 ` Jeff King [this message]
2014-05-14 10:14 ` Jeff King
2014-05-14 17:11 ` Junio C Hamano
2014-05-14 19:33 ` Jeff King
2014-05-08 21:36 ` t5539 fails on ubuntu for v2.0.0-rc2 - the SAME on 12.04 server Fabio D'Alfonso
2014-05-09 8:39 ` t5539 fails on ubuntu for v2.0.0-rc2 - the SAME on 12.04 server - this test was disabled up to 1.9.2 Fabio D'Alfonso
2014-05-09 15:50 ` Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140510140259.GA6836@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=fabio.dalfonso@fabiodalfonso.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).