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

Petr Vorel
2021-09-24T10:27:06Z

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