From: Jouni Malinen Date: Wed, 8 Feb 2017 11:53:11 +0000 (+0200) Subject: tests: Make ap_wps_er_http_proto less likely to fail X-Git-Tag: hostap_2_7~1643 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6f9b4de228d8b24ba6fb4f2d72bd5ce013bcdf8e;p=thirdparty%2Fhostap.git tests: Make ap_wps_er_http_proto less likely to fail The test step for concurrent HTTP connections seems to be failing quite frequently when running in a virtual machine with run-tests.py (but not that much with kvm and vm-run.sh). The failures are due to only 8 or 9 sockets getting a response from the HTTP server. This is sufficient for testing purposes, to drop the pass criterium from 10 to 8 concurrent connections. This avoids unnecessary test failures and also allows the rest of the test case to be performed. Signed-off-by: Jouni Malinen --- diff --git a/tests/hwsim/test_ap_wps.py b/tests/hwsim/test_ap_wps.py index 0e96374e4..fdae22a3f 100644 --- a/tests/hwsim/test_ap_wps.py +++ b/tests/hwsim/test_ap_wps.py @@ -4450,11 +4450,13 @@ RGV2aWNlIEEQSQAGADcqAAEg res = socks[i].recv(100) if "HTTP/1" in res: count += 1 + else: + logger.info("recv[%d]: len=%d" % (i, len(res))) except: pass socks[i].close() logger.info("%d concurrent HTTP GET operations returned response" % count) - if count < 10: + if count < 8: raise Exception("Too few concurrent HTTP connections accepted") logger.info("OOM in HTTP server")