Skip to contentSkip to conversation

syscalls/chdir01: Add umask before mkdir

PATCH New zhaogongyi 3 participants 3 messages Mar 30, 2021 – Mar 31, 2021

lore
Share & tools
lore

zhaogongyi

author
#0 lore raw

PATCH 1/1 syscalls/chdir01: Add umask before mkdir

Hi Petr,

Umask is always 022 in many system env. In this testcase, if umask is not 022, for example, umask is 0077, test would fail because the file mode is affected by umask.

Thanks!

Best Regards,
Gongyi

Quoted 17 lines
Quoted 2 lines

When uid is nobody, umask is not 022, the test process might

Not sure if I understand "When uid is nobody, umask is not 022", umask setup depends usually on the system. I wonder which system has different setup for nobody.

BTW later was posted another solution, see my comments there.

Kind regards,
Petr

[2]
https://patchwork.ozlabs.org/project/ltp/patch/20210322091512.103266
[email protected]/

Quoted 2 lines

has not permmission to access the file which created by SAFE_MKDIR with mode 0755.

#1 lore raw

PATCH 1/1 syscalls/chdir01: Add umask before mkdir

Hi Gongyi,

Quoted 3 lines

Umask is always 022 in many system env. In this testcase, if umask is not 022, for example, umask is 0077, test would fail because the file mode is affected by umask.

Thanks a lot for a giving example. I tested only 0066.

I'm sorry I accepted the Ziyao version as it had better description, reverted back changes and will work on any mode in SAFE_MKDIR(). I put your Reported-by:
tag.

I'll also send one more fix for exfat.

Kind regards,
Petr

#2 lore raw

Hi Gongyi, Petr,

Sorry, I didn't subscribe to the mail when Gongyi's patch was submitted.

Anyway, thank you for your discussion of this issue and for merging this patch.

Regards,
Ziyao

-----????-----
???: Petr Vorel [mailto:[email protected]]
????: 2021?3?31? 0:54
???: zhaogongyi <[email protected]>
??: xieziyao <[email protected]>; [email protected] ??: Re: [LTP] [PATCH] syscalls/chdir01: Add umask before mkdir

Hi Gongyi,

Quoted 3 lines

Umask is always 022 in many system env. In this testcase, if umask is not 022, for example, umask is 0077, test would fail because the file mode is affected by umask.

Thanks a lot for a giving example. I tested only 0066.

I'm sorry I accepted the Ziyao version as it had better description, reverted back changes and will work on any mode in SAFE_MKDIR(). I put your Reported-by:
tag.

I'll also send one more fix for exfat.

Kind regards,
Petr