From: Petr Špaček Date: Wed, 9 Oct 2019 12:35:53 +0000 (+0200) Subject: http: fix parallel execution of HTTP tests with SO_REUSEPORT X-Git-Tag: v4.3.0~23^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b4f32c2fd9722afc83bc31e9d5a696e56549aeb3;p=thirdparty%2Fknot-resolver.git http: fix parallel execution of HTTP tests with SO_REUSEPORT We have to use disjoint port ranges for individual test, otherwise parallel test execution leads to unpredictable results. --- diff --git a/modules/http/http.test.lua b/modules/http/http.test.lua index 968de3b1d..0422c2d22 100644 --- a/modules/http/http.test.lua +++ b/modules/http/http.test.lua @@ -20,7 +20,7 @@ else local bound for _ = 1,1000 do - bound = net.listen('127.0.0.1', math.random(1025,65535), { kind = 'webtest'} ) + bound = net.listen('127.0.0.1', math.random(20000, 29999), { kind = 'webtest'} ) if bound then break end diff --git a/modules/http/http_doh.test.lua b/modules/http/http_doh.test.lua index 480df3a1b..467713eb6 100644 --- a/modules/http/http_doh.test.lua +++ b/modules/http/http_doh.test.lua @@ -88,7 +88,7 @@ else local bound for _ = 1,1000 do - bound = net.listen('127.0.0.1', math.random(1025,65535), { kind = 'doh'} ) + bound = net.listen('127.0.0.1', math.random(30000, 39999), { kind = 'doh'} ) if bound then break end