summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2021-12-27 21:04:39 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2021-12-27 21:04:39 +0000
commitbfe233f52179a51ba6a19eb8594bb7b5cf3c2723 (patch)
tree9ba390b721b93e463f78c33ca6b11bed5bc6559a
parent05c945422821fb0e0bf81f4337acd26ff58529f3 (diff)
parent17a08fbb06ec8a9dc425632a0bdd90b1622d5d26 (diff)
downloadtests-bfe233f52179a51ba6a19eb8594bb7b5cf3c2723.tar.gz
Change-Id: I0466fe96fda21754efe174f71e3367039e4da653
-rwxr-xr-xnet/test/tcp_fastopen_test.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/test/tcp_fastopen_test.py b/net/test/tcp_fastopen_test.py
index 16e41c6..3ab9e51 100755
--- a/net/test/tcp_fastopen_test.py
+++ b/net/test/tcp_fastopen_test.py
@@ -22,6 +22,7 @@ from scapy import all as scapy
import multinetwork_base
import net_test
+import os
import packets
import tcp_metrics
@@ -67,6 +68,9 @@ class TcpFastOpenTest(multinetwork_base.MultiNetworkBaseTest):
def clearBlackhole(self):
if net_test.LINUX_VERSION < (4, 14, 0):
return
+ # Prior to 4.15 this sysctl is not namespace aware.
+ if net_test.LINUX_VERSION < (4, 15, 0) and not os.path.exists(BH_TIMEOUT_SYSCTL):
+ return
timeout = self.GetSysctl(BH_TIMEOUT_SYSCTL)
# Write to timeout to clear any pre-existing blackhole condition