]> Sergey Matveev's repositories - bfs.git/commit
tests: Move closed_std* tests out of the POSIX group
authorTavian Barnes <tavianator@tavianator.com>
Sat, 14 Oct 2023 12:55:57 +0000 (08:55 -0400)
committerTavian Barnes <tavianator@tavianator.com>
Sat, 14 Oct 2023 12:55:57 +0000 (08:55 -0400)
commitddb476bcd224f8c262d24981af48da2fc649f43d
tree1e016328a9ee33c54d0e35e4ed85fbc675b6a280
parent287c2c72afeb8fbf017cd62cc100b2d05dca0fae
tests: Move closed_std* tests out of the POSIX group

POSIX actually says

> If the utility would be executed with file descriptor 0, 1, or 2
> closed, implementations may execute the utility with the file
> descriptor open to an unspecified file.

So we're not guaranteed to be able to detect the situation in the first
place.  Add a best-effort check for these platforms and skip the test.

Link: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_09_01_01
tests/bfs/closed_stderr.sh [new file with mode: 0644]
tests/bfs/closed_stdin.out [moved from tests/posix/closed_stdin.out with 100% similarity]
tests/bfs/closed_stdin.sh [moved from tests/posix/closed_stdin.sh with 100% similarity]
tests/bfs/closed_stdout.sh [new file with mode: 0644]
tests/posix/closed_stderr.sh [deleted file]
tests/posix/closed_stdout.sh [deleted file]