-
Notifications
You must be signed in to change notification settings - Fork 413
Open
Labels
A-testsArea: affects our test suite or CIArea: affects our test suite or CIC-enhancementCategory: a PR with an enhancement or an issue tracking an accepted enhancementCategory: a PR with an enhancement or an issue tracking an accepted enhancementE-good-first-issueA good way to start contributing, mentoring is availableA good way to start contributing, mentoring is available
Description
Many of our libc-based tests are enormously verbose: they directly interact with the libc APIs, which is cumbersome from Rust. (They also often let-bind way more than is necessary or useful.)
The goal of this issue is to make the tests more concise and therefore more readable and easier to maintain. #4724 and #4721 and good examples for the kinds of things we can do:
- use C string literals instead of manually mucking about with
CStringor manually null-terminating byte slice literals - use
errno_resultorerrno_checkinstead of manually checking the result of functions that report their error via errno - use
read_all_into_arrayinstead ofread/read_all, andwrite_all_from_sliceinstead ofwrite/write_all(this won't always work!) - use the epoll helpers in the epoll tests (I only ported a few of them)
Metadata
Metadata
Assignees
Labels
A-testsArea: affects our test suite or CIArea: affects our test suite or CIC-enhancementCategory: a PR with an enhancement or an issue tracking an accepted enhancementCategory: a PR with an enhancement or an issue tracking an accepted enhancementE-good-first-issueA good way to start contributing, mentoring is availableA good way to start contributing, mentoring is available