All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH v4 0/3] Increase coverage for swapon syscall
@ 2026-09-03 13:04 Andrea Cervesato
  2026-09-03 13:04 ` [LTP] [PATCH v4 1/3] tse_swap: Add fallback definitions for swapon Andrea Cervesato
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Andrea Cervesato @ 2026-09-03 13:04 UTC (permalink / raw)
  To: Linux Test Project

Complete the EINVAL coverage on invalid input data and create a new test
to verify discarding pages functionalities.

Signed-off-by: Andrea Cervesato <andrea.cervesato@suse.com>
---
Changes in v4:
- replaced the manual /proc/swaps check with .needs_kconfigs = "CONFIG_SWAP=y"
- added .needs_cmds = "mkswap" to make sure that the binary exists
- switched from raw tst_syscall to standard swapon() and swapoff()
- used TST_EXP_PASS() to check the swapon() call
- truncated the backing file before checking FALLOC_FL_PUNCH_HOLE support
- added SAFE_FSYNC() before mkswap to flush data to disk
- changed TTERRNO to TERRNO for swapoff() errors
- removed redundant static flag resets in cleanup()
- added .skip_filesystems to skip filesystems that do not support punch hole
- Link to v3: https://lore.kernel.org/20260828-swapon_discard_coverage-v3-0-136924a1a730@suse.com

Changes in v3:
- better description for fallbacks
- swapon02: make sure we swapoff() if swapon() accidentally pass
- Link to v2: https://lore.kernel.org/20260828-swapon_discard_coverage-v2-0-e55a86dad729@suse.com

Changes in v2:
- ensure buffer is flushed after discard using fsync()
- add messages to show what test cases we are running
- Link to v1: https://lore.kernel.org/20260827-swapon_discard_coverage-v1-0-633bcb11c181@suse.com

To: Linux Test Project <ltp@lists.linux.it>

---
Andrea Cervesato (3):
      tse_swap: Add fallback definitions for swapon
      swapon04: Add test for discard flags
      swapon02: Add test cases for invalid swapflags

 include/tse_swap.h                          |  16 +++
 runtest/syscalls                            |   1 +
 testcases/kernel/syscalls/swapon/.gitignore |   1 +
 testcases/kernel/syscalls/swapon/swapon02.c |  59 ++++++--
 testcases/kernel/syscalls/swapon/swapon04.c | 208 ++++++++++++++++++++++++++++
 5 files changed, 270 insertions(+), 15 deletions(-)
---
base-commit: 12724413534a6d4160ff9694ba6f09daa4ccb6bd
change-id: 20260827-swapon_discard_coverage-34861d63fc55

Best regards,
--  
Andrea Cervesato <andrea.cervesato@suse.com>


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

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2026-09-11  6:33 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-03 13:04 [LTP] [PATCH v4 0/3] Increase coverage for swapon syscall Andrea Cervesato
2026-09-03 13:04 ` [LTP] [PATCH v4 1/3] tse_swap: Add fallback definitions for swapon Andrea Cervesato
2026-09-03 16:01   ` [LTP] " linuxtestproject.agent
2026-09-04  7:16     ` Andrea Cervesato via ltp
2026-09-10 11:47   ` [LTP] [PATCH v4 1/3] " Cyril Hrubis
2026-09-03 13:04 ` [LTP] [PATCH v4 2/3] swapon04: Add test for discard flags Andrea Cervesato
2026-09-10 14:21   ` Cyril Hrubis
2026-09-03 13:04 ` [LTP] [PATCH v4 3/3] swapon02: Add test cases for invalid swapflags Andrea Cervesato
2026-09-10 14:29   ` Cyril Hrubis
2026-09-11  6:33 ` [LTP] [PATCH v4 0/3] Increase coverage for swapon syscall Andrea Cervesato via ltp

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.