zdtm: Add SIGCHLD flag to userns-leaked-sock test

Submitted by Kirill Tkhai on June 29, 2017, 12:19 p.m.

Details

Message ID 149873874950.24582.7750015375045902081.stgit@localhost.localdomain
State Accepted
Series "zdtm: Add SIGCHLD flag to userns-leaked-sock test"
Commit dca7861634343360a8c8fe5bbc28e647c716152f
Headers show

Commit Message

Kirill Tkhai June 29, 2017, 12:19 p.m.
wait() waits children created using SIGCHLD signal only.
Add it.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
 test/zdtm/static/userns-leaked-sock.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/test/zdtm/static/userns-leaked-sock.c b/test/zdtm/static/userns-leaked-sock.c
index 8a84efe6a..673eb9088 100644
--- a/test/zdtm/static/userns-leaked-sock.c
+++ b/test/zdtm/static/userns-leaked-sock.c
@@ -127,7 +127,7 @@  int main(int argc, char **argv)
 
 	{
 		char stack;
-		pid = clone(child_fn, &stack - 256, CLONE_NEWUSER|CLONE_NEWNET|CLONE_NEWPID, (void *)(long)sk);
+		pid = clone(child_fn, &stack - 256, CLONE_NEWUSER|CLONE_NEWNET|CLONE_NEWPID|SIGCHLD, (void *)(long)sk);
 		if (pid == -1) {
 			fail("clone");
 			return 1;

Comments

Andrey Vagin June 30, 2017, 12:44 a.m.
Applied, thanks
On Thu, Jun 29, 2017 at 03:19:13PM +0300, Kirill Tkhai wrote:
> wait() waits children created using SIGCHLD signal only.
> Add it.
> 
> Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
> ---
>  test/zdtm/static/userns-leaked-sock.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/test/zdtm/static/userns-leaked-sock.c b/test/zdtm/static/userns-leaked-sock.c
> index 8a84efe6a..673eb9088 100644
> --- a/test/zdtm/static/userns-leaked-sock.c
> +++ b/test/zdtm/static/userns-leaked-sock.c
> @@ -127,7 +127,7 @@ int main(int argc, char **argv)
>  
>  	{
>  		char stack;
> -		pid = clone(child_fn, &stack - 256, CLONE_NEWUSER|CLONE_NEWNET|CLONE_NEWPID, (void *)(long)sk);
> +		pid = clone(child_fn, &stack - 256, CLONE_NEWUSER|CLONE_NEWNET|CLONE_NEWPID|SIGCHLD, (void *)(long)sk);
>  		if (pid == -1) {
>  			fail("clone");
>  			return 1;
>