]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfstests-dev.git/commit
generic: test that truncate(2) on fsverity is blocked
authorChristoph Hellwig <hch@lst.de>
Mon, 26 Jan 2026 13:08:43 +0000 (14:08 +0100)
committerZorro Lang <zlang@kernel.org>
Thu, 29 Jan 2026 16:17:11 +0000 (00:17 +0800)
commit1ec21c2911f39b4aa3bb21d5560f1b6da72b0b5e
tree6976e73efab0de2709f8a574a262ddfa551cdff5
parent6cc08eb813281bc42636fa806830811e8dfcfd41
generic: test that truncate(2) on fsverity is blocked

truncate(2) doesn't go through open and needs special code to block
it on fsverity files.  btrfs was missing this check.

Note that truncate(2) in current core utils uses openat and ftruncate,
so add our own little test program for it.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Zorro Lang <zlang@kernel.org>
.gitignore
src/Makefile
src/truncate.c [new file with mode: 0644]
tests/generic/788 [new file with mode: 0755]
tests/generic/788.out [new file with mode: 0644]