Files
android_packages_modules_Co…/tests/cts/hostside/app
Lorenzo Colitti a7ec8300d9 Dup fds to stop finalizers from invalidating them.
The hostside VPN tests were failing because finalizers were
closing the ParcelFileDescriptors that we use to get socekt fds.
The close operations were causing the fds to be marked as invalid
(i.e., -1), causing the tests' system calls on them to fail with
EBADF.

Fix this by dup(2)ing the fds and closing the original objects.

Also, add some asserts to debug this sort of failure.

Fix: 35927643
Test: HostsideVpnTests passed 20/20 times on bullhead
Change-Id: If88530b5bd32622bd4726cd6f0907f731209bb43
2017-03-16 08:25:55 +09:00
..