[LTP] [PATCH] Add userns01 testcase to verify user namespace.

2015-05-19 Thread Yuan Sun
Signed-off-by: Yuan Sun sunyu...@huawei.com --- testcases/kernel/containers/userns/Makefile| 28 ++ testcases/kernel/containers/userns/README | 22 + testcases/kernel/containers/userns/userns01.c | 104 + testcases/kernel/containers/userns

Re: [LTP] [PATCH] Fix the return value error of read_shares_file.

2015-06-04 Thread Yuan Sun
Hi Cyril, I have updated the patch according to your comment. Many thanks for your suggestion. Yuan On 2015/6/4 21:02, Cyril Hrubis wrote: Hi! Can you also change the error_function() to return void and remove the return -1 from it? diff --git

[LTP] [PATCH V2] Fix the return value error of read_shares_file.

2015-06-04 Thread Yuan Sun
Add return -1 after the error_function execution. Signed-off-by: Yuan Sun sunyu...@huawei.com --- .../controllers/libcontrollers/libcontrollers.c| 45 +++--- .../controllers/libcontrollers/libcontrollers.h| 4 +- 2 files changed, 33 insertions(+), 16 deletions(-) diff

Re: [LTP] [PATCH V2] containers: new testcase userns02

2015-06-02 Thread Yuan Sun
...@redhat.com To: Yuan Sun sunyu...@huawei.com Cc: ltp-list@lists.sourceforge.net, pleasure...@sina.com Sent: Thursday, 28 May, 2015 2:33:53 PM Subject: Re: [LTP] [PATCH V2] containers: new testcase userns02 - Original Message - From: Yuan Sun sunyu...@huawei.com To: jstan

[LTP] [PATCH V2] containers: new testcase userns03

2015-06-08 Thread Yuan Sun
, then ID-outside-ns is defined with respect to the user namespace of the process opening the file. If kernel version = 3.19.0, the case will ignore the git check. Signed-off-by: Yuan Sun sunyu...@huawei.com --- testcases/kernel/containers/userns/userns03.c | 250 ++ 1

[LTP] [PATCH] Add TEST_LOOPING in userns01.

2015-06-08 Thread Yuan Sun
Signed-off-by: Yuan Sun sunyu...@huawei.com --- testcases/kernel/containers/userns/userns01.c | 31 +++ 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/testcases/kernel/containers/userns/userns01.c b/testcases/kernel/containers/userns/userns01.c index

Re: [LTP] [PATCH] containers: new testcase userns03

2015-06-08 Thread Yuan Sun
version. I plan to create a new case userns04 to cover gid check in kernel version(=3.19.0). If you have different opinion, please let me know. Regards. Yuan On 2015/6/5 20:54, Jan Stancek wrote: On 06/03/2015 09:36 PM, Yuan Sun wrote: ID-outside-ns is interpreted

Re: [LTP] Cedric

2015-06-25 Thread Yuan Sun
Hi Wanlong, It works well after install the lib. Many thanks. Yuan On 2015/6/25 14:18, Wanlong Gao wrote: On 06/25/2015 10:50 AM, Yuan Sun wrote: Hi Cedric, I encounter the following error in ubuntu14.04. Your patch syscall/getrandom: Add tests for getrandom leads

Re: [LTP] Cedric

2015-06-25 Thread Yuan Sun
AM, Yuan Sun wrote: Hi Cedric, I encounter the following error in ubuntu14.04. Your patch syscall/getrandom: Add tests for getrandom leads to the error. Do I need to install new libraries? getrandom() was introduced in version 3.17 of the Linux kernel. Ubuntu 14.04 gets shipped

Re: [LTP] [PATCH] Need to install linux-libc-dev for getrandom cases.

2015-06-25 Thread Yuan Sun
Hi Cyril, You are right. I installed linux-libc-dev with old version. Thank you. Best regards. Yuan On 2015/6/25 20:04, Cyril Hrubis wrote: Hi! Signed-off-by: Yuan Sun sunyu...@huawei.com --- doc/mini-howto-building-ltp-from-git.txt | 2 +- 1 file changed, 1 insertion

