summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreric_kuang.rs <eric_kuang.rs@realtek.com>2021-12-26 13:35:52 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-12-26 13:35:52 +0000
commitdb5726ce9b0bb8f468334830c9b59675354dc9eb (patch)
treeda237ec0113ddf222e79d138293e1e671a16c804
parentf1fe90dff3666524894bbbd51517d5e59b3ac648 (diff)
parent17a08fbb06ec8a9dc425632a0bdd90b1622d5d26 (diff)
downloadtests-db5726ce9b0bb8f468334830c9b59675354dc9eb.tar.gz
net-test: not supported in netns before 4.15 if BH_TIMEOUT_SYSCTL does not exist. am: 17a08fbb06android12-tests-dev
Original change: https://android-review.googlesource.com/c/kernel/tests/+/1908155 Change-Id: I4892ffd62456b0b515586935cbe0b74bad9e94f9
-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 5b89a2d..9c777c6 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