From 1154ede862824331d24591c717c270e779a2b08c Mon Sep 17 00:00:00 2001 From: Andrei Zeliankou Date: Mon, 24 May 2021 05:26:15 +0100 Subject: Tests: test_settings_send_timeout improved. Data length adjusts depending on socket buffer size when it's possible. --- test/unit/utils.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'test/unit/utils.py') 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: -- cgit