[LTP] [PATCH v2 0/7] Rewrite fs stream testing suite
Andrea Cervesato
andrea.cervesato@suse.de
Thu Apr 16 16:33:34 CEST 2026
All tests are now using the new LTP API. The stream05 has been deleted
because I think it was a bit messy and it didn't have a proper testing
focus. I replaced it with a new test that is just verifying that fd
returned by `fileno()` can be used for basic operations on fd.
Signed-off-by: Andrea Cervesato <andrea.cervesato@suse.com>
---
Changes in v3:
- fix stream01 buffer size
- add TST_EXP_PASS_PTR_NULL() macro
Changes in v2:
- add SAFE_FFLUSH() macro
- remove cleanup_fn from SAFE_* macros
- stream01: use a double buffer to write data inside file
- stream02: check if stream is NULL after fopen()
- stream05: use SAFE_FFLUSH()
- stream05: don't overengineer SAFE_FILENO() with TST_EXP_FD()
- Link to v1: https://lore.kernel.org/r/20260123-stream_refactoring-v1-0-281b85f6ab02@suse.com
---
Andrea Cervesato (7):
lib: add safe macros for stream testing suite
fs: rewrite stream01 test using new API
lib: add TST_EXP_PASS_PTR_NULL() macro
fs: rewrite stream02 test using new API
fs: rewrite stream03 test using new API
fs: rewrite stream04 test using new API
fs: rewrite stream05 test using new API
include/safe_stdio_fn.h | 21 +++
include/tst_safe_stdio.h | 21 +++
include/tst_test_macros.h | 15 +-
lib/safe_stdio.c | 101 +++++++++++
testcases/kernel/fs/stream/stream01.c | 155 +++++-----------
testcases/kernel/fs/stream/stream02.c | 134 ++++----------
testcases/kernel/fs/stream/stream03.c | 326 ++++++----------------------------
testcases/kernel/fs/stream/stream04.c | 147 +++++----------
testcases/kernel/fs/stream/stream05.c | 258 +++++----------------------
9 files changed, 373 insertions(+), 805 deletions(-)
---
base-commit: 620d596c79493af089ba6a1c4dc79efcc76a67c7
change-id: 20260120-stream_refactoring-4b5a6e9d0ad7
Best regards,
--
Andrea Cervesato <andrea.cervesato@suse.com>
More information about the ltp
mailing list