All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Make httpd tests run
@ 2015-04-08 15:05 Michael J Gruber
  2015-04-08 15:05 ` [PATCH 1/3] t/lib-httpd: load mod_unixd Michael J Gruber
                   ` (3 more replies)
  0 siblings, 4 replies; 19+ messages in thread
From: Michael J Gruber @ 2015-04-08 15:05 UTC (permalink / raw)
  To: git

This series grew from an attempt at enlarging my personal test run coverage
on a standard Fedora 21 64bit box. Aka chain-lint fall-out.

With 1/3, I get all httpd tests to run (when port is set, of course).

2/3 and 3/3 are an attempt at getting git-svn over http tests to run.
2/3 is certainly correct but not sufficient.
3/3 gets httpd to run but svn does not connect. This is WIP and RFH,
and maybe requires rewriting lib-git-svn to use a config which depends
on the apache version (like lib-hhtpd does), or to leverage lib-httpd.

Michael J Gruber (3):
  t/lib-httpd: load mod_unixd
  t/lib-git-svn: check same httpd module dirs as lib-httpd
  t/lib-git-svn: adjust config to apache 2.4

 t/lib-git-svn.sh        | 7 +++++--
 t/lib-httpd/apache.conf | 3 +++
 2 files changed, 8 insertions(+), 2 deletions(-)

-- 
2.4.0.rc1.221.gf7021fb

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH 1/3] t/lib-httpd: load mod_unixd
  2015-04-08 15:05 [PATCH 0/3] Make httpd tests run Michael J Gruber
@ 2015-04-08 15:05 ` Michael J Gruber
       [not found]   ` <5525A208.6060807@web.de>
  2015-04-08 15:05 ` [PATCH 2/3] t/lib-git-svn: check same httpd module dirs as lib-httpd Michael J Gruber
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 19+ messages in thread
From: Michael J Gruber @ 2015-04-08 15:05 UTC (permalink / raw)
  To: git

With the current config, apache 2.4.10 will not be started and the httpd
tests will not run.

Enable mod_unixd to make the httpd tests run.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
---

Notes:
    Basically, this is required since the switch from 2.2 to 2.4.
    I'm wondering whether noone is running these tests, or other
    distros (than Fedora) use different default configs.

 t/lib-httpd/apache.conf | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/t/lib-httpd/apache.conf b/t/lib-httpd/apache.conf
index 0b81a00..7b8e21c 100644
--- a/t/lib-httpd/apache.conf
+++ b/t/lib-httpd/apache.conf
@@ -64,6 +64,9 @@ LockFile accept.lock
 <IfModule !mod_mpm_prefork.c>
 	LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
 </IfModule>
+<IfModule !mod_unixd.c>
+	LoadModule unixd_module modules/mod_unixd.so
+</IfModule>
 </IfVersion>
 
 PassEnv GIT_VALGRIND
-- 
2.4.0.rc1.221.gf7021fb

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 2/3] t/lib-git-svn: check same httpd module dirs as lib-httpd
  2015-04-08 15:05 [PATCH 0/3] Make httpd tests run Michael J Gruber
  2015-04-08 15:05 ` [PATCH 1/3] t/lib-httpd: load mod_unixd Michael J Gruber
