[LTP] [RFC PATCH v1 1/2] safe_macros.c: Fix missing ro flag for FUSE NTFS mounts

Cyril Hrubis chrubis@suse.cz
Wed May 21 11:55:16 CEST 2025


Hi!
> > diff --git a/lib/safe_macros.c b/lib/safe_macros.c
> > index 6946cc5bcb94..1270b17af8f4 100644
> > --- a/lib/safe_macros.c
> > +++ b/lib/safe_macros.c
> > @@ -942,10 +942,15 @@ int safe_mount(const char *file, const int lineno, void (*cleanup_fn)(void),
> >  	 */
> >  	if (possibly_fuse(filesystemtype)) {
> >  		char buf[1024];
> > +		const char* mount_fmt;
> > 
> >  		tst_resm_(file, lineno, TINFO, "Trying FUSE...");
> > -		snprintf(buf, sizeof(buf), "mount.%s '%s' '%s'",
> > -			filesystemtype, source, target);
> > +		if (!strcmp(filesystemtype, "ntfs") && mountflags & MS_RDONLY)
> 
> Do we need to limit this to "ntfs"? I suppose that for other FUSE
> filesystems would have the same problem, e.g. exfat.
> 
> Other than this the patch looks good.

Also if my patch that fixes the fuse blacklist gets applied we need to
remove the fuse from the blacklist from statmount02 to get the test
enabled after this fix.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list