[LTP] [PATCH] Fix unlink09 test
Martin Doucha
mdoucha@suse.cz
Wed Jun 5 13:53:48 CEST 2024
On 05. 06. 24 10:11, 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.
This condition doesn't check support of only the immutable flag, though.
It checks that the filesystem supports querying and setting inode flags
in general. We should add a new test for ioctl(FS_IOC_FLAGS) into the
ioctl test directory, this is not the appropriate place for it.
--
Martin Doucha mdoucha@suse.cz
SW Quality Engineer
SUSE LINUX, s.r.o.
CORSO IIa
Krizikova 148/34
186 00 Prague 8
Czech Republic
More information about the ltp
mailing list