@ 2015-04-08 15:05 ` Michael J Gruber
  2015-04-08 15:05 ` [WIP/RFH/PATCH 3/3] t/lib-git-svn: adjust config to apache 2.4 Michael J Gruber
  2015-04-09 13:04 ` [PATCH 0/3] Make httpd tests run Kyle J. McKay
  3 siblings, 0 replies; 19+ messages in thread
From: Michael J Gruber @ 2015-04-08 15:05 UTC (permalink / raw)
  To: git

Currently, lib-git-svn checks a proper subset of the paths that
lib-httpd checks for apache modules.

Make it check the same set so that apache is run by one when it is run
by the other (provide ports have been set).

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
---

Notes:
    Again, I'm wondering how many are running these tests.
    They would not run on a 64bit system with redhat type fs layout.

 t/lib-git-svn.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/t/lib-git-svn.sh b/t/lib-git-svn.sh
index b0ec12f..2a0ef07 100644
--- a/t/lib-git-svn.sh
+++ b/t/lib-git-svn.sh
@@ -87,8 +87,10 @@ prepare_httpd () {
 	fi
 	for d in \
 		"$SVN_HTTPD_MODULE_PATH" \
-		/usr/lib/apache2/modules \
 		/usr/libexec/apache2 \
+		/usr/lib/apache2/modules \
+		/usr/lib64/httpd/modules \
+		/usr/lib/httpd/modules \
 	; do
 		if test -d "$d"
 		then
-- 
2.4.0.rc1.221.gf7021fb

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [WIP/RFH/PATCH 3/3] t/lib-git-svn: adjust config to apache 2.4
  2015-04-08 15:05 [PATCH 0/3] Make httpd tests run Michael J Gruber
  2015-04-08 15:05 ` [PATCH 1/3] t/lib-httpd: load mod_unixd Michael J Gruber
  2015-04-08 15:05 ` [PATCH 2/3] t/lib-git-svn: check same httpd module dirs as lib-httpd Michael J Gruber
@ 2015-04-08 15:05 ` Michael J Gruber
  2015-04-08 20:26   ` Eric Wong
  2015-04-10  3:23   ` Jeff King
  2015-04-09 13:04 ` [PATCH 0/3] Make httpd tests run Kyle J. McKay
  3 siblings, 2 replies; 19+ messages in thread
From: Michael J Gruber @ 2015-04-08 15:05 UTC (permalink / raw)
  To: git

The current config is tailored to apache 2.2. Apache 2.4 fails to start
with it.

Adjust the config to apache 2.4.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
---

Notes:
    This is WIP and RFH. Apache does not start without mpm, and the lock
    mechanism has changed. It will run with these changes, but svn fails to
    connect.
    
    Again, I'm wondering who is running these tests at all, but also:
    Why do we leverage lib-httpd so little from lib-git-svn?

 t/lib-git-svn.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/t/lib-git-svn.sh b/t/lib-git-svn.sh
index 2a0ef07..b0ca893 100644
--- a/t/lib-git-svn.sh
+++ b/t/lib-git-svn.sh
@@ -117,10 +117,11 @@ ServerName "git svn test"
 ServerRoot "$GIT_DIR"
 DocumentRoot "$GIT_DIR"
 PidFile "$GIT_DIR/httpd.pid"
-LockFile logs/accept.lock
+Mutex default
 Listen 127.0.0.1:$SVN_HTTPD_PORT
 LoadModule dav_module $SVN_HTTPD_MODULE_PATH/mod_dav.so
 LoadModule dav_svn_module $SVN_HTTPD_MODULE_PATH/mod_dav_svn.so
+LoadModule mpm_prefork_module $SVN_HTTPD_MODULE_PATH/mod_mpm_prefork.so
 <Location /$repo_base_path>
 	DAV svn
 	SVNPath "$rawsvnrepo"
-- 
2.4.0.rc1.221.gf7021fb

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* Re: [WIP/RFH/PATCH 3/3] t/lib-git-svn: adjust config to apache 2.4
  2015-04-08 15:05 ` [WIP/RFH/PATCH 3/3] t/lib-git-svn: adjust config to apache 2.4 Michael J Gruber
@ 2015-04-08 20:26   ` Eric Wong
  2015-04-09  9:33     ` Michael J Gruber
  2015-04-10  3:23   ` Jeff King
  1 sibling, 1 reply; 19+ messages in thread
From: Eric Wong @ 2015-04-08 20:26 UTC (permalink / raw)
  To: Michael J Gruber; +Cc: git

Michael J Gruber <git@drmicha.warpmail.net> wrote:
> The current config is tailored to apache 2.2. Apache 2.4 fails to start
> with it.
> 
> Adjust the config to apache 2.4.
> 
> Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
> ---

1/3 and 2/3 tested fine on Debian stable (wheezy).
You can add my Tested-by to 1/3 and my S-o-b to 2/3.

...but not this one.

> Notes:
>     This is WIP and RFH. Apache does not start without mpm, and the lock
>     mechanism has changed. It will run with these changes, but svn fails to
>     connect.
>     
>     Again, I'm wondering who is running these tests at all, but also:
>     Why do we leverage lib-httpd so little from lib-git-svn?

I'm only testing on Apache 2.2 (from Debian stable (wheezy)).

I doubt anybody here, myself included, likes dealing with SVN,
and would rather ignore the tests than try to fix them.

lib-git-svn predates lib-httpd, and it isn't very interesting work
to port and cleanup.

> +LoadModule mpm_prefork_module $SVN_HTTPD_MODULE_PATH/mod_mpm_prefork.so

I think you need an IfModule guard around this?

I have no mod_mpm_prefork.so file with the apache2-mpm-prefork
(2.2.22-13+deb7u4) package on Debian wheezy.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH 1/3] t/lib-httpd: load mod_unixd
       [not found]   ` <5525A208.6060807@web.de>
@ 2015-04-09  9:27     ` Michael J Gruber
  2015-04-10  3:09       ` Jeff King
  0 siblings, 1 reply; 19+ messages in thread
From: Michael J Gruber @ 2015-04-09  9:27 UTC (permalink / raw)
  To: Torsten Bögershausen, Git Mailing List

