diff options
author | Ryo Nakamura <upa@haeena.net> | 2023-09-09 14:32:15 +0900 |
---|---|---|
committer | Ryo Nakamura <upa@haeena.net> | 2023-11-01 19:54:18 +0900 |
commit | bf74aa095adf8d0a3b4144b29b2d7a48fe4e02b2 (patch) | |
tree | d3d58b31457af827cecf439b902e14b62d41c129 /test/test_e2e.py | |
parent | a88471fc43a8500f73cd55eeb87b3a990cb0b4f9 (diff) |
add -g option to specify TCP cc algorithm
This commit introduce SSH_OPTIONS_CCALGO option to the libssh patch
and add -g CONGESTION option to mscp.
Diffstat (limited to 'test/test_e2e.py')
-rw-r--r-- | test/test_e2e.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/test_e2e.py b/test/test_e2e.py index 108ae71..c46141b 100644 --- a/test/test_e2e.py +++ b/test/test_e2e.py @@ -3,6 +3,7 @@ test_e2e.py: End-to-End test for mscp executable. """ +import platform import pytest import os @@ -268,6 +269,21 @@ def test_compression(mscp, src_prefix, dst_prefix, compress): src.cleanup() dst.cleanup() +@pytest.mark.parametrize("src_prefix, dst_prefix", param_remote_prefix) +def test_ccalgo(mscp, src_prefix, dst_prefix): + src = File("src", size = 1024 * 1024).make() + dst = File("dst").make() + if platform.system() == "Darwin": + # Darwin does not support TCP_CONGESTION + algo = "cubic" + run = run2ng + elif platform.system() == "Linux": + # Linux supports TCP_CONGESTION + with open("/proc/sys/net/ipv4/tcp_allowed_congestion_control", r) as f: + algo = f.read().strip().split().pop() + run = run2ok + run([mscp, "-H", "-vvv", "-g", algo, src_prefix + src.path, dst_prefix + "dst"]) + testhost = "mscptestlocalhost" testhost_prefix = "{}:{}/".format(testhost, os.getcwd()) # use current dir |