[LTP] error: 'GRND_RANDOM' undeclared here

2015-06-24 Thread Yuan Sun
Hi Cedric, I encounter the following error in ubuntu14.04. Your patch syscall/getrandom: Add tests for getrandom leads to the error. Do I need to install new libraries? Could you please check with the issue? Thanks. Yuan make[4]: Entering directory

[LTP] Cedric

2015-06-24 Thread Yuan Sun
Hi Cedric, I encounter the following error in ubuntu14.04. Your patch syscall/getrandom: Add tests for getrandom leads to the error. Do I need to install new libraries? Could you please check with the issue? Thanks. Yuan make[4]: Entering directory

Re: [LTP] [PATCH V3] containers: new testcase userns03

2015-06-24 Thread Yuan Sun
/6/19 21:38, Jan Stancek wrote: On 06/16/2015 11:28 PM, Yuan Sun wrote: ID-outside-ns is interpreted according to which process is opening the file. If the process opening the file is in the same user namespace as the process PID, then ID-outside-ns is defined with respect to the parent user

Re: [LTP] [PATCH v5] containers: new testcase userns04

2015-06-24 Thread Yuan Sun
Hi Jan, Excellent. I didn't think that TEST_LOOPING can't be used in this case. You are very professional. I agree with you. Could you please merge the patch v5? Thank you very much for your help. Yuan On 2015/6/24 18:09, Jan Stancek wrote: From: Yuan Sun sunyu...@huawei.com

[LTP] [PATCH] userns01: add capability verification

2015-06-24 Thread Yuan Sun
A child process has a full set of permitted and effective capabilities, even though the program was run from an unprivileged account. Signed-off-by: Yuan Sun sunyu...@huawei.com --- testcases/kernel/containers/userns/Makefile | 2 +- testcases/kernel/containers/userns/userns01.c | 18

[LTP] [PATCH] Need to install linux-libc-dev for getrandom cases.

2015-06-25 Thread Yuan Sun
Signed-off-by: Yuan Sun sunyu...@huawei.com --- doc/mini-howto-building-ltp-from-git.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/mini-howto-building-ltp-from-git.txt b/doc/mini-howto-building-ltp-from-git.txt index 28825c2..7a1062e 100644 --- a/doc/mini-howto

[LTP] [PATCH] pidns: Update TCID from pid_namespace to pidns.

2015-06-26 Thread Yuan Sun
Signed-off-by: Yuan Sun sunyu...@huawei.com --- testcases/kernel/containers/pidns/pidns01.c | 2 +- testcases/kernel/containers/pidns/pidns02.c | 2 +- testcases/kernel/containers/pidns/pidns03.c | 2 +- testcases/kernel/containers/pidns/pidns04.c | 2 +- 4 files changed, 4 insertions(+), 4

[LTP] [PATCH] containers: new testcase userns04

2015-06-11 Thread Yuan Sun
If a namespace isn't aother namespace's ancestor, the first namespace does not have the CAP_SYS_ADMIN capability in the second namespace and the setns() call fails. Signed-off-by: Yuan Sun sunyu...@huawei.com --- testcases/kernel/containers/userns/userns04.c | 131 ++ 1

[LTP] [PATCH V2] containers: new testcase userns04

2015-06-16 Thread Yuan Sun
If a namespace isn't aother namespace's ancestor, the first namespace does not have the CAP_SYS_ADMIN capability in the second namespace and the setns() call fails. Signed-off-by: Yuan Sun sunyu...@huawei.com --- testcases/kernel/containers/userns/userns04.c | 134 ++ 1

[LTP] [PATCH] userns02: add SAFE_CLOSE

2015-06-16 Thread Yuan Sun
Signed-off-by: Yuan Sun sunyu...@huawei.com --- testcases/kernel/containers/userns/userns02.c | 24 +--- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/testcases/kernel/containers/userns/userns02.c b/testcases/kernel/containers/userns/userns02.c index ad5dda5