Torsten Bögershausen venit, vidit, dixit 08.04.2015 23:47:
> On 2015-04-08 17.05, Michael J Gruber wrote:
>> With the current config, apache 2.4.10 will not be started and the httpd
>> tests will not run.
>>
>> Enable mod_unixd to make the httpd tests run.
>>
>> Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
>> ---
>>
>> Notes:
>>     Basically, this is required since the switch from 2.2 to 2.4.
>>     I'm wondering whether noone is running these tests, or other
>>     distros (than Fedora) use different default configs.
> Do you have any special test numbers in mind  ?
> The following are running under Debian:
> 
> *** t5541-http-push-smart.sh ***
> *** t5542-push-http-shallow.sh ***
> *** t5550-http-fetch-dumb.sh ***
> *** t5551-http-fetch-smart.sh ***
> *** t5560-http-backend-noserver.sh ***
> 
> (Then I stopped digging)
> 
> And this under Mac OS, 
> *** t5541-http-push-smart.sh ***
> You do not seem to have gpg installed
> ok 1 - setup remote repository
> ....

Is this with apache 2.4?

In my case (apache 2.4, fedora 21), t/lib-http.sh failed to start the
web server, so the tests above would (succeed trivially but) not run.

Maybe debian is using an apache default config that has mod_unixd built
in, to ease the transition from apache 2.2? Many were bitten by these
new requirements after the switch to 2.4, and some distros may have
worked around that.

Do your tests run with this patch applied?

Michael

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [WIP/RFH/PATCH 3/3] t/lib-git-svn: adjust config to apache 2.4
  2015-04-08 20:26   ` Eric Wong
@ 2015-04-09  9:33     ` Michael J Gruber
  2015-04-09 19:11       ` Eric Wong
  0 siblings, 1 reply; 19+ messages in thread
From: Michael J Gruber @ 2015-04-09  9:33 UTC (permalink / raw)
  To: Eric Wong; +Cc: git

Eric Wong venit, vidit, dixit 08.04.2015 22:26:
> Michael J Gruber <git@drmicha.warpmail.net> wrote:
>> The current config is tailored to apache 2.2. Apache 2.4 fails to start
>> with it.
>>
>> Adjust the config to apache 2.4.
>>
>> Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
>> ---
> 
> 1/3 and 2/3 tested fine on Debian stable (wheezy).
> You can add my Tested-by to 1/3 and my S-o-b to 2/3.

Thanks, that's good to know.

> ...but not this one.
> 
>> Notes:
>>     This is WIP and RFH. Apache does not start without mpm, and the lock
>>     mechanism has changed. It will run with these changes, but svn fails to
>>     connect.
>>     
>>     Again, I'm wondering who is running these tests at all, but also:
>>     Why do we leverage lib-httpd so little from lib-git-svn?
> 
> I'm only testing on Apache 2.2 (from Debian stable (wheezy)).

So debian stable has apache 2.2? That explains why many don't see these
problems.

> I doubt anybody here, myself included, likes dealing with SVN,
> and would rather ignore the tests than try to fix them.
> 
> lib-git-svn predates lib-httpd, and it isn't very interesting work
> to port and cleanup.

I agree with everything above. But if (and that's a big if) the tests
don't run for anyone I'd rather remove them if there's no way to port them.

>> +LoadModule mpm_prefork_module $SVN_HTTPD_MODULE_PATH/mod_mpm_prefork.so
> 
> I think you need an IfModule guard around this?
> 
> I have no mod_mpm_prefork.so file with the apache2-mpm-prefork
> (2.2.22-13+deb7u4) package on Debian wheezy.

Sure, the changes in 3/3 are for apache 2.4 only and should be guarded
by a version check the same way as the ones in lib-httpd.

I'm just trying to figure out how to run them at all first.

So, before 3/3, t9118 and such do run the web server and test git-svn
against that for you?

Michael

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH 0/3] Make httpd tests run
  2015-04-08 15:05 [PATCH 0/3] Make httpd tests run Michael J Gruber
                   ` (2 preceding siblings ...)
  2015-04-08 15:05 ` [WIP/RFH/PATCH 3/3] t/lib-git-svn: adjust config to apache 2.4 Michael J Gruber
@ 2015-04-09 13:04 ` Kyle J. McKay
  2015-04-09 13:14   ` Kyle J. McKay
  3 siblings, 1 reply; 19+ messages in thread
From: Kyle J. McKay @ 2015-04-09 13:04 UTC (permalink / raw)
  To: Michael J Gruber; +Cc: git

On Apr 8, 2015, at 08:05, Michael J Gruber wrote:

> This series grew from an attempt at enlarging my personal test run  
> coverage
> on a standard Fedora 21 64bit box. Aka chain-lint fall-out.
>
> With 1/3, I get all httpd tests to run (when port is set, of course).
>
> 2/3 and 3/3 are an attempt at getting git-svn over http tests to run.
> 2/3 is certainly correct but not sufficient.
> 3/3 gets httpd to run but svn does not connect. This is WIP and RFH,
> and maybe requires rewriting lib-git-svn to use a config which depends
> on the apache version (like lib-hhtpd does), or to leverage lib-httpd.
>
> Michael J Gruber (3):
>  t/lib-httpd: load mod_unixd
>  t/lib-git-svn: check same httpd module dirs as lib-httpd
>  t/lib-git-svn: adjust config to apache 2.4

The changes in this series appear to break compatibility with Apache  
2.2.

Does that mean that Apache 2.2 is no longer supported for running  
these tests?

Or am I missing something here...

-Kyle

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH 0/3] Make httpd tests run
  2015-04-09 13:04 ` [PATCH 0/3] Make httpd tests run Kyle J. McKay
