[LTP] [PATCH v2] ioctl_fiemap01: New test for fiemap ioctl()

Wei Gao wegao@suse.com
Sun Mar 31 04:15:20 CEST 2024


On Fri, Mar 29, 2024 at 10:32:39PM +0100, Petr Vorel wrote:
> Hi Wei,
> 
> ...
> > > > +	fiemap->fm_flags =  -1;
> > > > +	TST_EXP_FAIL(ioctl(fd, FS_IOC_FIEMAP, fiemap), EBADR);
> 
> > > I get on Tumbleweed with 6.8.0-rc4-1.g9b23bf2-default EOPNOTSUPP:
> > > ioctl_fiemap01.c:52: TFAIL: ioctl(fd, FS_IOC_FIEMAP, fiemap) expected EBADR: EOPNOTSUPP (95)
> > > What is the missing dependency for FS_IOC_FIEMAP? Or is there wrong fiemap use
> > > which causes that?
> > Thanks for your test and i also reproduce this issue.
> > This is caused by Tumbleweed mount tmpfs on /tmp and tmpfs seems not support fiemap action.
> > tmpfs on /tmp type tmpfs (rw,nosuid,nodev,size=494452k,nr_inodes=1048576,inode64)
> 
> +1. You probably knows that you need .skip_filesystems, which works even
> .all_filesystems is not set.
> 
> 	.skip_filesystems = (const char *const []) {
> 		"tmpfs",
> 		NULL
> 	},
> 
> But actually when this is filesystem dependent, I guess .all_filesystems = 1
> would make sense, right?
> 
> > I will sent new patch for cover all supported filesystem.
> 
> I suppose you agree :).
Sure!
New draft patch will try to cover all filesystem.

The new patch has one more thing need improve, you suggest print_extens
only on failure, when i start using TST_EXP_EXPR i can not get return result.
Any suggestion or example code handle this in clean way or we can keep 
current implementation?
NOTE: print_extens currently control by TDEBUG.

Thanks a lot :)

> 
> Kind regards,
> Petr


More information about the ltp mailing list