summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreric_kuang.rs <eric_kuang.rs@realtek.com>2022-05-16 23:26:12 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2022-05-16 23:26:12 +0000
commit529fa00bd7b622cf3be391dc156f93503829e837 (patch)
treeda237ec0113ddf222e79d138293e1e671a16c804
parent3e77463ce67a2fca819bebb2a4051348a18012c5 (diff)
parentdb5726ce9b0bb8f468334830c9b59675354dc9eb (diff)
downloadtests-529fa00bd7b622cf3be391dc156f93503829e837.tar.gz
net-test: not supported in netns before 4.15 if BH_TIMEOUT_SYSCTL does not exist. am: 17a08fbb06 am: db5726ce9bandroid12L-tests-dev
Original change: https://android-review.googlesource.com/c/kernel/tests/+/1908155 Change-Id: I4d7c19cd2d13a7e6937824e26a04586c7b38b74f Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-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