Garrett,

now they are both wrong.

diff --git a/testcases/kernel/controllers/memcg/functional/memcg_process.c 
b/testcases/kernel/controllers/memcg/functional/memcg_proce
index 4ba212f..4f8c257 100644
--- a/testcases/kernel/controllers/memcg/functional/memcg_process.c
+++ b/testcases/kernel/controllers/memcg/functional/memcg_process.c
@@ -299,11 +299,11 @@ int main(int argc, char *argv[])
        memset(&sigusr_action, 0, sizeof(sigusr_action));
 
        /* TODO: add error handling below. */
-       sigemptyset(&sigusr_action.sa_mask);
+       sigemptyset(&sigint_action.sa_mask);
        sigint_action.sa_handler = &sigint_handler;
        sigaction(SIGINT, &sigint_action, NULL);
 
-       sigemptyset(&sigint_action.sa_mask);
+       sigemptyset(&sigusr_action.sa_mask);
        sigusr_action.sa_handler = &sigusr_handler;
        sigaction(SIGUSR1, &sigusr_action, NULL);

Regards,
Jan

----- Original Message -----
From: "Garrett Cooper" <[email protected]>
To: "Jan Stancek" <[email protected]>
Cc: [email protected], "Jeffrey Burke" <[email protected]>
Sent: Thursday, April 14, 2011 3:15:27 PM
Subject: Re: [LTP] [PATCH] memcg_process.c: signals initialization

On Thu, Apr 14, 2011 at 4:44 AM, Jan Stancek <[email protected]> wrote:
> 1. There seems to be copy paste error, instead of clearing
> sigusr_action.sa_mask it clears sigint_action.sa_mask.
> Change comes from 6c4d1c6d4b3c116ff88f9209b4860940fb8659a8
>
> 2. Other fields of these structures are left to be uninitialized.
>
> Both 1) and 2) make the behaviour unexpected. Occasionally I saw,
> this program to end upon receiving SIGUSR1.

Committed -- thanks!
-Garrett

------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload 
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve 
application availability and disaster protection. Learn more about boosting 
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to