Skip to content

coredump testing suite

Andrea Cervesato ltp 11 versions – Applied

Status from this message: Merged, Thanks!

Get series with b4
b4 am [email protected] change-id 20260820-coredump-22fc731bde08

Versions newest first

  1. v11 Latest3 patches 2 repliesApplied
  2. v103 patches 7 repliesSuperseded
  3. v93 patches 2 repliesSuperseded
Earlier versions · 8
VersionPostedPatchesRepliesStatus
v82 patches4 repliesSuperseded
v72 patches5 repliesSuperseded
v62 patches3 repliesSuperseded
v51 patch4 repliesSuperseded
v41 patch2 repliesSuperseded
v31 patch2 repliesSuperseded
v21 patch1 replySuperseded
v11 patch2 repliesSuperseded

Changes in v11 from the cover letter

- cast ELF description
- Link to v10: https://lore.kernel.org/[email protected]

Patches in v11 Applied

#Subject and filesSizeRepliesApplied
1/3lib: Add SAFE_FILE_VPRINTF()include/safe_file_ops_fn.h include/tst_safe_file_ops.h lib/safe_file_ops.c+21 -11 reply
2/3coredump01: New core_pattern specifiers testruntest/kernel_misc testcases/kernel/Makefile testcases/kernel/coredump/.gitignore +4 more+298 -00 replies
3/3coredump02: Verify ELF structure and notesruntest/kernel_misc testcases/kernel/coredump/.gitignore testcases/kernel/coredump/coredump02.c+193 -00 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchCyril HrubisLi Wang
1/3R-b
2/3R-b R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v11 thread

Cover letter [LTP] [PATCH v11 0/3] coredump testing suite

Add a simple coredump01 test that simulate a coredump and verify that it actually works. This is a small coverage that is missing inside LTP testing suite.

Add a coredump02 test that verifies ELF data after a coredump.

---
Changes in v11:
- cast ELF description
- Link to v10: https://lore.kernel.org/[email protected]

Changes in v10:
- add kernel-doc documentation for SAFE_FILE_VPRINTF()
- fix checkpatch formatting warnings in SAFE_FILE_VPRINTF() headers
- use TST_EXP_EQ_STR() to compare executable name in coredump02
- Link to v9: https://lore.kernel.org/[email protected]

Changes in v9:
- add SAFE_FILE_VPRINTF() helper in the test library
- factor out shared test logic into coredump_common.h
- use SAFE_FILE_VPRINTF() in set_pattern() to avoid intermediate buffers
- use struct tcase array for test case dispatch in coredump01
- return early in coredump01 if core file is missing before parsing ELF
- document root requirement in coredump02 description
- assert exactly one PT_NOTE segment in coredump02
- validate file bounds for PT_LOAD segments in coredump02
- use TST_EXP_EQ_STRN() to compare executable name in coredump02
- copy unaligned note descriptors to local stack structs to ensure 8-byte alignment
- Link to v8: https://lore.kernel.org/[email protected]

Changes in v8:
- check PT_LOAD data
- Link to v7: https://lore.kernel.org/[email protected]

Changes in v7:
- define a common header for the testing suite
- update commit message for coredump02
- Link to v6: https://lore.kernel.org/[email protected]

Changes in v6:
- coredump01 check Elf
- add coredump02 test for Elf validation
- Link to v5: https://lore.kernel.org/[email protected]

Changes in v5:
- resolve path from root for helper
- Link to v4: https://lore.kernel.org/[email protected]

Changes in v4:
- read back core_pattern after writing and abort with TBROK on mismatch
- read CONFIG_STATIC_USERMODEHELPER once in setup() and cache the result
- remove namespace visibility scaffolding and skip logic from verify_pipe_pattern()
- resolve helper path with tst_get_path() instead of /proc/self/exe readlink
- Link to v3: https://lore.kernel.org/[email protected]

Changes in v3:
- check for CONFIG_COREDUMP=y
- Link to v2: https://lore.kernel.org/[email protected]

Changes in v2:
- fix CI agent spotted errors
- Link to v1: https://lore.kernel.org/[email protected]

To: Linux Test Project <[email protected]>

---
Andrea Cervesato (3):
lib: Add SAFE_FILE_VPRINTF()
coredump01: New core_pattern specifiers test
coredump02: Verify ELF structure and notes

 include/safe_file_ops_fn.h                    |   6 +
 include/tst_safe_file_ops.h                   |  14 ++
 lib/safe_file_ops.c                           |   2 +-
 runtest/kernel_misc                           |   2 +
 testcases/kernel/Makefile                     |   1 +
 testcases/kernel/coredump/.gitignore          |   3 +
 testcases/kernel/coredump/Makefile            |   7 +
 testcases/kernel/coredump/coredump01.c        | 162 ++++++++++++++++++++++
 testcases/kernel/coredump/coredump01_helper.c |  73 ++++++++++
 testcases/kernel/coredump/coredump02.c        | 191 ++++++++++++++++++++++++++
 testcases/kernel/coredump/coredump_common.h   |  52 +++++++
 11 files changed, 512 insertions(+), 1 deletion(-)

---
base-commit: 352f9134942933efcfa608b87ae814db603b3228
change-id: 20260820-coredump-22fc731bde08

Best regards,

Signature · 5 lines
Andrea Cervesato <[email protected]>


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp