[LTP] [PATCH] Fix unlink09 test

Cyril Hrubis chrubis@suse.cz
Wed Jun 5 13:30:35 CEST 2024


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.

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.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list