summaryrefslogtreecommitdiffhomepage
path: root/test/unit
diff options
context:
space:
mode:
authorAndrei Zeliankou <zelenkov@nginx.com>2021-05-24 05:26:15 +0100
committerAndrei Zeliankou <zelenkov@nginx.com>2021-05-24 05:26:15 +0100
commit1154ede862824331d24591c717c270e779a2b08c (patch)
treeb4706a17be3ec2c1ea4151fdee6b4d4caf68009d /test/unit
parentc160ea11e4ece4db52731ac8b83dd09ca2d1ef11 (diff)
downloadunit-1154ede862824331d24591c717c270e779a2b08c.tar.gz
unit-1154ede862824331d24591c717c270e779a2b08c.tar.bz2
Tests: test_settings_send_timeout improved.
Data length adjusts depending on socket buffer size when it's possible.
Diffstat (limited to '')
-rw-r--r--test/unit/utils.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/unit/utils.py b/test/unit/utils.py
index e80fc469..a627e9f5 100644
--- a/test/unit/utils.py
+++ b/test/unit/utils.py
@@ -61,6 +61,17 @@ def findmnt():
return out
+def sysctl():
+ try:
+ out = subprocess.check_output(
+ ['sysctl', '-a'], stderr=subprocess.STDOUT
+ ).decode()
+ except FileNotFoundError:
+ pytest.skip('requires sysctl')
+
+ return out
+
+
def waitformount(template, wait=50):
for i in range(wait):
if findmnt().find(template) != -1: