[LTP] [PATCH 1/3] syscalls/mq_timedreceive: Add check data returned from mq_timedreceive

Cyril Hrubis chrubis@suse.cz
Tue Jun 6 15:58:08 CEST 2017


Hi!
> +	for (j = 0; j < tc->len; j++) {
> +		if (rmsg[j] != smsg[j]) {
> +			tst_res(TFAIL | TTERRNO, "mq_timedreceive wrong data in loop %d returned %d, expected %d",

Let's keep the messages short and to the point, something as:

			tst_res(TFAIL,
				"mq_timedreceive(): wrong data %i at %u, expected %i",
				rmsg[j], j, smsg[j]);

And also we should drop the TTERRNO since it's uninitialized in this
case.


Otherwise it's fine.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list