bind/bind02: Testcase failed when no root user run it
PATCH 1/11 bind/bind02: Testcase failed when no root user run it
Add tst_require_root() to testcase for setegid().
--- testcases/kernel/syscalls/bind/bind02.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
testcases/kernel/syscalls/bind/bind02.c +2 -0
@@ -127,6 +127,8 @@ int main(int argc, char *argv[])* Linux doesn't have that limitation apparently. */ char *username =NULL ; +tst_require_root (); +if (argc !=2 ) {tst_resm (TINFO ,"Defaulting to user nobody" ); username =strdup (nobody_uid);
Signature · 1 line
1.6.0.2
PATCH 2/11 capset/capset02: Testcase failed when no root user run it
Add tst_require_root() to testcase for seteuid().
--- testcases/kernel/syscalls/capset/capset02.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
testcases/kernel/syscalls/capset/capset02.c +1 -0
@@ -174,6 +174,7 @@ int main(int ac, char **av)void setup (void ) { +tst_require_root ();TEST_PAUSE ;
Signature · 1 line
1.6.0.2
PATCH 3/11 chroot/chroot04: Testcase failed when no root user run it
In reply to Cui BixuanAdd tst_require_root() to testcase for seteuid().
--- testcases/kernel/syscalls/chroot/chroot04.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
testcases/kernel/syscalls/chroot/chroot04.c +2 -0
@@ -99,6 +99,8 @@ void setup(void) {tst_sig (NOFORK ,DEF_HANDLER , cleanup); +tst_require_root (); +TEST_PAUSE ;/* make a temporary directory and cd to it */
Signature · 1 line
1.6.0.2
PATCH 4/11 execve/execve03: Testcase failed when no root user run it
In reply to Cui BixuanAdd tst_require_root() to testcase for setgid().
--- testcases/kernel/syscalls/execve/execve03.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
testcases/kernel/syscalls/execve/execve03.c +2 -0
@@ -166,6 +166,8 @@ void setup(void)char *cwdname =NULL ;int fd; +tst_require_root (); +umask (0 );tst_sig (NOFORK ,DEF_HANDLER , cleanup);
Signature · 1 line
1.6.0.2
PATCH 5/11 syscalls/fcntl: Testcases failed when no root user run it
In reply to Cui BixuanAdd tst_require_root() to testcase for setreuid().
--- testcases/kernel/syscalls/fcntl/fcntl18.c | 2 ++ testcases/kernel/syscalls/fcntl/fcntl33.c | 2 ++ 2 files changed, 4 insertions(+), 0 deletions(-)
testcases/kernel/syscalls/fcntl/fcntl18.c +2 -0
@@ -171,6 +171,8 @@ void setup(void)tst_sig (FORK ,DEF_HANDLER , cleanup); +tst_require_root (); +umask (0 );TEST_PAUSE ;
testcases/kernel/syscalls/fcntl/fcntl33.c +2 -0
@@ -112,6 +112,8 @@ static void setup(void) {tst_sig (FORK ,DEF_HANDLER , cleanup); +tst_require_root (); +tst_timer_check (CLOCK_MONOTONIC );/* Backup and set the lease-break-time. */
Signature · 1 line
1.6.0.2
PATCH 6/11 mmap/mmap12: Testcase failed when no root user run it
In reply to Cui BixuanAdd tst_require_root() to testcase for open /proc/self/pagemap file.
--- testcases/kernel/syscalls/mmap/mmap12.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
testcases/kernel/syscalls/mmap/mmap12.c +2 -0
@@ -143,6 +143,8 @@ static void setup(void) {tst_sig (FORK ,DEF_HANDLER , cleanup); +tst_require_root (); +if ((tst_kvercmp (2 ,6 ,25 )) <0 )tst_brkm (TCONF ,NULL , "This test can only run on kernels that are 2.6.25 and "
Signature · 1 line
1.6.0.2
PATCH 6/11 mmap/mmap12: Testcase failed when no root user run it
Hi!
Quoted 1 line
Add
tst_require_root()to testcase for open/proc/self/pagemapfile.
On my machines the /proc/self/pagemap is readable by the process (it's owned by the user that has started the program).
What is output of ls -l /proc/self/pagemap on your machine?
Signature · 2 lines
Cyril Hrubis [email protected]
PATCH 6/11 mmap/mmap12: Testcase failed when no root user run it
Quoted 7 lines · Cyril Hrubis
Hi!
Quoted 1 line
Add
tst_require_root()to testcase for open/proc/self/pagemapfile.On my machines the
/proc/self/pagemapis readable by the process (it's owned by the user that has started the program).What is output of ls -l
/proc/self/pagemapon your machine?
I look my system and others:
1) SUSE SP2: 3.0.13-0.27-default (uname -a); test PASS; -r--r--r-- 1 root root 0 Oct 30 16:13 /proc/self/pagemap 2) Ubuntu: 3.13.0-32-generic; test PASS; -r--r--r--. 1 cuibixuan cuibixuan 0 10? 30 16:19 /proc/self/pagemap 3) SUSE: 4.2.0-0.11-default; test FAIL; -r-------- 1 root root 0 Nov 13 01:39 /proc/self/pagemap 4) arm64: linux 4.1.6; test FAIL; -r-------- 1 root root 0 Jan 18 01:53 /proc/self/pagemap
Maybe the higher version of the kernel change the file attributes of /proc/self/pagemap, I think.
But I read the Documentation/vm/pagemap.txt and look at the source code in kernel, can't get it. :-(
Someone help?
Quoted 1 line
PATCH 6/11 mmap/mmap12: Testcase failed when no root user run it
----- Original Message -----
Quoted 24 lines
From: "Cui Bixuan" <[email protected]>
To: "Cyril Hrubis" <[email protected]>
Cc: [email protected], [email protected], [email protected]
Sent: Friday, 30 October, 2015 9:56:36 AM
Subject: Re: [LTP] [PATCH 6/11] mmap/mmap12: Testcase failed when no root user run itQuoted 7 lines · Cyril Hrubis
Hi!
Quoted 1 line
Add
tst_require_root()to testcase for open/proc/self/pagemapfile.On my machines the
/proc/self/pagemapis readable by the process (it's owned by the user that has started the program).What is output of ls -l
/proc/self/pagemapon your machine?I look my system and others:
1) SUSE SP2: 3.0.13-0.27-default (uname -a); test PASS; -r--r--r-- 1 root root 0 Oct 30 16:13/proc/self/pagemap
2) Ubuntu: 3.13.0-32-generic; test PASS; -r--r--r--. 1
cuibixuan cuibixuan 0 10? 30 16:19/proc/self/pagemap
3) SUSE: 4.2.0-0.11-default; test FAIL; -r-------- 1 root
root 0 Nov 13 01:39/proc/self/pagemap
4) arm64: linux 4.1.6; test FAIL; -r-------- 1 root
root 0 Jan 18 01:53/proc/self/pagemap
Quoted 2 lines
Maybe the higher version of the kernel change the file attributes of
/proc/self/pagemap, I think.
commit 32ed74a4b968a4faff7aaaff557035ce5d5e70ab
Author: Djalal Harouni <[email protected]> Date: Mon Apr 7 15:38:38 2014 -0700
procfs: make /proc/*/pagemap 0400
The /proc/*/pagemap contain sensitive information and currently its mode is 0444. Change this to 0400, so the VFS will prevent unprivileged processes from getting file descriptors on arbitrary privileged /proc/*/pagemap files.
but that doesn't explain why process can't read its own pagemap. For 3) and 4): Did you run that as unprivileged user or as a root?
Can you paste full output from mmap12 run (the one that fails)?
Regards,
Jan
Quoted 12 lines
But I read the
Documentation/vm/pagemap.txtand look at the source code in kernel,
can't get it. :-(Someone help?
Quoted 1 line
--
Mailing list info: http://lists.linux.it/listinfo/ltp
PATCH 6/11 mmap/mmap12: Testcase failed when no root user run it
Quoted 43 lines · Jan Stancek
----- Original Message -----
Quoted 24 lines
From: "Cui Bixuan" <[email protected]>
To: "Cyril Hrubis" <[email protected]>
Cc: [email protected], [email protected], [email protected]
Sent: Friday, 30 October, 2015 9:56:36 AM
Subject: Re: [LTP] [PATCH 6/11] mmap/mmap12: Testcase failed when no root user run itQuoted 7 lines · Cyril Hrubis
Hi!
Quoted 1 line
Add
tst_require_root()to testcase for open/proc/self/pagemapfile.On my machines the
/proc/self/pagemapis readable by the process (it's owned by the user that has started the program).What is output of ls -l
/proc/self/pagemapon your machine?I look my system and others:
1) SUSE SP2: 3.0.13-0.27-default (uname -a); test PASS; -r--r--r-- 1 root root 0 Oct 30 16:13/proc/self/pagemap
2) Ubuntu: 3.13.0-32-generic; test PASS; -r--r--r--. 1
cuibixuan cuibixuan 0 10? 30 16:19/proc/self/pagemap
3) SUSE: 4.2.0-0.11-default; test FAIL; -r-------- 1 root
root 0 Nov 13 01:39/proc/self/pagemap
4) arm64: linux 4.1.6; test FAIL; -r-------- 1 root
root 0 Jan 18 01:53/proc/self/pagemapQuoted 2 lines
Maybe the higher version of the kernel change the file attributes of
/proc/self/pagemap, I think.commit
32ed74a4b968a4faff7aaaff557035ce5d5e70abAuthor: Djalal Harouni <[email protected]> Date: Mon Apr 7 15:38:38 2014 -0700procfs: make
/proc/*/pagemap0400The
/proc/*/pagemapcontain sensitive information and currently its mode is 0444. Change this to 0400, so the VFS will prevent unprivileged processes from getting file descriptors on arbitrary privileged/proc/*/pagemapfiles.
Quoted 5 lines
but that doesn't explain why process can't read its own pagemap. For 3) and 4): Did you run that as unprivileged user or as a root?
Can you paste full output from mmap12 run (the one that fails)?
Ok,
3)
linux-91x6:/home/cuibixuan/ltp.git/testcases/kernel/syscalls/mmap # ./mmap12
mmap12 1 TPASS : Functionality of mmap() successful
linux-91x6:/home/cuibixuan/ltp.git/testcases/kernel/syscalls/mmap # uname -a
Linux linux-91x6 4.2.0-0.11-default #1 SMP Mon Sep 28 06:25:26 CST 2015 x86_64 x86_64 x86_64 GNU/Linux linux-91x6:/home/cuibixuan/ltp.git/testcases/kernel/syscalls/mmap # ./mmap12
mmap12 1 TPASS : Functionality of mmap() successful
linux-91x6:/home/cuibixuan/ltp.git/testcases/kernel/syscalls/mmap # su cuibixuan cuibixuan@linux-91x6:~/ltp.git/testcases/kernel/syscalls/mmap> ./mmap12
mmap12 1 TFAIL : mmap12.c:112: Open dev pagemap failed: errno=EPERM(1): Operation not permitted
cuibixuan@linux-91x6:~/ltp.git/testcases/kernel/syscalls/mmap> ls -l /proc/self/pagemap -r-------- 1 cuibixuan users 0 Nov 13 18:19 /proc/self/pagemap
4)
[root@localhost tmp]# ./mmap12
mmap12 1 TPASS : Functionality of mmap() successful
[root@localhost tmp]# su cuibixuan
[cuibixuan@localhost tmp]$ ./mmap12
mmap12 1 TFAIL : mmap12.c:112: Open dev pagemap failed: errno=EPERM(1): Operation not permitted
[cuibixuan@localhost tmp]$ ls -l /proc/self/pagemap -r-------- 1 cuibixuan cuibixuan 0 Jun 2 18:03 /proc/self/pagemap [cuibixuan@localhost tmp]$ uname -r
4.1.6+
[cuibixuan@localhost tmp]$ uname -i
aarch64
Quoted 18 lines
Regards,
JanQuoted 5 lines
But I read the
Documentation/vm/pagemap.txtand look at the source code in kernel,
can't get it. :-(Quoted 7 lines
Someone help?
Quoted 1 line
--
Mailing list info: http://lists.linux.it/listinfo/ltp.
PATCH 6/11 mmap/mmap12: Testcase failed when no root user run it
----- Original Message -----
Quoted 6 lines
From: "Cui Bixuan" <[email protected]>
To: "Jan Stancek" <[email protected]>
Cc: "Cyril Hrubis" <[email protected]>, [email protected], [email protected], [email protected]
Sent: Saturday, 31 October, 2015 1:54:07 AM
Subject: Re: [LTP] [PATCH 6/11] mmap/mmap12: Testcase failed when no root user run it
Quoted 49 lines
Quoted 48 lines · Jan Stancek
----- Original Message -----
Quoted 25 lines
From: "Cui Bixuan" <[email protected]>
To: "Cyril Hrubis" <[email protected]>
Cc: [email protected], [email protected], [email protected]
Sent: Friday, 30 October, 2015 9:56:36 AM
Subject: Re: [LTP] [PATCH 6/11] mmap/mmap12: Testcase failed when no root user run itQuoted 7 lines · Cyril Hrubis
Hi!
Quoted 1 line
Add
tst_require_root()to testcase for open/proc/self/pagemapfile.On my machines the
/proc/self/pagemapis readable by the process (it's owned by the user that has started the program).What is output of ls -l
/proc/self/pagemapon your machine?I look my system and others:
1) SUSE SP2: 3.0.13-0.27-default (uname -a); test PASS; -r--r--r-- 1 root root 0 Oct 30 16:13/proc/self/pagemap
2) Ubuntu: 3.13.0-32-generic; test PASS; -r--r--r--. 1
cuibixuan cuibixuan 0 10? 30 16:19/proc/self/pagemap
3) SUSE: 4.2.0-0.11-default; test FAIL; -r-------- 1 root
root 0 Nov 13 01:39/proc/self/pagemap
4) arm64: linux 4.1.6; test FAIL; -r-------- 1 root
root 0 Jan 18 01:53/proc/self/pagemapQuoted 2 lines
Maybe the higher version of the kernel change the file attributes of
/proc/self/pagemap, I think.commit
32ed74a4b968a4faff7aaaff557035ce5d5e70abAuthor: Djalal Harouni <[email protected]> Date: Mon Apr 7 15:38:38 2014 -0700procfs: make
/proc/*/pagemap0400The
/proc/*/pagemapcontain sensitive information and currently its mode
is 0444. Change this to 0400, so the VFS will prevent unprivileged processes from getting file descriptors on arbitrary privileged/proc/*/pagemapfiles.but that doesn't explain why process can't read its own pagemap. For 3) and 4): Did you run that as unprivileged user or as a root?
Looks like the EPERM is from this patch, which disabled reading for non-privileged users:
commit ab676b7d6fbf4b294bf198fb27ade5b0e865c7ce
Author: Kirill A. Shutemov <[email protected]> Date: Mon Mar 9 23:11:12 2015 +0200
pagemap: do not leak physical addresses to non-privileged userspace
it was later removed in:
commit 1c90308e7a77af6742a97d1021cca923b23b7f0d
Author: Konstantin Khlebnikov <[email protected]> Date: Tue Sep 8 15:00:07 2015 -0700
pagemap: hide physical addresses from non-privileged users
So I'm thinking that we should check "if euid != 0 and opening pagemap gives EPERM", then quit with TCONF.
Regards,
Jan
Quoted 21 lines
Quoted 19 lines
Regards,
JanQuoted 5 lines
But I read the
Documentation/vm/pagemap.txtand look at the source code in kernel,
can't get it. :-(Quoted 7 lines
Someone help?
Quoted 1 line
--
Mailing list info: http://lists.linux.it/listinfo/ltp.
PATCH 6/11 mmap/mmap12: Testcase failed when no root user run it
Hi!
Quoted 2 lines
So I'm thinking that we should check "if euid != 0 and opening pagemap gives EPERM", then quit with TCONF.
Sounds good to me.
Signature · 2 lines
Cyril Hrubis [email protected]
PATCH v2 6/11 mmap/mmap12: Testcase failed for non-root user
Unprivileged user open /proc/self/pagemap fail so add check for it
--- testcases/kernel/syscalls/mmap/mmap12.c | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-)
testcases/kernel/syscalls/mmap/mmap12.c +8 -2
@@ -108,8 +108,14 @@ static int page_check(void) index = (vmstart / page_sz) *sizeof (uint64_t ); pm =open ("/proc/self/pagemap" ,O_RDONLY ); -if (pm ==-1 ) -tst_brkm (TFAIL |TERRNO ,NULL ,"Open dev pagemap failed" ); +if (pm ==-1 ) { +if ((0 !=geteuid ()) && (errno ==EPERM )) +tst_brkm (TCONF |TERRNO ,NULL , +"don't have permission to open dev pagemap" ); +else +tst_brkm (TFAIL |TERRNO ,NULL , +"Open dev pagemap failed" ); + } offset =lseek (pm, index,SEEK_SET );if (offset != index)
Signature · 1 line
1.6.0.2
PATCH v2 6/11 mmap/mmap12: Testcase failed for non-root user
----- Original Message -----
Quoted 9 lines
From: "Cui Bixuan" <[email protected]>
To: "Cyril Hrubis" <[email protected]>
Cc: "Jan Stancek" <[email protected]>, [email protected], [email protected], [email protected]
Sent: Tuesday, 3 November, 2015 9:01:22 AM
Subject: [LTP] [PATCH 6/11 v2] mmap/mmap12: Testcase failed for non-root userUnprivileged user open
/proc/self/pagemapfail so add check for itSigned-off-by Cui Bixuan <[email protected]>
Pushed with more verbose commit message and small changes to style.
Regards,
Jan
Quoted 29 lines
--- testcases/kernel/syscalls/mmap/mmap12.c | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-)testcases/kernel/syscalls/mmap/mmap12.c +8
-3@@ -108,8 +108,14 @@ static int page_check(void) index = (vmstart / page_sz) *sizeof (uint64_t ); pm =open ("/proc/self/pagemap" ,O_RDONLY ); -if (pm ==-1 ) -tst_brkm (TFAIL |TERRNO ,NULL ,"Open dev pagemap failed" ); +if (pm ==-1 ) { +if ((0 !=geteuid ()) && (errno ==EPERM )) +tst_brkm (TCONF |TERRNO ,NULL , +"don't have permission to open dev pagemap" ); +else +tst_brkm (TFAIL |TERRNO ,NULL , +"Open dev pagemap failed" ); + } offset =lseek (pm, index,SEEK_SET );if (offset != index) --1.6.0.2
PATCH v2 6/11 mmap/mmap12: Testcase failed for non-root user
Quoted 11 lines · Jan Stancek
----- Original Message -----
Quoted 6 lines
From: "Cui Bixuan" <[email protected]>
To: "Cyril Hrubis" <[email protected]>
Cc: "Jan Stancek" <[email protected]>, [email protected], [email protected], [email protected]
Sent: Tuesday, 3 November, 2015 9:01:22 AM
Subject: [LTP] [PATCH 6/11 v2] mmap/mmap12: Testcase failed for non-root user
Quoted 6 lines
Quoted 3 lines
Unprivileged user open
/proc/self/pagemapfail so add check for itSigned-off-by Cui Bixuan <[email protected]>Pushed with more verbose commit message and small changes to style.
Thank you for your help.
Cui Bixuan
Quoted 35 lines
Regards,
JanQuoted 27 lines
--- testcases/kernel/syscalls/mmap/mmap12.c | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-)testcases/kernel/syscalls/mmap/mmap12.c +8
-3@@ -108,8 +108,14 @@ static int page_check(void) index = (vmstart / page_sz) *sizeof (uint64_t ); pm =open ("/proc/self/pagemap" ,O_RDONLY ); -if (pm ==-1 ) -tst_brkm (TFAIL |TERRNO ,NULL ,"Open dev pagemap failed" ); +if (pm ==-1 ) { +if ((0 !=geteuid ()) && (errno ==EPERM )) +tst_brkm (TCONF |TERRNO ,NULL , +"don't have permission to open dev pagemap" ); +else +tst_brkm (TFAIL |TERRNO ,NULL , +"Open dev pagemap failed" ); + } offset =lseek (pm, index,SEEK_SET );if (offset != index) --Quoted 2 lines
1.6.0.2
.
PATCH 6/11 mmap/mmap12: Testcase failed when no root user run it
In reply to Cyril HrubisQuoted 7 lines · Cyril Hrubis
Hi!
Quoted 1 line
Add
tst_require_root()to testcase for open/proc/self/pagemapfile.On my machines the
/proc/self/pagemapis readable by the process (it's owned by the user that has started the program).What is output of ls -l
/proc/self/pagemapon your machine?
I look my system and others:
1) SUSE SP2: 3.0.13-0.27-default (uname -a); test PASS; -r--r--r-- 1 root root 0 Oct 30 16:13 /proc/self/pagemap 2) Ubuntu: 3.13.0-32-generic; test PASS; -r--r--r--. 1 cuibixuan cuibixuan 0 10? 30 16:19 /proc/self/pagemap 3) SUSE: 4.2.0-0.11-default; test FAIL; -r-------- 1 root root 0 Nov 13 01:39 /proc/self/pagemap 4) arm64: linux 4.1.6; test FAIL; -r-------- 1 root root 0 Jan 18 01:53 /proc/self/pagemap
Maybe the higher version of the kernel change the file attributes of /proc/self/pagemap, I think.
But I read the Documentation/vm/pagemap.txt and look at the source code in kernel, can't get it. :-(
Someone help?
Quoted 1 line
PATCH 7/11 mq_open/mq_open01: Testcase failed when no root user run it
In reply to Cui BixuanAdd tst_require_root() to testcase for mq_open().
--- testcases/kernel/syscalls/mq_open/mq_open01.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
testcases/kernel/syscalls/mq_open/mq_open01.c +2 -0
@@ -112,6 +112,8 @@ void cleanup(void)/******************************************************************************/ void setup (void ) { +tst_require_root (); +/* Capture signals if any */ /* Create temporary directories */ TEST_PAUSE ;
Signature · 1 line
1.6.0.2
PATCH 8/11 ipc/msgctl: Testcases failed when no root user run it
In reply to Cui BixuanAdd tst_require_root() to testcase for msgctl().
--- testcases/kernel/syscalls/ipc/msgctl/msgctl06.c | 2 ++ testcases/kernel/syscalls/ipc/msgctl/msgctl07.c | 2 ++ 2 files changed, 4 insertions(+), 0 deletions(-)
testcases/kernel/syscalls/ipc/msgctl/msgctl06.c +2 -0
@@ -123,6 +123,8 @@ int main(int argc, char *argv[])* ****************************************************************/ void setup (void ) { +tst_require_root (); +/* You will want to enable some signal handling so you can capture * unexpected signals like SIGSEGV. */
testcases/kernel/syscalls/ipc/msgctl/msgctl07.c +2 -0
@@ -299,6 +299,8 @@ void setup(void) {tst_sig (FORK ,DEF_HANDLER , cleanup); +tst_require_root (); +TEST_PAUSE ;tst_tmpdir ();
Signature · 1 line
1.6.0.2
PATCH 9/11 ipc/semctl: Testcases failed when no root user run it
In reply to Cui BixuanAdd tst_require_root() to testcase for semop() and semget().
--- testcases/kernel/syscalls/ipc/semctl/semctl06.c | 2 ++ testcases/kernel/syscalls/ipc/semctl/semctl07.c | 2 ++ 2 files changed, 4 insertions(+), 0 deletions(-)
testcases/kernel/syscalls/ipc/semctl/semctl06.c +2 -0
@@ -387,6 +387,8 @@ void setup(void) {tst_sig (FORK ,DEF_HANDLER , cleanup); +tst_require_root (); +TEST_PAUSE ;tst_tmpdir ();
testcases/kernel/syscalls/ipc/semctl/semctl07.c +2 -0
@@ -155,6 +155,8 @@ void setup(void) {tst_sig (NOFORK ,DEF_HANDLER , cleanup); +tst_require_root (); +TEST_PAUSE ;tst_tmpdir ();
Signature · 1 line
1.6.0.2
PATCH 9/11 ipc/semctl: Testcases failed when no root user run it
Hi!
testcases/kernel/syscalls/ipc/semctl/semctl07.c void setup(void) · line 162
Quoted 13 lines
testcases/kernel/syscalls/ipc/semctl/semctl07.c +2
-0@@ -155,6 +155,8 @@ void setup(void) {tst_sig (NOFORK ,DEF_HANDLER , cleanup); +tst_require_root (); +TEST_PAUSE ;tst_tmpdir ();
This test runs fine without root for me.
Signature · 2 lines
Cyril Hrubis [email protected]
PATCH 10/11 ipc/shmctl: Testcase failed when no root user run it
In reply to Cui BixuanAdd tst_require_root() to testcase for shmctl().
--- testcases/kernel/syscalls/ipc/shmctl/shmctl01.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
testcases/kernel/syscalls/ipc/shmctl/shmctl01.c +2 -0
@@ -470,6 +470,8 @@ void setup(void) {tst_sig (FORK , sighandler, cleanup); +Add tst_require_root (); +TEST_PAUSE ;tst_tmpdir ();
Signature · 1 line
1.6.0.2
PATCH 10/11 ipc/shmctl: Testcase failed when no root user run it
Hi,
Quoted 12 lines · Cui Bixuan
Add
tst_require_root()to testcase forshmctl().Signed-off-by Cui Bixuan <[email protected]>--- testcases/kernel/syscalls/ipc/shmctl/shmctl01.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)testcases/kernel/syscalls/ipc/shmctl/shmctl01.c +0
-0
testcases/kernel/syscalls/ipc/shmctl/shmctl01.c void setup(void) · line 474
Quoted 5 lines
testcases/kernel/syscalls/ipc/shmctl/shmctl01.c +2
-0@@ -470,6 +470,8 @@ void setup(void) {tst_sig (FORK , sighandler, cleanup); +Add tst_require_root (); +
tst_requite_root();
Thanks,
Zeng
Quoted 7 lines
testcases/kernel/syscalls/ipc/shmctl/shmctl01.c +0
-0TEST_PAUSE ;tst_tmpdir ();Signature · 1 line
1.6.0.2
PATCH v2 10/11 ipc/shmctl: Testcase failed when no root user run it
Add tst_require_root() to testcase for shmctl().
--- testcases/kernel/syscalls/ipc/shmctl/shmctl01.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
testcases/kernel/syscalls/ipc/shmctl/shmctl01.c +2 -0
@@ -470,6 +470,8 @@ void setup(void) {tst_sig (FORK , sighandler, cleanup); +tst_require_root (); +TEST_PAUSE ;tst_tmpdir ();
-- 1.6.0.2
PATCH 10/11 ipc/shmctl: Testcase failed when no root user run it
In reply to Zeng LinggangQuoted 5 lines · Zeng Linggang
Hi,
Quoted 3 lines
{
tst_sig(FORK, sighandler, cleanup);
Quoted 7 lines
testcases/kernel/syscalls/ipc/shmctl/shmctl01.c void setup(void) · line 474
Quoted 2 lines
testcases/kernel/syscalls/ipc/shmctl/shmctl01.c +2
-0+Add tst_require_root (); +
tst_requite_root();Thanks,
Zeng
Thank you :-)
Cui Bixuan
Quoted 12 lines
Quoted 8 lines
testcases/kernel/syscalls/ipc/shmctl/shmctl01.c +0
-0TEST_PAUSE ;tst_tmpdir ();Signature · 1 line
1.6.0.2
PATCH 10/11 ipc/shmctl: Testcase failed when no root user run it
In reply to Cui BixuanHi!
testcases/kernel/syscalls/ipc/shmctl/shmctl01.c void setup(void) · line 477
Quoted 13 lines
testcases/kernel/syscalls/ipc/shmctl/shmctl01.c +2
-0@@ -470,6 +470,8 @@ void setup(void) {tst_sig (FORK , sighandler, cleanup); +Add tst_require_root (); +TEST_PAUSE ;tst_tmpdir ();
This one runs fine as well.
Signature · 2 lines
Cyril Hrubis [email protected]
PATCH 11/11 unshare/unshare01: Testcase failed when no root user run it
In reply to Cui BixuanAdd tst_require_root() to testcase for unshare().
--- testcases/kernel/syscalls/unshare/unshare01.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
testcases/kernel/syscalls/unshare/unshare01.c +2 -0
@@ -144,6 +144,8 @@ void cleanup(void)/******************************************************************************/ void setup (void ) { +tst_require_root (); +/* Capture signals if any */ /* Create temporary directories */ TEST_PAUSE ;
Signature · 1 line
1.6.0.2
PATCH 11/11 unshare/unshare01: Testcase failed when no root user run it
Hi!
And the rest (patches I didn't commented) is pushed with slightly shortened commit message topic (ideally it should fit to 50 chars), thanks.
Signature · 2 lines
Cyril Hrubis [email protected]