[LTP] [PATCH v1] chdir01.c: set umask to 0 within setup

Wei Gao wegao@suse.com
Fri Mar 8 00:21:06 CET 2024


On Thu, Mar 07, 2024 at 04:18:35PM +0100, Martin Doucha wrote:
> Hi,
> you're trying to fix a vfat mount quirk. We should fix that in the LTP
> library instead, e.g. by setting umask(0) and then restoring the original
> value inside safe_mount().

Thanks for your feedback.

For chdir case i just use Petr's below suggestion(Detail info you can check patch link 
in below):

"2) tests, which set .mount_device = 1 and have more restrictive umask will not
work. Workaround would be to not use it and mount manually in the setup().
Or, reset umask with umask(0)."

https://patchwork.ozlabs.org/project/ltp/patch/20240219134845.22171-1-wegao@suse.com/


BTW: for similar issues we also do fix within test file in stead of lib such as:
https://patchwork.ozlabs.org/project/ltp/patch/20240303103105.13401-1-wegao@suse.com/
https://patchwork.ozlabs.org/project/ltp/patch/20240301102347.3035546-1-liwang@redhat.com/


> -- 
> 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