[LTP] [PATCH] Fix unlink09 test
Petr Vorel
pvorel@suse.cz
Wed Jun 5 16:12:22 CEST 2024
> Hi!
> > > It would be useful and prepare_device() implements everything that's needed
> > > for it but there's a bug in do_setup() which creates a conflict between the
> > > two attributes. The .all_filesystems attribute forces .needs_device but a
> > > few lines below that is a check that .needs_rofs and .needs_device are not
> > > set at the same time. This can be fixed.
> > Thanks for info, I'll have look into it.
> It may not be needed. The counter argument is that if you mix a read
> only filesystem tests and all_filesystems in one test you are combining
> two unrelated things that are probably better to be done in a separate
> tests.
I thought that we have use case for testing all (or most) filesystems in read
only mode, instead testing just whatever is in the default /tmp. But sure,
I'll will not do that unless others think it's an useful feature.
So does it mean that all read only filesystems behave the same?
So far we have 14 tests with .needs_rofs
testcases/kernel/syscalls/access/access04.c
testcases/kernel/syscalls/acct/acct01.c
testcases/kernel/syscalls/chmod/chmod06.c
testcases/kernel/syscalls/chown/chown04.c
testcases/kernel/syscalls/creat/creat06.c
testcases/kernel/syscalls/fchmod/fchmod06.c
testcases/kernel/syscalls/fchown/fchown04.c
testcases/kernel/syscalls/link/link08.c
testcases/kernel/syscalls/mkdir/mkdir03.c
testcases/kernel/syscalls/mkdirat/mkdirat02.c
testcases/kernel/syscalls/rmdir/rmdir02.c
testcases/kernel/syscalls/unlink/unlink09.c
testcases/kernel/syscalls/utime/utime06.c
testcases/kernel/syscalls/utimes/utimes01.c
>From these at least mkdir, rmdir, link, unlink have member in struct
inode_operations [1] (thus custom operation per filesystem, right?)
I suppose update_time might be related to utime* tests.
There are other members, but for these we IMHO don't test wit rofs.
Then, there is struct file_operations with open, read, write,
{compat,unlocked}_ioctl, llseek, ... operations which (at least open) are used
in various tests.
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/linux/fs.h#n2062
Kind regards,
Petr
More information about the ltp
mailing list