@ 2015-04-09 13:14   ` Kyle J. McKay
  2015-05-11 11:54     ` [PATCHv2 0/4] Make httpd tests run v2 Michael J Gruber
  0 siblings, 1 reply; 19+ messages in thread
From: Kyle J. McKay @ 2015-04-09 13:14 UTC (permalink / raw)
  To: Michael J Gruber; +Cc: Git List

On Apr 9, 2015, at 06:04, Kyle J. McKay wrote:

> On Apr 8, 2015, at 08:05, Michael J Gruber wrote:
>
>> This series grew from an attempt at enlarging my personal test run  
>> coverage
>> on a standard Fedora 21 64bit box. Aka chain-lint fall-out.
>>
>> With 1/3, I get all httpd tests to run (when port is set, of course).
>>
>> 2/3 and 3/3 are an attempt at getting git-svn over http tests to run.
>> 2/3 is certainly correct but not sufficient.
>> 3/3 gets httpd to run but svn does not connect. This is WIP and RFH,
>> and maybe requires rewriting lib-git-svn to use a config which  
>> depends
>> on the apache version (like lib-hhtpd does), or to leverage lib- 
>> httpd.
>>
>> Michael J Gruber (3):
>> t/lib-httpd: load mod_unixd
>> t/lib-git-svn: check same httpd module dirs as lib-httpd
>> t/lib-git-svn: adjust config to apache 2.4
>
> The changes in this series appear to break compatibility with Apache  
> 2.2.
>
> Does that mean that Apache 2.2 is no longer supported for running  
> these tests?
>
> Or am I missing something here...

Never mind.  I see the <IfVersion...> they're wrapped in now.  Would  
have been nice if they were indented so there was a hint about that in  
the diff, or the diff included enough context to see that.  But that  
file formatting has nothing to do with your change.

Sorry for the noise.

-Kyle

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [WIP/RFH/PATCH 3/3] t/lib-git-svn: adjust config to apache 2.4
  2015-04-09  9:33     ` Michael J Gruber
@ 2015-04-09 19:11       ` Eric Wong
  0 siblings, 0 replies; 19+ messages in thread
From: Eric Wong @ 2015-04-09 19:11 UTC (permalink / raw)
  To: Michael J Gruber; +Cc: git

Michael J Gruber <git@drmicha.warpmail.net> wrote:
> So debian stable has apache 2.2? That explains why many don't see these
> problems.

Right.

> So, before 3/3, t9118 and such do run the web server and test git-svn
> against that for you?

Yes.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH 1/3] t/lib-httpd: load mod_unixd
  2015-04-09  9:27     ` Michael J Gruber
@ 2015-04-10  3:09       ` Jeff King
  0 siblings, 0 replies; 19+ messages in thread
From: Jeff King @ 2015-04-10  3:09 UTC (permalink / raw)
  To: Michael J Gruber; +Cc: Torsten Bögershausen, Git Mailing List

On Thu, Apr 09, 2015 at 11:27:49AM +0200, Michael J Gruber wrote:

> In my case (apache 2.4, fedora 21), t/lib-http.sh failed to start the
> web server, so the tests above would (succeed trivially but) not run.
> 
> Maybe debian is using an apache default config that has mod_unixd built
> in, to ease the transition from apache 2.2? Many were bitten by these
> new requirements after the switch to 2.4, and some distros may have
> worked around that.

Yes, this is exactly it. On my Debian system:

  $ apache2 -l
  Compiled in modules:
    core.c
    mod_so.c
    mod_watchdog.c
    http_core.c
    mod_log_config.c
    mod_logio.c
    mod_version.c
    mod_unixd.c

> Do your tests run with this patch applied?

