threads / discuss / 29167

How to run http server tests?

Subject: How to run http server tests?

## tl;dr

3 messages between Dec 14, 2011 and Dec 14, 2011.

replies: 2people: 2as markdown or json

Johannes Sixt· Dec 14, 2011, 21:20 UTC · lore
I have a hard time running tests that use lib-httpd.sh.
I run the tests like this:
  LIB_HTTPD_MODULE_PATH=/usr/lib64/apache2 GIT_TEST_HTTPD=Yes \
      sh -x t5541-http-push.sh -v -i

and I have to apply this patch because I do not have mod_cgi on my system (OpenSuse 11.4):

diff --git a/t/lib-httpd/apache.conf b/t/lib-httpd/apache.conf
index 0a4cdfa..e5cb3f9 100644
--- a/t/lib-httpd/apache.conf
+++ b/t/lib-httpd/apache.conf
@@ -13,4 +13,4 @@ ErrorLog error.log
 </IfModule>
-<IfModule !mod_cgi.c>
-       LoadModule cgi_module modules/mod_cgi.so
+<IfModule !mod_scgi.c>
+       LoadModule scgi_module modules/mod_scgi.so
 </IfModule>


I see t5541-http-push.sh #2 fail with:

++ cd '/home/jsixt/Src/git/git/t/trash directory.t5541-http-push'
++ git clone http://127.0.0.1:5541/smart/test_repo.git/ test_repo_clone
Cloning into 'test_repo_clone'...
fatal: http://127.0.0.1:5541/smart/test_repo.git/info/refs not found:
did you run git update-server-info on the server?

t5551-http-fetch.sh fails at #3 here:

++ GIT_CURL_VERBOSE=1
++ git clone --quiet http://127.0.0.1:5551/smart/repo.git clone
+ eval_ret=128

In this case, 'git clone' output is redirected to file 'err'; it has the
same error as above.

t5561-http-backend.sh fails at #3 like so:

+++ diff -u exp act
--- exp 2011-12-14 21:14:49.000000000 +0000
+++ act 2011-12-14 21:14:49.000000000 +0000
@@ -1 +1 @@
-HTTP/1.1 200 OK
+HTTP/1.1 404 Not Found

Can someone help?

Thanks,
-- Hannes
Jeff King· Dec 14, 2011, 21:39 UTC · re: Johannes Sixt · lore

Re: How to run http server tests?

On Wed, Dec 14, 2011 at 10:20:07PM +0100, Johannes Sixt wrote:
Show 21 quoted lines
> I have a hard time running tests that use lib-httpd.sh.
> 
> I run the tests like this:
> 
>   LIB_HTTPD_MODULE_PATH=/usr/lib64/apache2 GIT_TEST_HTTPD=Yes \
>       sh -x t5541-http-push.sh -v -i
> 
> and I have to apply this patch because I do not have mod_cgi on my
> system (OpenSuse 11.4):
> 
> diff --git a/t/lib-httpd/apache.conf b/t/lib-httpd/apache.conf
> index 0a4cdfa..e5cb3f9 100644
> --- a/t/lib-httpd/apache.conf
> +++ b/t/lib-httpd/apache.conf
> @@ -13,4 +13,4 @@ ErrorLog error.log
>  </IfModule>
> -<IfModule !mod_cgi.c>
> -       LoadModule cgi_module modules/mod_cgi.so
> +<IfModule !mod_scgi.c>
> +       LoadModule scgi_module modules/mod_scgi.so
>  </IfModule>

Hmm. I know nothing about scgi, but a quick google indicates that it is a separate protocol from CGI and is more like FastCGI (i.e., it wants to spawn a long-running CGI server and contact it over a separate protocol).

So I suspect you are not able to run http-backend, and thus you have no smart-http support in your setup.

Show 7 quoted lines
> I see t5541-http-push.sh #2 fail with:
> 
> ++ cd '/home/jsixt/Src/git/git/t/trash directory.t5541-http-push'
> ++ git clone http://127.0.0.1:5541/smart/test_repo.git/ test_repo_clone
> Cloning into 'test_repo_clone'...
> fatal: http://127.0.0.1:5541/smart/test_repo.git/info/refs not found:
> did you run git update-server-info on the server?

That's would I would expect if you have no smart-http support. The git client will fall back to trying dumb http, but that should fail (because we haven't run update-server-info).

The other errors you see probably stem from the same issue.
-Peff
Johannes Sixt· Dec 14, 2011, 22:02 UTC · re: Jeff King · lore

Re: How to run http server tests?

Am 14.12.2011 22:39, schrieb Jeff King:
Show 20 quoted lines
> On Wed, Dec 14, 2011 at 10:20:07PM +0100, Johannes Sixt wrote:
>> diff --git a/t/lib-httpd/apache.conf b/t/lib-httpd/apache.conf
>> index 0a4cdfa..e5cb3f9 100644
>> --- a/t/lib-httpd/apache.conf
>> +++ b/t/lib-httpd/apache.conf
>> @@ -13,4 +13,4 @@ ErrorLog error.log
>>  </IfModule>
>> -<IfModule !mod_cgi.c>
>> -       LoadModule cgi_module modules/mod_cgi.so
>> +<IfModule !mod_scgi.c>
>> +       LoadModule scgi_module modules/mod_scgi.so
>>  </IfModule>
> 
> Hmm. I know nothing about scgi, but a quick google indicates that it is
> a separate protocol from CGI and is more like FastCGI (i.e., it wants to
> spawn a long-running CGI server and contact it over a separate
> protocol).
> 
> So I suspect you are not able to run http-backend, and thus you have no
> smart-http support in your setup.
Thanks, that put me on the right track. I have to use
  LIB_HTTPD_MODULE_PATH=/usr/lib64/apache2-prefork
-- Hannes

← back to recent threads