mbox series

[V3,0/5] improvement work on libswap library

Message ID 20240123114840.2610533-1-liwang@redhat.com
Headers show
Series improvement work on libswap library | expand

Message

Li Wang Jan. 23, 2024, 11:48 a.m. UTC
v2-->v3:
	* replace strcmp() by strstr() becuase ext2/ext3/ext4 has same type name.
	* add a dedicated function to create the contiguous file for swapon
	* introduce set_nocow_attr to set 'NOCOW' attr for btrfs
	* replace the kernel-version-check by variable fi_contiguous
	* make use of SAFE_MACORs
	* fix code incident to make check-libswap happy

Note: as change the return of is_swap_supported will affect more
      tests in swapon/off, I didn't replace tst_brk by tst_res+return
      in this patchset, we can do it later in separate work.

Test env:
	Fedora38(x86_64, Btrfs), RHEL9(s390x, XFS), RHEL8(aarch64, XFS)

Li Wang (4):
  libswap: add known swap supported fs check
  swapon01: Improving test with memory limits and swap reporting
  libswap: add function to prealloc contiguous file
  libswap: Introduce file contiguity check

Petr Vorel (1):
  swapon01: Test on all filesystems

 libs/libltpswap/libswap.c                   | 130 +++++++++++++++++++-
 testcases/kernel/syscalls/swapon/swapon01.c |  16 ++-
 2 files changed, 139 insertions(+), 7 deletions(-)