Yes. I think your patch is fine, as the IfModule means we handle both
the built-in and dynamic cases.

-Peff

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [WIP/RFH/PATCH 3/3] t/lib-git-svn: adjust config to apache 2.4
  2015-04-08 15:05 ` [WIP/RFH/PATCH 3/3] t/lib-git-svn: adjust config to apache 2.4 Michael J Gruber
  2015-04-08 20:26   ` Eric Wong
@ 2015-04-10  3:23   ` Jeff King
  2015-04-10  3:39     ` Jeff King
  1 sibling, 1 reply; 19+ messages in thread
From: Jeff King @ 2015-04-10  3:23 UTC (permalink / raw)
  To: Michael J Gruber; +Cc: git

On Wed, Apr 08, 2015 at 05:05:26PM +0200, Michael J Gruber wrote:

> The current config is tailored to apache 2.2. Apache 2.4 fails to start
> with it.
> 
> Adjust the config to apache 2.4.

I think this needs more conditional config. See the similar fixes I did
in:

  296f0b3 (t/lib-httpd/apache.conf: configure an MPM module for apache
  2.4, 2013-06-09)

and:

  0442743 (t/lib-httpd/apache.conf: do not use LockFile in apache >=
  2.4, 2013-06-09)

And also beware of the ordering problem fixed by:

  5bdc47e (lib-httpd/apache.conf: check version only after mod_version
  loads, 2013-06-21)

Curiously, though, the git-svn tests seem to run fine for me on Apache
2.4 without your patch. I wonder if the fixes I mentioned above (which I
definitely needed to get the regular http tests running on Debian back
then) are not necessary on my system anymore (e.g., because the apache2
package now ships with better-compatible config).

>     Again, I'm wondering who is running these tests at all, but also:

I run the http tests regularly (and have for a long time). I don't
usually run the svn tests, though.

>     Why do we leverage lib-httpd so little from lib-git-svn?

I don't mind us doing the minimal work here to bring the svn tests to a
working state for your platform. As Eric mentions, refactoring test
infrastructure is boring and thankless work. :)

But an alternate solution for patches 2 and 3 might be to share more of
the startup code and config between the two. I don't know how painful
that would be. From a cursory look, I think t/lib-httpd/apache.conf
would have to get split into two parts: one to get apache running at
all, and one to setup the <Location> and other bits related directly to
the http tests.

-Peff

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [WIP/RFH/PATCH 3/3] t/lib-git-svn: adjust config to apache 2.4
  2015-04-10  3:23   ` Jeff King
@ 2015-04-10  3:39     ` Jeff King
  2015-04-13 10:14       ` Michael J Gruber
  0 siblings, 1 reply; 19+ messages in thread
From: Jeff King @ 2015-04-10  3:39 UTC (permalink / raw)
  To: Michael J Gruber; +Cc: git

On Fri, Apr 10, 2015 at 05:23:17AM +0200, Jeff King wrote:

> Curiously, though, the git-svn tests seem to run fine for me on Apache
> 2.4 without your patch. I wonder if the fixes I mentioned above (which I
> definitely needed to get the regular http tests running on Debian back
> then) are not necessary on my system anymore (e.g., because the apache2
> package now ships with better-compatible config).

Ah, I see. I am not in fact running apache.

If you do not set SVN_HTTPD_PORT (which I don't), then lib-git-svn.sh's
start_httpd silently returns success without bothering to setup the
apache server at all. And yet the rest of the tests run to completion
just fine.

It looks like setting this variable is a way to say "run the same set of
tests, but do it over svn-over-httpd instead of svn's direct filesystem
access". Setting SVN_HTTPD_PORT does cause the tests to fail for me.

I don't know how important it is to run these tests over httpd. If so,
it would be nice to do something like lib-httpd does: try the apache
setup by default, and if it fails, gracefully skip the tests (or
fallback to the non-httpd version).

I'm also not sure if there's value in running both the httpd and
local-filesystem forms of the test. IOW, should we be factoring out the
tests and having two separate scripts that set $svnrepo as appropriate,
and then runs the tests?

-Peff

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [WIP/RFH/PATCH 3/3] t/lib-git-svn: adjust config to apache 2.4
  2015-04-10  3:39     ` Jeff King
