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 <[email protected]>
Reviewed-by: Zorro Lang <[email protected]>
Reviewed-by: Darrick J. Wong <[email protected]>
Signed-off-by: Zorro Lang <[email protected]>
5 files changed