[LTP] [PATCH] Fix unlink09 test

Andrea Cervesato andrea.cervesato@suse.com
Wed Jun 5 13:42:39 CEST 2024


Hi,

On 6/5/24 13:30, Cyril Hrubis wrote:
> Hi!
>>>> +	fd_immutable = SAFE_CREAT(TEST_EPERM_IMMUTABLE, 0600);
>>>> +	TEST(ioctl(fd_immutable, FS_IOC_GETFLAGS, &attr));
>>>> +
>>>> +	if (TST_RET == -1 && TST_ERR == ENOTTY) {
>>>> +		SAFE_CLOSE(fd_immutable);
>>>> +		tst_brk(TCONF | TTERRNO, "Inode attributes not supported");
>>>> +	}
>>> I see one problem with this approach. If kernel accidentally removes a
>>> support for immutable files for a certain filesystem this test will be
>>> green. And the filesystems that miss this support are very unlikely to
>>> gain it, e.g. will vfat get support for immutable files? That would be
>>> an argument for explicit skiplist in the form of
>>> tst_test->skip_filesystems.
>>>
>> That's a valid statement.  For now I would like to fix the test first,
>> then we can fix this other problem with an another patch.
> As long as you promise to fix the test properly later on I agree with
> adding the temporary workaround with a test for immutable support.
The most important thing is that we can fix test so it won't show false 
negative on certain FS, then we can
create patches to split into 2 tests (one for immutable and one for 
EROFS), using .all_filesystems flag.
>
> Also I suppose that it would make sense to enable the test for
> all_filesystems but we would have to move the EROFS to a separate test
> first.
>
Andrea



More information about the ltp mailing list