@ 2015-04-13 10:14       ` Michael J Gruber
  0 siblings, 0 replies; 19+ messages in thread
From: Michael J Gruber @ 2015-04-13 10:14 UTC (permalink / raw)
  To: Jeff King; +Cc: git

Jeff King venit, vidit, dixit 10.04.2015 05:39:
> On Fri, Apr 10, 2015 at 05:23:17AM +0200, Jeff King wrote:
> 
>> Curiously, though, the git-svn tests seem to run fine for me on Apache
>> 2.4 without your patch. I wonder if the fixes I mentioned above (which I
>> definitely needed to get the regular http tests running on Debian back
>> then) are not necessary on my system anymore (e.g., because the apache2
>> package now ships with better-compatible config).
> 
> Ah, I see. I am not in fact running apache.
> 
> If you do not set SVN_HTTPD_PORT (which I don't), then lib-git-svn.sh's
> start_httpd silently returns success without bothering to setup the
> apache server at all. And yet the rest of the tests run to completion
> just fine.

Yep.

> It looks like setting this variable is a way to say "run the same set of
> tests, but do it over svn-over-httpd instead of svn's direct filesystem
> access". Setting SVN_HTTPD_PORT does cause the tests to fail for me.

Oh, I didn't even notice that. That's a bit weird.

> I don't know how important it is to run these tests over httpd. If so,
> it would be nice to do something like lib-httpd does: try the apache
> setup by default, and if it fails, gracefully skip the tests (or
> fallback to the non-httpd version).
> 
> I'm also not sure if there's value in running both the httpd and
> local-filesystem forms of the test. IOW, should we be factoring out the
> tests and having two separate scripts that set $svnrepo as appropriate,
> and then runs the tests?
> 
> -Peff

Hmm, if those tests are run (with file://) I'm inclined to leave things
as they are (scratch 3/3)... Though the fact that on my system,
lib-git-svn starts the server but fails to connect isn't overly
comforting. But git-svn is being used less and less. World domination is
almost complete.

Michael

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCHv2 0/4] Make httpd tests run v2
  2015-04-09 13:14   ` Kyle J. McKay
@ 2015-05-11 11:54     ` Michael J Gruber
  2015-05-11 11:54       ` [PATCHv2 1/4] t/lib-httpd: load mod_unixd Michael J Gruber
                         ` (3 more replies)
  0 siblings, 4 replies; 19+ messages in thread
From: Michael J Gruber @ 2015-05-11 11:54 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano

v2 updates the commit messages as per the dicsussion after v1 and adds a
clean-up.

1/4, 2/4 are ready to go as discussed (commit messages updated).
3/4 is a new independent cleanup noted while being there.
4/4 is the old 3/3 and still WIP. Please hold back.

Michael J Gruber (4):
  t/lib-httpd: load mod_unixd
  t/lib-git-svn: check same httpd module dirs as lib-httpd
  t/t91*: donot say how to avoid the tests
  t/lib-git-svn: adjust config to apache 2.4 WIP

 t/lib-git-svn.sh                       | 17 +++++++++++++++--
 t/lib-httpd/apache.conf                |  3 +++
 t/t9100-git-svn-basic.sh               |  2 --
 t/t9158-git-svn-mergeinfo.sh           |  2 --
 t/t9160-git-svn-preserve-empty-dirs.sh |  1 -
 5 files changed, 18 insertions(+), 7 deletions(-)

-- 
2.4.0.rc3.332.g886447c

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCHv2 1/4] t/lib-httpd: load mod_unixd
  2015-05-11 11:54     ` [PATCHv2 0/4] Make httpd tests run v2 Michael J Gruber
@ 2015-05-11 11:54       ` Michael J Gruber
  2015-05-11 11:54       ` [PATCHv2 2/4] t/lib-git-svn: check same httpd module dirs as lib-httpd Michael J Gruber
                         ` (2 subsequent siblings)
  3 siblings, 0 replies; 19+ messages in thread
From: Michael J Gruber @ 2015-05-11 11:54 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano

In contrast to apache 2.2, apache 2.4 does not load mod_unixd in its
default configuration (because there are choices). Thus, with the
current config, apache 2.4.10 will not be started and the httpd tests
will not run on distros with default apache config (RedHat type).

Enable mod_unixd to make the httpd tests run. This does not affect
distros negatively which have that config already in their default
(Debian type). httpd tests will run on these before and after this patch.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
---
 t/lib-httpd/apache.conf | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/t/lib-httpd/apache.conf b/t/lib-httpd/apache.conf
index 0b81a00..7b8e21c 100644
--- a/t/lib-httpd/apache.conf
+++ b/t/lib-httpd/apache.conf
@@ -64,6 +64,9 @@ LockFile accept.lock
 <IfModule !mod_mpm_prefork.c>
 	LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
 </IfModule>
+<IfModule !mod_unixd.c>
+	LoadModule unixd_module modules/mod_unixd.so
+</IfModule>
 </IfVersion>
 
 PassEnv GIT_VALGRIND
-- 
2.4.0.rc3.332.g886447c

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCHv2 2/4] t/lib-git-svn: check same httpd module dirs as lib-httpd
  2015-05-11 11:54     ` [PATCHv2 0/4] Make httpd tests run v2 Michael J Gruber
  2015-05-11 11:54       ` [PATCHv2 1/4] t/lib-httpd: load mod_unixd Michael J Gruber
@ 2015-05-11 11:54       ` Michael J Gruber
  2015-05-11 11:54       ` [PATCH 3/4] t/t91*: do not say how to avoid the tests Michael J Gruber
  2015-05-11 11:54       ` [PATCHv2 4/4 (was 3/3, still WIP)] t/lib-git-svn: adjust config to apache 2.4 WIP Michael J Gruber
  3 siblings, 0 replies; 19+ messages in thread
