nolibc: Add getcwd() and readlink()
Status from this message: Applied, thanks.
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest3 patches 3 repliesApplied
- v23 patches 1 replySuperseded
- v13 patches 4 repliesSuperseded
Changes in v3 from the cover letter
- Addressed the issues noted by sashiko (impressed by how good it is now)
- Use __LINE__ for the error numbers in the test to make it easy to spot where it broke.
- Redid the nolibc test for all archs, all passed.
Patches in v3 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | tools/nolibc: unistd: Add getcwd()tools/ | +42 | 1 reply | |
| 2/3 | tools/nolibc: unistd: Add readlink()tools/ | +16 | 1 reply | |
| 3/3 | selftests/nolibc: Add test for getcwd() and readlink()tools/ | +53 | 1 reply |
Reviews trailers per patch
2 of 3 patches have a Reviewed-by or Acked-by.
| Patch | Willy Tarreau |
|---|---|
| 1/3 | A-b |
| 2/3 | A-b |
| 3/3 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v3 0/3] nolibc: Add getcwd() and readlink()
I needed getcwd() for something. So I added that, then realised I also needed readlink() to test the result of getcwd().
This adds getcwd() and readlink() then adds a test that uses both.
Note: getcwd() has some behaviour where if the current directory is unreachable then the kernel returns "(unreachable)" and this needs some special handling. I checked what musl was doing for this. It seems pretty difficult to test and maybe needs some calls nolibc doesn't have yet. Basically: It looks right but there is no test.
v3:
- Addressed the issues noted by sashiko (impressed by how good it is now)
- Use __LINE__ for the error numbers in the test to make it easy to spot where it broke.
- Redid the nolibc test for all archs, all passed.
v2:
- Addressed Thomas' comments for readlink() and making the test depend on proc.
- Filled out getcwd() so it matches what musl is doing.
- Expanded the test a little to try to cover passing bad arguments.
Daniel Palmer (3):
tools/nolibc: unistd: Add getcwd() tools/nolibc: unistd: Add readlink() selftests/nolibc: Add test for getcwd() and readlink()
tools/include/nolibc/unistd.h | 58 ++++++++++++++++++++ tools/testing/selftests/nolibc/nolibc-test.c | 53 ++++++++++++++++++ 2 files changed, 111 insertions(+)
Signature · 1 line
2.53.0