Make it so the test harness closes fds up to 100, not only 10

Some tests require that there be no fds open up to fd 100, whereas
currently the test harness only closes fds up to 10. This means on an
environment where there is an fd between 10 and 100 open (e.g. on my
Plasma/KDE system every shell session had fd 95 open for some reason)
such tests will fail.

This patch fixes this by making it so the test harness closes fds 10 to
100.

Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
This commit is contained in:
Gabriel Ravier 2024-08-29 11:21:46 +02:00
parent 884d89235f
commit a1f3ffc860

View file

@ -105,7 +105,7 @@ int main(int argc, char *argv[]) {
__log_level = kLogInfo;
GetOpts(argc, argv);
for (fd = 3; fd < 10; ++fd) {
for (fd = 3; fd < 100; ++fd) {
close(fd);
}