summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryunsik.lee <yunsik.lee@lge.com>2018-11-29 13:25:50 +0900
committerLorenzo Colitti <lorenzo@google.com>2018-12-11 04:41:12 +0000
commit4832bbb524111b0335d52b284b9566aeba668e3a (patch)
treedc3f6afae5d7a5e01c7f0f613adb32815329ed74
parent2eacd483279af9c2296d7aea99594ce3425d5d7d (diff)
downloadtests-4832bbb524111b0335d52b284b9566aeba668e3a.tar.gz
anycast_test.py: increase waiting time to 3 sec to wait CloseFileDescriptorThread finished
Because there are some platforms that take more time than 0.5 seconds, such as platforms that uses MPTCP implementation from https://www.multipath-tcp.org/, we change the waiting time to 3 seconds. For kernels that MPTCP is ported, it take more than 0.5 sec to close tun interface, because of DAD procedure within MPTCP fullmesh module. It seems to be the duplicate address-timer takes a refcount on the IPv6-address, preventing it from getting closed. Test: run vts-kernel -m VtsKernelNetTest with 4.9 and 4.14 kernel using MPTCP implementation Without this change, VtsKernelNetTest was failed with MPTCP enabled kernel every time. After this change all will pass in 5 iterations. Bug: 120248546 Change-Id: I69093d5aa55d2796eac1f6db10d8ba649b63ae9a Signed-off-by: Yunsik Lee <yunsik.lee@lge.com> (cherry picked from commit 3172befe25a9628ad9a7dd94564683fc86bb533b)
-rw-r--r--[-rwxr-xr-x]net/test/anycast_test.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/net/test/anycast_test.py b/net/test/anycast_test.py
index 62d874e..6222580 100755..100644
--- a/net/test/anycast_test.py
+++ b/net/test/anycast_test.py
@@ -93,9 +93,14 @@ class AnycastTest(multinetwork_base.MultiNetworkBaseTest):
# This will hang if the kernel has the bug.
thread = CloseFileDescriptorThread(self.tuns[netid])
thread.start()
- # Wait up to 0.5 seconds for the thread to finish, but
+ # Wait up to 3 seconds for the thread to finish, but
# continue and fail the test if the thread hangs.
- thread.join(0.5)
+
+ # For kernels with MPTCP ported, closing tun interface need more
+ # than 0.5 sec. DAD procedure within MPTCP fullmesh module takes
+ # more time, because duplicate address-timer takes a refcount
+ # on the IPv6-address, preventing it from getting closed.
+ thread.join(3)
# Make teardown work.
del self.tuns[netid]