[LTP] [PATCH 1/2] msgrcv07: Check negative msg type filters

Richard Palethorpe rpalethorpe@suse.de
Fri Sep 24 12:30:52 CEST 2021


Hello Petr,

Petr Vorel <pvorel@suse.cz> writes:

> Hi Richie,
>
> ...
>> +++ b/testcases/kernel/syscalls/ipc/msgrcv/msgrcv07.c
>> @@ -232,6 +232,13 @@ static void test_negative_msgtyp(void)
>>  			"-msgtyp didn't get the first message in the queue with the lowest type");
>>  	}
>
>> +	TST_EXP_FAIL(msgrcv(queue_id, &rcv_buf, MSGSIZE, -MSGTYPE1, IPC_NOWAIT),
>> +		     ENOMSG,
>> +		     "-msgtype didn't recv next lowest msg");
>> +	TST_EXP_FAIL(msgrcv(queue_id, &rcv_buf, MSGSIZE, -MSGTYPE1, MSG_EXCEPT | IPC_NOWAIT),
>> +		     ENOMSG,
>> +		     "-msgtype (with except) didn't recv next lowest msg");
> nit: I'd use msgtyp instead of msgtype (although it looks like typo, it's used
> without 'e' as a parametr name in man msgop(2) and also throughout this test
> (obviously can be changed during merge).

Sure, sounds good.

>
> Kind regards,
> Petr


-- 
Thank you,
Richard.


More information about the ltp mailing list