On Sun, Jul 04, 2021 at 04:29:43AM +0300, Maxim Dounin wrote:
On Sat, Jul 03, 2021 at 09:18:53AM +0100, Hugo Lefeuvre wrote:
I am trying to run the test suite, but it seems that, no matter how I build Nginx, it systematically fails.
It seems that, most (all?) of the time, tests fail because Nginx returns 403 error codes, e.g.:
./ssi_waited.t ............................. 1/3 # Failed test 'waited non-active' # at ./ssi_waited.t line 60. # 'HTTP/1.1 403 Forbidden # Server: nginx/1.21.0 # Date: Sat, 03 Jul 2021 08:06:00 GMT # Content-Type: text/html # Connection: close # # <html> # <head><title>403 Forbidden</title></head> # <body> # <center><h1>403 Forbidden</h1></center> # <hr><center>nginx/1.21.0</center> # </body> # </html> # ' # doesn't match '(?^m:^xFIRSTxWAITEDxSECONDx$)'
The runtime configuration is the default one from nginx-1.20.1.tar.gz (conf/nginx.conf).
I must be doing something wrong with the build or run time configuration, but I cannot pinpoint what. Any idea?
Test output suggests that you are testing nginx 1.21.0, not 1.20.1. It looks like you are testing the wrong nginx binary, not the one you think you are testing. This might be the reason, for example, if you have some 3rd party modules compiled in and these modules reject requests for some reason.
For additional details try looking into test details - in particular, test suite can leave full test configuration and logs for you with TEST_NGINX_LEAVE environment variable set, or simply cat the error log to the terminal before removing files with TEST_NGINX_CATLOG. See README of the test suite for details.
Sorry for the late answer, but better late than never!
The reason was that I was running the test suite as root. Switching to a non-root user did the trick. I was indeed trying to run 1.21.1, not 1.20.1, that was a typo in the title.
I think that the test suite README should mention that it cannot be run as root.
Thanks for your answer!