]> git.ipfire.org Git - thirdparty/libbsd.git/commit
test: Fix closefrom() test to handle open file descriptor limits
authorGuillem Jover <guillem@hadrons.org>
Sat, 1 Apr 2023 00:48:47 +0000 (02:48 +0200)
committerGuillem Jover <guillem@hadrons.org>
Mon, 17 Apr 2023 02:12:42 +0000 (04:12 +0200)
commit0f8bcdfd92dc6342564192d707f339855c6fbc5f
treef711bcb7074dd05799bcb0146dc5ee142fe8b0f7
parent07192b31e3cd4e541bc76b45788cf5e5e8faff9f
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.
test/closefrom.c