[LTP] [PATCH v4] Refactor pidns30 test using new LTP API

Andrea Cervesato andrea.cervesato@suse.com
Fri Feb 10 15:18:32 CET 2023


Hi,

On 2/10/23 14:16, Cyril Hrubis wrote:
> Hi!
>> +static void run(void)
>>   {
>> -	int status;
>> -	char buf[5];
>> -	pid_t cpid;
>> +	const struct tst_clone_args args = { CLONE_NEWPID, SIGCHLD };
>>   
>> -	setup();
>> +	remove_mqueue(mqd);
>> +	received = 0;
> I wonder if we really need to clear the flag here, as far as I can see
> we only modify that variable in the child process and that shouldn't
> propagate to parent, unless we pass CLONE_VM of course.
Flag reset has been added to be 100% sure we are receiving the signal on 
-i > 1.
>
> Other than this it looks really good:
>
> Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
>
Andrea



More information about the ltp mailing list