[LTP] [PATCH v5 4/6] Refactor mqns_04 using new LTP API

Andrea Cervesato andrea.cervesato@suse.com
Fri Mar 3 09:45:52 CET 2023


Hi Petr,

On 3/3/23 10:16, Petr Vorel wrote:
> Hi Andrea,
>
> +++ b/testcases/kernel/containers/mqns/mqns_04.c
> ...
>> +	tst_res(TINFO, "Try to create %s from parent", mqueue2);
>> -	mkdir(DEV_MQUEUE2, 0755);
>> +	TST_EXP_FAIL(creat(mqueue2, 0755), EACCES);
> OK, you created MQNAME2 (asked by Richie in v4).
>
>> +	if (!TST_PASS)
>> +		tst_atomic_inc(mq_freed2);
>> -	tst_resm(TINFO, "Checking mqueue filesystem lifetime");
>> +	SAFE_UMOUNT(devdir);
>> +}
> I suppose it does not make sense to spawn plain process as it's done in
> mqns_03.c, right?
Indeed, we don't need plain process and we could just use unshare/clone
> Maybe it'd be worth to mention clone and unshare modes in [Description].
>
> Reviewed-by: Petr Vorel <pvorel@suse.cz>
>
> Kind regards,
> Petr




More information about the ltp mailing list