Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped - Build Status
Buildable 67412 Build 64295: arc lint + arc unit
Event Timeline
This seems ok to me. We are making some assumptions about the execution environment though; it might be good to somehow guarantee that there are no holes in the fd space when an ATF test starts.
tests/sys/file/closefrom_test.c | ||
---|---|---|
124 | I'm not really sure why this assertion must be true when the test is running in under a framework it doesn't control. This test also assumes that all fds up to 2 are open. |
tests/sys/file/closefrom_test.c | ||
---|---|---|
124 | Yeah. That doesn't seem terribly wise... seems better to get the highest fd to start with, then work off that. |
tests/sys/file/closefrom_test.c | ||
---|---|---|
70 | Hmm, I copied this over from ptrace_test and it should probably be fixed there I guess. | |
77 | Here's a place we assume stderr is valid btw. Same in ptrace_test. | |
124 | It is getting the highest fd before opening anything and working off of that. C and POSIX basically require 0/1/2 to be stdin/out/err and be open. That doesn't seem an unreasonable requirement that we are running in a valid POSIX environment? |
tests/sys/file/closefrom_test.c | ||
---|---|---|
127 | Mark points out that this is probably the more interesting assumption as this is assuming that any extra file descriptors opened by the testing framework are "dense". This is probably true normally as you have to go out of your way a bit to get non-dense fds due to POSIX's requirements. I have tested this both standalone as well as under kyua test FWIW. |