public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP]  [PATCH] syscalls/access01: Set umask value before run case
@ 2017-09-19 13:04 Bixuan Cui
  2017-09-22 12:28 ` Jan Stancek
  2017-10-03 15:52 ` Cyril Hrubis
  0 siblings, 2 replies; 8+ messages in thread
From: Bixuan Cui @ 2017-09-19 13:04 UTC (permalink / raw)
  To: ltp

The case will fail when set the umask to 0077 acquiescently in system.
Because the value of actual mode is 'set value' & ~'default value
for the umask' when create dir.
So add 'umask(0022)' in setup().

Signed-off-by: Cui Bixuan <cuibixuan@huawei.com>
---
 testcases/kernel/syscalls/access/access01.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/testcases/kernel/syscalls/access/access01.c b/testcases/kernel/syscalls/access/access01.c
index 7a92525..b679832 100644
--- a/testcases/kernel/syscalls/access/access01.c
+++ b/testcases/kernel/syscalls/access/access01.c
@@ -315,6 +315,8 @@ static void setup(void)
 {
 	struct passwd *pw;

+	umask(0022);
+
 	pw = SAFE_GETPWNAM("nobody");

 	uid = pw->pw_uid;
--
2.6.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-10-09  5:27 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-19 13:04 [LTP] [PATCH] syscalls/access01: Set umask value before run case Bixuan Cui
2017-09-22 12:28 ` Jan Stancek
2017-09-25  2:34   ` Bixuan Cui
2017-09-25 12:31   ` Cyril Hrubis
2017-10-03  6:42     ` Jan Stancek
2017-10-03 15:52       ` Cyril Hrubis
2017-10-03 15:52 ` Cyril Hrubis
2017-10-09  5:27   ` Bixuan Cui

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox