|
dd0bdb58
|
2024-01-08T01:58:54
|
|
test: Close all descriptors before initializing them for closefrom()
On macOS, closefrom() only sets the close-on-exec flag, so we cannot
check whether all file descriptors were closed, which means that if
on entry our file descriptor table was filled after the 4th file
descriptor, then we might fail the assertions for the flags for odd
file descriptors which we expect to be closed.
This can easily happen when running the test suite in parallel mode
with «make -j8 check» for example.
Closes: #23
|
|
ed2eb31d
|
2023-04-01T02:46:22
|
|
test: Fix closefrom() test on macOS
On macOS we do not close the file descriptors, and instead mark them all
as close-on-exec. So checking whether they are not valid does not work.
|
|
0f8bcdfd
|
2023-04-01T02:48:47
|
|
test: Fix closefrom() test to handle open file descriptor limits
If the system has configured a lower limit (either soft or hard) on the
number of open file descriptors, the test will fail. Make sure to check
whether we have exceeded that limit and adapt the max number of file
descriptors appropriately.
|
|
3c305f28
|
2021-02-19T06:49:53
|
|
test: Add proper prototypes for main() function
Warned-by: gcc
|
|
3a3d87d7
|
2015-09-23T04:40:21
|
|
test: Add closefrom() unit test
|