Add tests for aio(4) completion notification via signals
Details
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 10471 Build 10881: arc lint + arc unit
Event Timeline
- Remove custom timeout code; rely on ATF's timeout mechanism instead
- Use semaphores in signal tests instead of polling
- Don't bother unlinking temporary files during cleanup; ATF will handle it. This means we can delete most tests' cleanup routines entirely.
- style fixes suggested by jhb.
I'm a bit leery of the symlink thing for md cleanup, but presumably that permits cleanup if the external atf timeout kicks in? Also, it seems you've removed the explicit timeout in favor of the ATF one?
tests/sys/aio/aio_test.c | ||
---|---|---|
696 | Blank line before a comment. In this case I'd probably just move the comment up a line. |
Yep. If the ATF timeout kicks in, then Kyua will terminate the test process and create a new test process to run the cleanup routine. The cleanup routine always runs in its own process, which is why you need to use files or something like them to pass information from the test to its cleanup. Using a file would be the obvious way to do it, but using a symlink takes fewer SLOC. I copied the technique used in tests/sys/kern/kern_descrip_test.c. Using the ATF timeout and cleanup is better than the explicit version because the cleanup will always get run, regardless of termination reason. And it's many fewer SLOC, too.
Ok, I think it's fine to use ATF's timeout certainly. However, that is something that definitely needs mentioning in the commit logs. If it isn't too much trouble, it would probably be nice to split that change (switching to ATF timeout and redoing cleanups, etc.) into one commit first and then doing a second one to add the new sigevent tests. There's no need to re-post those for review though, you can mark both of them as reviewed.