From: Michael J Gruber @ 2015-05-11 11:54 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano

Currently, lib-git-svn checks a proper subset of the paths that
lib-httpd checks for apache modules.

Make it check the same set so that apache is run by one when it is run
by the other (provided ports have been set and there are no other
configuration issues).

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
---
 t/lib-git-svn.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/t/lib-git-svn.sh b/t/lib-git-svn.sh
index b0ec12f..2a0ef07 100644
--- a/t/lib-git-svn.sh
+++ b/t/lib-git-svn.sh
@@ -87,8 +87,10 @@ prepare_httpd () {
 	fi
 	for d in \
 		"$SVN_HTTPD_MODULE_PATH" \
-		/usr/lib/apache2/modules \
 		/usr/libexec/apache2 \
+		/usr/lib/apache2/modules \
+		/usr/lib64/httpd/modules \
+		/usr/lib/httpd/modules \
 	; do
 		if test -d "$d"
 		then
-- 
2.4.0.rc3.332.g886447c

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 3/4] t/t91*: do not say how to avoid the tests
  2015-05-11 11:54     ` [PATCHv2 0/4] Make httpd tests run v2 Michael J Gruber
  2015-05-11 11:54       ` [PATCHv2 1/4] t/lib-httpd: load mod_unixd Michael J Gruber
  2015-05-11 11:54       ` [PATCHv2 2/4] t/lib-git-svn: check same httpd module dirs as lib-httpd Michael J Gruber
@ 2015-05-11 11:54       ` Michael J Gruber
  2015-05-11 11:54       ` [PATCHv2 4/4 (was 3/3, still WIP)] t/lib-git-svn: adjust config to apache 2.4 WIP Michael J Gruber
  3 siblings, 0 replies; 19+ messages in thread
From: Michael J Gruber @ 2015-05-11 11:54 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano

Some of the tests "say" how to stop the svn tests from running, some do
not.

The test suite is directed at people reading t/README where we keep all
information about running the test suite (partly, with options etc.).

Remove said "say" occurences.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
---

Notes:
    Note on the side while messing with svn tests.

 t/t9100-git-svn-basic.sh               | 2 --
 t/t9158-git-svn-mergeinfo.sh           | 2 --
 t/t9160-git-svn-preserve-empty-dirs.sh | 1 -
 3 files changed, 5 deletions(-)

diff --git a/t/t9100-git-svn-basic.sh b/t/t9100-git-svn-basic.sh
index 4fea8d9..3e34b42 100755
--- a/t/t9100-git-svn-basic.sh
+++ b/t/t9100-git-svn-basic.sh
@@ -8,8 +8,6 @@ GIT_SVN_LC_ALL=${LC_ALL:-$LANG}
 
 . ./lib-git-svn.sh
 
-say 'define NO_SVN_TESTS to skip git svn tests'
-
 case "$GIT_SVN_LC_ALL" in
 *.UTF-8)
 	test_set_prereq UTF8
diff --git a/t/t9158-git-svn-mergeinfo.sh b/t/t9158-git-svn-mergeinfo.sh
index 13f78f2..a875b45 100755
--- a/t/t9158-git-svn-mergeinfo.sh
+++ b/t/t9158-git-svn-mergeinfo.sh
@@ -7,8 +7,6 @@ test_description='git svn mergeinfo propagation'
 
 . ./lib-git-svn.sh
 
-say 'define NO_SVN_TESTS to skip git svn tests'
-
 test_expect_success 'initialize source svn repo' '
 	svn_cmd mkdir -m x "$svnrepo"/trunk &&
 	svn_cmd co "$svnrepo"/trunk "$SVN_TREE" &&
diff --git a/t/t9160-git-svn-preserve-empty-dirs.sh b/t/t9160-git-svn-preserve-empty-dirs.sh
index b4a4434..0ede3cf 100755
--- a/t/t9160-git-svn-preserve-empty-dirs.sh
+++ b/t/t9160-git-svn-preserve-empty-dirs.sh
@@ -11,7 +11,6 @@ local Git repository with placeholder files.'
 
 . ./lib-git-svn.sh
 
-say 'define NO_SVN_TESTS to skip git svn tests'
 GIT_REPO=git-svn-repo
 
 test_expect_success 'initialize source svn repo containing empty dirs' '
-- 
2.4.0.rc3.332.g886447c

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCHv2 4/4 (was 3/3, still WIP)] t/lib-git-svn: adjust config to apache 2.4 WIP
  2015-05-11 11:54     ` [PATCHv2 0/4] Make httpd tests run v2 Michael J Gruber
                         ` (2 preceding siblings ...)
  2015-05-11 11:54       ` [PATCH 3/4] t/t91*: do not say how to avoid the tests Michael J Gruber
