Message ID | 20240222031018.12281-3-wegao@suse.com |
---|---|
State | Changes Requested |
Headers | show |
Series | Set system default umaks to 0 | expand |
On Thu, Feb 22, 2024 at 11:11 AM Wei Gao via ltp <ltp@lists.linux.it> wrote: > When system's default umask is 0077, this will trigger following issues: > statx07.c:108: TFAIL: statx() with AT_STATX_DONT_SYNC for mode 644 600 > > Signed-off-by: Wei Gao <wegao@suse.com> > --- > testcases/kernel/syscalls/statx/statx07.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/testcases/kernel/syscalls/statx/statx07.c > b/testcases/kernel/syscalls/statx/statx07.c > index 4dbf83e18..227c33c96 100644 > --- a/testcases/kernel/syscalls/statx/statx07.c > +++ b/testcases/kernel/syscalls/statx/statx07.c > @@ -116,6 +116,8 @@ static void setup(void) > int ret; > char server_path[BUFF_SIZE]; > > + umask(0); > + > cwd = tst_get_tmpdir(); > > SAFE_MKDIR(SERV_PATH, DEFAULT_MODE); > Better to restore the old mask right after. Otherwise looks good.
> On Thu, Feb 22, 2024 at 11:11 AM Wei Gao via ltp <ltp@lists.linux.it> wrote: > > When system's default umask is 0077, this will trigger following issues: > > statx07.c:108: TFAIL: statx() with AT_STATX_DONT_SYNC for mode 644 600 > > Signed-off-by: Wei Gao <wegao@suse.com> > > --- > > testcases/kernel/syscalls/statx/statx07.c | 2 ++ > > 1 file changed, 2 insertions(+) > > diff --git a/testcases/kernel/syscalls/statx/statx07.c > > b/testcases/kernel/syscalls/statx/statx07.c > > index 4dbf83e18..227c33c96 100644 > > --- a/testcases/kernel/syscalls/statx/statx07.c > > +++ b/testcases/kernel/syscalls/statx/statx07.c > > @@ -116,6 +116,8 @@ static void setup(void) > > int ret; > > char server_path[BUFF_SIZE]; > > + umask(0); > > + > > cwd = tst_get_tmpdir(); > > SAFE_MKDIR(SERV_PATH, DEFAULT_MODE); > Better to restore the old mask right after. +1, Wei, can you please send new version? > Otherwise looks good. Kind regards, Petr
diff --git a/testcases/kernel/syscalls/statx/statx07.c b/testcases/kernel/syscalls/statx/statx07.c index 4dbf83e18..227c33c96 100644 --- a/testcases/kernel/syscalls/statx/statx07.c +++ b/testcases/kernel/syscalls/statx/statx07.c @@ -116,6 +116,8 @@ static void setup(void) int ret; char server_path[BUFF_SIZE]; + umask(0); + cwd = tst_get_tmpdir(); SAFE_MKDIR(SERV_PATH, DEFAULT_MODE);
When system's default umask is 0077, this will trigger following issues: statx07.c:108: TFAIL: statx() with AT_STATX_DONT_SYNC for mode 644 600 Signed-off-by: Wei Gao <wegao@suse.com> --- testcases/kernel/syscalls/statx/statx07.c | 2 ++ 1 file changed, 2 insertions(+)