change to use thread.join to wait CloseFileDescriptorThread finished

The original implementation closes fd in a separate thread,
and the use time.sleep(0.1) to wait it finished, but there is the case that
on platforms like hikey the thread is not finished even after the slept 0.1s,

to make this test works for more platforms, we change to use thread.join(0.5) here
to wait up to 0.5 seconds.

And use thread.isActive to check if there is the hang problem.

Test: run vts-kernel -m VtsKernelNetTest with 4.9 and 4.14 kernel

There will be 1 or more failed in 5 iterations,
after this change all will pass in 10 iterations.

Change-Id: I24341667c9a889d79d38a9eb1d88d05325d7ffff
Signed-off-by: Yongqin Liu <>
(cherry picked from commit 4e398426edba77b1e4cbbf97df61efd5b0710ef6)
1 file changed
tree: 27450f93a2fb15e76d92b14ac0bd2a5af3921309
  1. Android.bp
  2. devicetree/
  3. net/