mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-28 05:43:11 +00: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
1 changed files with 8 additions and 0 deletions
|
@ -2,6 +2,14 @@
|
|||
|
||||
# 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
|
||||
# CHECK: 0 1 2
|
||||
|
||||
|
|
Loading…
Reference in a new issue