Files
flatpak/tests
Simon Chopin 7399dea960 testlib: add expected argument to fcntl(F_DUPFD)
The F_DUPFD and its relative F_DUPFD_CLOEXEC both expect an int argument
as extra argument, being the minimal value for the new FD. This argument
must be within the accepted range (see ulimit -H -n).

This was detected in Ubuntu during testing against the latest glibc,
stracing resulted in:

107244 fcntl(1, F_DUPFD_CLOEXEC, 1847846346272) = -1 EINVAL (Invalid argument)

On the system in question (ppc64el machine running Ubuntu Questing), the
relevant limit is 524288.

For the fix we use 3 as a reasonable floor value, as in the first one
after stderr. It also happens to be the one used in revokefs/main.c.

Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/2121039
2025-08-28 11:21:18 +00:00
..
2022-10-24 16:12:14 +01:00
2019-12-17 14:55:13 +01:00
2016-02-25 19:03:09 +01:00
2022-10-24 16:12:14 +01:00
2020-03-20 15:37:10 +01:00
2024-05-13 14:10:14 -05:00
2024-02-13 08:20:57 -06:00