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

Petr Vorel pvorel@suse.cz
Fri Sep 24 12:26:50 CEST 2021


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).

Kind regards,
Petr


More information about the ltp mailing list