Commit e1a6adc
libct/int: TestFdLeaks: deflake
Since the recent CVE fixes, TestFdLeaksSystemd sometimes fails:
=== RUN TestFdLeaksSystemd
exec_test.go:1750: extra fd 9 -> /12224/task/13831/fd
exec_test.go:1753: found 1 extra fds after container.Run
--- FAIL: TestFdLeaksSystemd (0.10s)
It might have been caused by the change to the test code in commit
ff6fe13 ("utils: use safe procfs for /proc/self/fd loop code") -- we are
now opening a file descriptor during the logic to get a list of file
descriptors. If the file descriptor happens to be allocated to a
different number, you'll get an error.
Let's try to filter out the fd used to read a directory.
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 5fbc3bb)
Signed-off-by: lifubang <lifubang@acmcoder.com>1 parent cef8c32 commit e1a6adc
1 file changed
+7
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
1702 | 1703 | | |
1703 | 1704 | | |
1704 | 1705 | | |
1705 | | - | |
| 1706 | + | |
| 1707 | + | |
| 1708 | + | |
| 1709 | + | |
| 1710 | + | |
1706 | 1711 | | |
1707 | 1712 | | |
1708 | 1713 | | |
| |||
1724 | 1729 | | |
1725 | 1730 | | |
1726 | 1731 | | |
1727 | | - | |
| 1732 | + | |
1728 | 1733 | | |
1729 | 1734 | | |
1730 | 1735 | | |
| |||
0 commit comments