[LTP] [PATCH] refluxfs: Check kernel reflink support before mount

Cyril Hrubis chrubis@suse.cz
Thu Aug 13 12:12:02 CEST 2026


Hi!
> > > +	if (TST_RET == -1 && TST_ERR == EOPNOTSUPP)
> > > +		tst_brk(TCONF, "Kernel does not support XFS reflinks");
> > 
> > Wouldn't it make more sense to add the check for EOPNOTSUPP into the
> > tst_test.c library?
> 
> I don't know if we really need to add something in the LTP library,
> since we have this check only in file_attr02

I mean that we should rather than hacking around it in the tests handle
EOPNOTSUPP properly in the test libray when mounting filesystems. We do
enough magick in safe_mount() to support FUSE and handle other corner
cases, checking for EOPNOTSUPP (possibly with non-standard mount flags)
does sound like a reasonable extension.

The main point of handling the filesystems in the test library is that
cleanup (umounting) is handled properly even if the test crashes. If we
move the code back to the tests like this we lose that.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list