Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libct/int: make TestFdLeaks more robust
The purpose of this test is to check that there are no extra file descriptors left open after repeated calls to runContainer. In fact, the first call to runContainer leaves a few file descriptors opened, and this is by design. Previously, this test relied on two things: 1. some other tests were run before it (and thus all such opened-once file descriptors are already opened); 2. explicitly excluding fd opened to /sys/fs/cgroup. Now, if we run this test separately, it will fail (because of 1 above). The same may happen if the tests are run in a random order. To fix this, add a container run before collection the initial fd list, so those fds that are opened once are included and won't be reported. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com> (cherry picked from commit f2e71b0) Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
- Loading branch information