Re: [LTP] [PATCH V2] containers: new testcase userns03

2015-06-14 Thread Yuan Sun
On 2015/6/11 21:55, Jan Stancek wrote: On 06/09/2015 11:01 AM, Yuan Sun wrote: I'm thinking if we shouldn't replace kernel version check with check that /proc/self/setgroups exists. Then it would work on kernels that backport those patches. What do you think? Hi Jan, It is better

Re: [LTP] [PATCH] containers: new testcase userns04

2015-06-14 Thread Yuan Sun
Hi Jianggang, Thanks for your comment. I will update code according to your suggestion. Yuan On 2015/6/12 9:42, Wei, Jiangang wrote: On Thu, 2015-06-11 at 13:47 -0600, Yuan Sun wrote: If a namespace isn't aother namespace's ancestor, the first namespace does not have

[LTP] [PATCH V3] containers: new testcase userns04

2015-06-16 Thread Yuan Sun
If a namespace isn't aother namespace's ancestor, the first namespace does not have the CAP_SYS_ADMIN capability in the second namespace and the setns() call fails. Signed-off-by: Yuan Sun sunyu...@huawei.com --- testcases/kernel/containers/userns/userns04.c | 134 ++ 1

Re: [LTP] [PATCH V3] containers: new testcase userns04

2015-06-16 Thread Yuan Sun
On 2015/6/17 20:56, Yuan Sun wrote: If a namespace isn't aother namespace's ancestor, the first namespace does not have the CAP_SYS_ADMIN capability in the second namespace and the setns() call fails. Signed-off-by: Yuan Sun sunyu...@huawei.com --- testcases/kernel/containers/userns

[LTP] [PATCH V4] containers: new testcase userns04

2015-06-16 Thread Yuan Sun
If a namespace isn't aother namespace's ancestor, the first namespace does not have the CAP_SYS_ADMIN capability in the second namespace and the setns() call fails. Signed-off-by: Yuan Sun sunyu...@huawei.com --- testcases/kernel/containers/userns/userns04.c | 135 ++ 1

Re: [LTP] [PATCH] commands/logrotate:run the case once again will failed

