Mercurial > hg
changeset 47773:a8deb9dc39da stable
tests: make test-serve works on system that allow user to bind low port
It is possible to encounter linux system configured in a way that allow port
< 1024 to be bound by any users. So we update a test to focus more on the actual
test: "resolving `daytime` to an actual port number.
The new auto-scaling CI runner provided by clever cloud is doing so. This is the
initial motivation for this change, but it seems useful anyway.
Differential Revision: https://phab.mercurial-scm.org/D11228
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Thu, 29 Jul 2021 02:20:26 +0200 |
parents | 0bdcb5ef932c |
children | fb8389f227a0 |
files | tests/test-serve.t |
diffstat | 1 files changed, 11 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-serve.t Thu Jul 29 17:04:55 2021 -0400 +++ b/tests/test-serve.t Thu Jul 29 02:20:26 2021 +0200 @@ -44,13 +44,20 @@ listening at http://localhost/ (bound to *$LOCALIP*:HGPORT2) (glob) (?) % errors -With -v and -p daytime (should fail because low port) +With -v and -p daytime -#if no-root no-windows +# On some system this will fails because port < 1024 are not bindable by normal +# users. +# +# On some others the kernel is configured to allow any user to bind them and +# this will work fine + +#if no-windows $ KILLQUIETLY=Y $ hgserve -p daytime - abort: cannot start server at 'localhost:13': Permission denied - abort: child process failed to start + abort: cannot start server at 'localhost:13': Permission denied (?) + abort: child process failed to start (?) + listening at http://localhost/ (bound to $LOCALIP:13) (?) % errors $ KILLQUIETLY=N #endif