RFC brk: use direct syscalls
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest1 patch 8 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/1 | syscalls/brk: use direct syscalltestcases/ testcases/ | +12 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [LTP] [RFC PATCH 0/1] brk: use direct syscalls
Hello LTP maintainers,
This patch slightly reworks the brk01 and brk02 tests to use direct syscalls with tst_syscall rather than calling through the libc.
While running LTP on a musl-based distribution, we noticed that the brk tests were failing. It turns out that Musl prevents the use of brk with their wrapper: it always returns an error.
This isn't too egregious as using brk is deprecated in favor of malloc and it isn't part of POSIX anymore since POSIX.1-2001, but it _is_ different from glibc's beavior, which allows using it.
This patch allows proper testing of brk's functionality, independent of libc specifics, and thus allows the tests to pass on Musl-based distributions like Alpine.
Do you think this is a correct approach for LTP ?
From what I could see there are a few tests that use tst_syscall directly and it doesn't affect the logic much for brk.
Green build:
https://github.com/Teo-CD/ltp/actions/runs/3563193507
This was discovered in the context of the Morello project[0]. [0]: https://www.morello-project.org/
Teo Couprie Diaz (1):
syscalls/brk: use direct syscall
testcases/kernel/syscalls/brk/brk01.c | 15 ++++++--------- testcases/kernel/syscalls/brk/brk02.c | 14 ++++++-------- 2 files changed, 12 insertions(+), 17 deletions(-)
base-commit: 498247917f40b0a82cb149e2ec1cb518acd7b632
Signature · 5 lines
2.25.1 -- Mailing list info: https://lists.linux.it/listinfo/ltp