2015-05-31 Thread Yuan Sun
On 2015/6/1 10:46, Li Wang wrote: Hi, - Original Message - Hi Bixuan, If the current time is 23:59:59 May 30 23:59:59 2015, we start to run the case and /var/log/*20150530* file is created. It has a delay before the program runs the following command added by you. rm -f

[LTP] [PATCH V2] containers: new testcase userns02

2015-05-27 Thread Yuan Sun
The user ID and group ID, which are inside a container, can be modified by its parent process. Signed-off-by: Yuan Sun sunyu...@huawei.com --- runtest/containers| 1 + testcases/kernel/containers/.gitignore| 1 + testcases/kernel/containers/userns/userns02

Re: [LTP] [PATCH V2] containers: new testcase userns02

2015-05-30 Thread Yuan Sun
On 2015/5/29 18:23, Jiri Jaburek wrote: On 05/28/15 14:33, Jan Stancek wrote: - Original Message - From: Yuan Sun sunyu...@huawei.com To: jstan...@redhat.com Cc: ltp-list@lists.sourceforge.net, pleasure...@sina.com, sunyu...@huawei.com Sent: Wednesday, 27 May, 2015 11:00:21 PM

[LTP] [PATCH] Use the value of /proc/sys/kernel/overflowgid as overflowgid.

2015-06-01 Thread Yuan Sun
Signed-off-by: Yuan Sun sunyu...@huawei.com --- testcases/kernel/containers/userns/userns01.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/testcases/kernel/containers/userns/userns01.c b/testcases/kernel/containers/userns/userns01.c index 8c45774..15cde43 100644

Re: [LTP] [PATCHv3] containers: Use ltp_syscall for setns incase some libc library do not support it

2015-07-01 Thread Yuan Sun
I was not familiar with ltp_syscall and didn't have comment. Thanks you for updating userns04 case. Regards. Yuan On 2015/7/1 14:55, Jan Stancek wrote: - Original Message - From: Hangbin Liu liuhang...@gmail.com To: LTP List ltp-list@lists.sourceforge.net Cc: Jan Stancek

[LTP] [PATCH] cpuctl: correct wrong TCID

2015-06-30 Thread Yuan Sun
Signed-off-by: Yuan Sun sunyu...@huawei.com --- testcases/kernel/controllers/cpuctl/cpuctl_def_task01.c | 3 +-- testcases/kernel/controllers/cpuctl/cpuctl_def_task02.c | 2 +- testcases/kernel/controllers/cpuctl/cpuctl_def_task03.c | 2 +- testcases/kernel/controllers

[LTP] [PATCH V2] userns01: add capability verification

2015-06-30 Thread Yuan Sun
Signed-off-by: Yuan Sun sunyu...@huawei.com --- testcases/kernel/containers/userns/Makefile | 2 +- testcases/kernel/containers/userns/userns01.c | 31 +-- 2 files changed, 26 insertions(+), 7 deletions(-) diff --git a/testcases/kernel/containers/userns/Makefile b

[LTP] [PATCH V3] userns01: add capability verification

2015-07-06 Thread Yuan Sun
Signed-off-by: Yuan Sun sunyu...@huawei.com --- testcases/kernel/containers/userns/userns01.c | 43 ++- 1 file changed, 36 insertions(+), 7 deletions(-) diff --git a/testcases/kernel/containers/userns/userns01.c b/testcases/kernel/containers/userns/userns01.c index

Re: [LTP] [PATCH V2] userns01: add capability verification

2015-07-02 Thread Yuan Sun
, Jan Stancek wrote: - Original Message - From: Yuan Sun sunyu...@huawei.com To: jstan...@redhat.com Cc: ltp-list@lists.sourceforge.net Sent: Wednesday, 1 July, 2015 6:22:45 AM Subject: [PATCH V2] userns01: add capability verification Signed-off-by: Yuan Sun sunyu...@huawei.com

[LTP] [PATCH] Add check_simple_capset in filecapstest.sh.

2015-07-02 Thread Yuan Sun
Signed-off-by: Yuan Sun sunyu...@huawei.com --- testcases/kernel/security/filecaps/filecapstest.sh | 8 1 file changed, 8 insertions(+) diff --git a/testcases/kernel/security/filecaps/filecapstest.sh b/testcases/kernel/security/filecaps/filecapstest.sh index 213b095..16b0055 100755

Re: [LTP] [PATCH V2] userns01: add capability verification

2015-07-03 Thread Yuan Sun
Hi Jan, The following link is unaccessible because HuaWei's network security strategy. Could you please attach the test.c file for me? http://fpaste.org/239445/35909330/ Thanks. Yuan On 2015/7/3 15:43, Jan Stancek wrote: - Original Message - From: Yuan Sun

Re: [LTP] [PATCH V2] userns01: add capability verification

2015-07-03 Thread Yuan Sun
+0800, Yuan Sun wrote: Hi Jan, The following link is unaccessible because HuaWei's network security strategy. Could you please attach the test.c file for me? http://fpaste.org/239445/35909330/ Was afraid my web email client would mangle it. Attached. Regards, Jan

Re: [LTP] [PATCH V2] userns01: add capability verification

2015-07-03 Thread Yuan Sun
Log is as follow. I am not clear if new feature is added. log: root@ubuntu:~# cat /proc/self/status | grep CapEff CapEff:001f On 2015/7/3 17:32, Jan Stancek wrote: - Original Message - From: Yuan Sun sunyu...@huawei.com To: Jan Stancek jstan...@redhat.com Cc: ltp

Re: [LTP] [PATCH] filecaps: Remove unnecessary c.c file.

2015-06-30 Thread Yuan Sun
I forgot to modify .gitignore file. Please see V2. On 2015/7/1 13:16, Yuan Sun wrote: The c.c file is the same as check_simple_capset.c except config.h is included in check_simple_capset.c. Moreover, it is not correct to use HAVE_SYS_CAPABILITY_H without including config.h. Signed-off

[LTP] [PATCH V2] filecaps: Remove unnecessary c.c file.

2015-06-30 Thread Yuan Sun
The c.c file is the same as check_simple_capset.c except config.h is included in check_simple_capset.c. Moreover, it is not correct to use HAVE_SYS_CAPABILITY_H without including config.h. Signed-off-by: Yuan Sun sunyu...@huawei.com --- testcases/kernel/security/filecaps/.gitignore | 1

[LTP] [PATCH] filecaps: Remove unnecessary c.c file.

2015-06-30 Thread Yuan Sun
The c.c file is the same as check_simple_capset.c except config.h is included in check_simple_capset.c. Moreover, it is not correct to use HAVE_SYS_CAPABILITY_H without including config.h. Signed-off-by: Yuan Sun sunyu...@huawei.com --- testcases/kernel/security/filecaps/c.c | 47

[LTP] [PATCH] containers: new testcase userns02 The user ID and group ID, which are inside a container, can be modified by its parent process.

2015-05-24 Thread Yuan Sun
Signed-off-by: Yuan Sun sunyu...@huawei.com --- runtest/containers| 1 + testcases/kernel/containers/.gitignore| 1 + testcases/kernel/containers/userns/userns02.c | 94 +++ 3 files changed, 96 insertions(+) create mode 100644

[LTP] [PATCH] define CLONE_NEWNS in case a standard library isn't installed.

2015-07-31 Thread Yuan Sun
Signed-off-by: Yuan Sun sunyu...@huawei.com --- testcases/kernel/containers/libclone/libclone.c | 2 +- testcases/kernel/containers/libclone/libclone.h | 6 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/testcases/kernel/containers/libclone/libclone.c b/testcases/kernel

Re: [LTP] [PATCH] containers: fix dev name in create_veth()

2015-08-12 Thread Yuan Sun
It looks fine to me. On 2015/8/12 10:43, Hangbin Liu wrote: The new version of iproute2 will show veth device like veth0@veth1, but we won't get a dev proc entry like this. Fix the dev name to avoid error like /proc/sys/net/ipv4/conf/veth0@veth1/proxy_arp: No such file or directory

Re: [LTP] [PATCH V3] container: new testcase pidns32

2015-08-17 Thread Yuan Sun
On 2015/8/17 21:33, Jan Stancek wrote: - Original Message - From: Yuan Sun sunyu...@huawei.com To: jstan...@redhat.com Cc: ltp-list@lists.sourceforge.net Sent: Friday, 14 August, 2015 10:17:24 AM Subject: [PATCH V3] container: new testcase pidns32 Kernel imposes a limit of 32

[LTP] [PATCH] containers: new testcase userns07

2015-08-20 Thread Yuan Sun
Signed-off-by: Yuan Sun sunyu...@huawei.com --- runtest/containers| 1 + testcases/kernel/containers/.gitignore| 1 + testcases/kernel/containers/userns/userns07.c | 133 ++ 3 files changed, 135 insertions(+) create mode 100644

Re: [LTP] [PATCH] Add capset_check_simple in runtest.

2015-08-18 Thread Yuan Sun
Hi Cyril, Thanks for your review. I will update codes according to your suggestion. Yuan On 2015/8/18 20:07, Cyril Hrubis wrote: Hi! +/**/ +/*

[LTP] [PATCH] Use parentgid to fix wrong parentuid parameters.

2015-08-18 Thread Yuan Sun
Signed-off-by: Yuan Sun sunyu...@huawei.com --- testcases/kernel/containers/userns/userns03.c | 4 ++-- testcases/kernel/containers/userns/userns06.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/testcases/kernel/containers/userns/userns03.c b/testcases/kernel

[LTP] [PATCH] Use cpuctl_test* as TCID for cpuctl_test*.c.

2015-08-18 Thread Yuan Sun
Signed-off-by: Yuan Sun sunyu...@huawei.com --- testcases/kernel/controllers/cpuctl/cpuctl_test01.c | 2 +- testcases/kernel/controllers/cpuctl/cpuctl_test02.c | 2 +- testcases/kernel/controllers/cpuctl/cpuctl_test03.c | 2 +- testcases/kernel/controllers/cpuctl/cpuctl_test04.c | 2 +- 4 files

Re: [LTP] [PATCH] define CLONE_NEWNS in case a standard library isn't installed.

2015-08-03 Thread Yuan Sun
Ok. I understand. Thanks you, Cyril. On 2015/8/3 22:54, Cyril Hrubis wrote: Hi! diff --git a/testcases/kernel/containers/libclone/libclone.h b/testcases/kernel/containers/libclone/libclone.h index 3a38bc9..60e9e54 100644 --- a/testcases/kernel/containers/libclone/libclone.h +++

[LTP] [PATCH V2] containers: new testcase userns05

2015-07-31 Thread Yuan Sun
A process created via fork(2) or clone(2) without the CLONE_NEWUSER flag is a member of the same user namespace as its parent. When unshare an user namespace, the calling process is moved into a new user namespace which is not shared with any previously existing process. Signed-off-by: Yuan

Re: [LTP] [PATCH V2] containers: new testcase userns05

2015-07-31 Thread Yuan Sun
I forgot to add .gitignore. Please ignore the patch. On 2015/7/31 14:17, Yuan Sun wrote: A process created via fork(2) or clone(2) without the CLONE_NEWUSER flag is a member of the same user namespace as its parent. When unshare an user namespace, the calling process is moved into a new

[LTP] [PATCH V2] containers: new testcase userns06

2015-07-31 Thread Yuan Sun
When a process with non-zero user IDs performs an execve(), the process's capability sets are cleared. When a process with zero user IDs performs an execve(), the process's capability sets are set. Signed-off-by: Yuan Sun sunyu...@huawei.com --- runtest/containers

[LTP] [PATCH V3] containers: new testcase userns05

2015-07-31 Thread Yuan Sun
A process created via fork(2) or clone(2) without the CLONE_NEWUSER flag is a member of the same user namespace as its parent. When unshare an user namespace, the calling process is moved into a new user namespace which is not shared with any previously existing process. Signed-off-by: Yuan

Re: [LTP] [PATCH] container: use tst_record_childstatus() in userns

2015-08-11 Thread Yuan Sun
Thank you, Jan. Yuan On 2015/8/11 15:43, Jan Stancek wrote: - Original Message - From: Yuan Sun sunyu...@huawei.com To: jstan...@redhat.com Cc: ltp-list@lists.sourceforge.net Sent: Friday, 7 August, 2015 7:04:00 AM Subject: [PATCH] container: use tst_record_childstatus

Re: [LTP] [PATCH V2] container: new testcase pidns32

2015-08-11 Thread Yuan Sun
Hi Jan, See in-line comments. On 2015/8/11 16:05, Jan Stancek wrote: - Original Message - From: Yuan Sun sunyu...@huawei.com To: jstan...@redhat.com Cc: ltp-list@lists.sourceforge.net Sent: Friday, 7 August, 2015 6:55:08 AM Subject: [PATCH V2] container: new testcase pidns32

Re: [LTP] [PATCH V2] container: new testcase pidns32

2015-08-11 Thread Yuan Sun
Hi Jan and Cyril, I have send a message in reply. What is your opinion? If you convinced about this test, I will update the code. Or it is unnecessary to update the code. Thanks. Yuan On 2015/8/11 16:33, Cyril Hrubis wrote: Hi! Hi, I'm still not entirely convinced about

[LTP] [PATCH] Add tst_wait_record_childstatus function.

2015-08-07 Thread Yuan Sun
Signed-off-by: Yuan Sun sunyu...@huawei.com --- doc/test-writing-guidelines.txt | 7 +++--- include/test.h| 2 ++ lib/tst_res.c | 31 +++ testcases/kernel/containers/userns/userns01.c | 13

[LTP] [PATCH V2] container: new testcase pidns32

2015-08-07 Thread Yuan Sun
Kernel imposes a limit of 32 nested levels of pid namespaces. Signed-off-by: Yuan Sun sunyu...@huawei.com --- runtest/containers | 1 + testcases/kernel/containers/pidns/.gitignore | 1 + testcases/kernel/containers/pidns/pidns32.c | 96

[LTP] [PATCH] container: use tst_record_childstatus() in userns

2015-08-07 Thread Yuan Sun
Signed-off-by: Yuan Sun sunyu...@huawei.com --- testcases/kernel/containers/userns/userns02.c | 14 +--- testcases/kernel/containers/userns/userns03.c | 24 ++--- testcases/kernel/containers/userns/userns04.c | 31 --- 3 files changed, 7 insertions

[LTP] [PATCH V3] container: new testcase pidns32

2015-08-14 Thread Yuan Sun
Kernel imposes a limit of 32 nested levels of pid namespaces. Signed-off-by: Yuan Sun sunyu...@huawei.com --- runtest/containers | 1 + testcases/kernel/containers/pidns/.gitignore | 1 + testcases/kernel/containers/pidns/pidns32.c | 103

Re: [LTP] [PATCH] Add tst_wait_record_childstatus function.

2015-08-10 Thread Yuan Sun
Hi Cyril, Yes. You are right. I agree with you. tst_record_childstatus(NULL, -1); can be used in userns01. Thank you. Yuan On 2015/8/10 20:28, Cyril Hrubis wrote: Hi! Signed-off-by: Yuan Sun sunyu...@huawei.com --- doc/test-writing-guidelines.txt | 7

[LTP] [PATCH] Use tst_record_childstatus function in userns01.

2015-08-10 Thread Yuan Sun
Signed-off-by: Yuan Sun sunyu...@huawei.com --- testcases/kernel/containers/userns/userns01.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/testcases/kernel/containers/userns/userns01.c b/testcases/kernel/containers/userns/userns01.c index ad5c52d..3c55f8a

Re: [LTP] [PATCH V2] container: new testcase pidns32

2015-08-11 Thread Yuan Sun
On 2015/8/11 21:58, Jan Stancek wrote: - Original Message - From: Yuan Sun sunyu...@huawei.com To: Jan Stancek jstan...@redhat.com Cc: ltp-list@lists.sourceforge.net Sent: Tuesday, 11 August, 2015 10:43:02 AM Subject: Re: [PATCH V2] container: new testcase pidns32 Hi Jan

Re: [LTP] [PATCH] Add tst_wait_record_childstatus function.

2015-08-11 Thread Yuan Sun
Thank you, Cyril. Yuan On 2015/8/11 20:44, Cyril Hrubis wrote: Hi! Yes. You are right. I agree with you. tst_record_childstatus(NULL, -1); can be used in userns01. FYI: I've just pushed a patch that adds note to the test-writing-guidelines documentation about this. Have a look at

Re: [LTP] [PATCH] container: new testcase pidns32

2015-08-06 Thread Yuan Sun
inaccessible for a few minutes with 4000 processes. Regards, Yuan On 2015/8/5 20:25, Jan Stancek wrote: - Original Message - From: Yuan Sun sunyu...@huawei.com To: jstan...@redhat.com Cc: ltp-list@lists.sourceforge.net Sent: Wednesday, 22 July, 2015 3:00:25 PM Subject: [PATCH

Re: [LTP] [PATCH V2] containers: new testcase userns06

2015-08-06 Thread Yuan Sun
Many thanks, Jan. On 2015/8/5 21:21, Jan Stancek wrote: - Original Message - From: Yuan Sun sunyu...@huawei.com To: jstan...@redhat.com Cc: ltp-list@lists.sourceforge.net Sent: Friday, 31 July, 2015 11:15:46 AM Subject: [PATCH V2] containers: new testcase userns06 When

[LTP] [PATCH] container: new testcase pidns32

2015-07-21 Thread Yuan Sun
Kernel imposes a limit of 32 nested levels of pid namespaces. Signed-off-by: Yuan Sun sunyu...@huawei.com --- testcases/kernel/containers/pidns/.gitignore | 1 + testcases/kernel/containers/pidns/pidns32.c | 113 +++ 2 files changed, 114 insertions(+) create mode

[LTP] [PATCH] A process created via fork(2) or clone(2) without the CLONE_NEWUSER flag is a member of the same user namespace as its parent. When unshare an user namespace, the calling process is move

2015-07-14 Thread Yuan Sun
Signed-off-by: Yuan Sun sunyu...@huawei.com --- runtest/containers| 1 + testcases/kernel/containers/.gitignore| 1 + testcases/kernel/containers/userns/userns05.c | 167 ++ 3 files changed, 169 insertions(+) create mode 100644

Re: [LTP] [PATCH] Add check_simple_capset in filecapstest.sh.

2015-07-14 Thread Yuan Sun
See in-line comment. On 2015/7/14 17:40, Cyril Hrubis wrote: Hi! +echo testing for simple capset +check_simple_capset +tmp=$? +if [ $tmp -ne 0 ]; then +exit_code=$tmp +fi Rather than adding to the script, can we split it so that each of the binaries can be run separately and that we

Re: [LTP] [PATCH] Writing deny to the /proc/[pid]/setgroups file before writing to /proc/[pid]/gid_map.

2015-07-16 Thread Yuan Sun
Hi Jan, Many thanks for adding commit message. Best regard. Yuan On 2015/7/16 16:56, Jan Stancek wrote: - Original Message - From: Yuan Sun sunyu...@huawei.com To: jstan...@redhat.com Cc: ltp-list@lists.sourceforge.net Sent: Friday, 10 July, 2015 7:16:25 PM Subject

[LTP] [PATCH] containers: new testcase userns05

2015-07-14 Thread Yuan Sun
A process created via fork(2) or clone(2) without the CLONE_NEWUSER flag is a member of the same user namespace as its parent. When unshare an user namespace, the calling process is moved into a new user namespace which is not shared with any previously existing process. Signed-off-by: Yuan

Re: [LTP] [PATCH] A process created via fork(2) or clone(2) without the CLONE_NEWUSER flag is a member of the same user namespace as its parent. When unshare an user namespace, the calling process is

2015-07-14 Thread Yuan Sun
: Add userns05 A process created via fork(2) or clone(2) without the CLONE_NEWUSER flag is a member of the same user namespace as its parent. ... Signed-off-by: Yuan Sun sunyu...@huawei.com Signed-off-by: Yuan Sun sunyu...@huawei.com --- runtest/containers| 1

[LTP] [PATCH] Writing deny to the /proc/[pid]/setgroups file before writing to /proc/[pid]/gid_map.

2015-07-10 Thread Yuan Sun
Signed-off-by: Yuan Sun sunyu...@huawei.com --- testcases/kernel/containers/userns/userns03.c | 77 +-- 1 file changed, 38 insertions(+), 39 deletions(-) diff --git a/testcases/kernel/containers/userns/userns03.c b/testcases/kernel/containers/userns/userns03.c index

Re: [LTP] [PATCH] containers: new testcase userns07

2015-09-08 Thread Yuan Sun
Thank you, Jan. On 2015/9/8 15:48, Jan Stancek wrote: > > - Original Message - >> From: "Yuan Sun" <sunyu...@huawei.com> >> To: jstan...@redhat.com >> Cc: ltp-list@lists.sourceforge.net >> Sent: Thursday, 20 August, 2015 9:20:53 AM >>