mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-22 13:37:27 +08:00
tests/fd: Error out early if more fds are open
This is simply an error in test setup. There's a limit to how far we can isolate them from the system. (it's possible new cmake versions close fds automatically since I can't reproduce the original issue via `ninja test` or `make test`) Fixes #9017
This commit is contained in:
parent
4f0c0486a6
commit
045683f927
|
@ -2,6 +2,14 @@
|
||||||
|
|
||||||
# Check that we don't leave stray FDs.
|
# Check that we don't leave stray FDs.
|
||||||
|
|
||||||
|
set -l fds ($helper print_fds)
|
||||||
|
test "$fds" = "0 1 2"
|
||||||
|
or begin
|
||||||
|
echo This test needs to have all fds other than 0 1 and 2 closed before running >&2
|
||||||
|
echo Please close the other fds and try again >&2
|
||||||
|
exit 1
|
||||||
|
end
|
||||||
|
|
||||||
$helper print_fds
|
$helper print_fds
|
||||||
# CHECK: 0 1 2
|
# CHECK: 0 1 2
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user