@ 2015-05-11 11:54       ` Michael J Gruber
  3 siblings, 0 replies; 19+ messages in thread
From: Michael J Gruber @ 2015-05-11 11:54 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano

The current config is tailored to apache 2.2. Apache 2.4 fails to start
with it.

Adjust the config to apache 2.4. [still incomplete]

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
---

Notes:
    This is WIP and RFH. Apache does not start without mpm, and the lock
    mechanism has changed. It will run with these changes, but svn fails to
    connect.
    
    Again, I'm wondering who is running these tests at all, but also:
    Why do we leverage lib-httpd so little from lib-git-svn?

 t/lib-git-svn.sh | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/t/lib-git-svn.sh b/t/lib-git-svn.sh
index 2a0ef07..24ad8b4 100644
--- a/t/lib-git-svn.sh
+++ b/t/lib-git-svn.sh
@@ -117,10 +117,21 @@ ServerName "git svn test"
 ServerRoot "$GIT_DIR"
 DocumentRoot "$GIT_DIR"
 PidFile "$GIT_DIR/httpd.pid"
-LockFile logs/accept.lock
 Listen 127.0.0.1:$SVN_HTTPD_PORT
 LoadModule dav_module $SVN_HTTPD_MODULE_PATH/mod_dav.so
 LoadModule dav_svn_module $SVN_HTTPD_MODULE_PATH/mod_dav_svn.so
+<IfModule !mod_version.c>
+        LoadModule version_module $SVN_HTTPD_MODULE_PATH/mod_version.so
+</IfModule>
+<IfVersion < 2.4>
+LockFile logs/accept.lock
+</IfVersion>
+<IfVersion >= 2.4>
+Mutex default
+<IfModule !mod_prefork_module.c>
+	LoadModule mpm_prefork_module $SVN_HTTPD_MODULE_PATH/mod_mpm_prefork.so
+</IfModule>
+</IfVersion>
 <Location /$repo_base_path>
 	DAV svn
 	SVNPath "$rawsvnrepo"
-- 
2.4.0.rc3.332.g886447c

^ permalink raw reply related	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2015-05-11 11:54 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-08 15:05 [PATCH 0/3] Make httpd tests run Michael J Gruber
2015-04-08 15:05 ` [PATCH 1/3] t/lib-httpd: load mod_unixd Michael J Gruber
     [not found]   ` <5525A208.6060807@web.de>
2015-04-09  9:27     ` Michael J Gruber
2015-04-10  3:09       ` Jeff King
2015-04-08 15:05 ` [PATCH 2/3] t/lib-git-svn: check same httpd module dirs as lib-httpd Michael J Gruber
2015-04-08 15:05 ` [WIP/RFH/PATCH 3/3] t/lib-git-svn: adjust config to apache 2.4 Michael J Gruber
2015-04-08 20:26   ` Eric Wong
2015-04-09  9:33     ` Michael J Gruber
2015-04-09 19:11       ` Eric Wong
2015-04-10  3:23   ` Jeff King
2015-04-10  3:39     ` Jeff King
2015-04-13 10:14       ` Michael J Gruber
2015-04-09 13:04 ` [PATCH 0/3] Make httpd tests run Kyle J. McKay
2015-04-09 13:14   ` Kyle J. McKay
2015-05-11 11:54     ` [PATCHv2 0/4] Make httpd tests run v2 Michael J Gruber
2015-05-11 11:54       ` [PATCHv2 1/4] t/lib-httpd: load mod_unixd Michael J Gruber
2015-05-11 11:54       ` [PATCHv2 2/4] t/lib-git-svn: check same httpd module dirs as lib-httpd Michael J Gruber
2015-05-11 11:54       ` [PATCH 3/4] t/t91*: do not say how to avoid the tests Michael J Gruber
2015-05-11 11:54       ` [PATCHv2 4/4 (was 3/3, still WIP)] t/lib-git-svn: adjust config to apache 2.4 WIP Michael J Gruber

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.