[PATCH NPTL] fix tst-mqueue1.c testcase producing and hang
Carmelo Amoroso
carmelo73 at gmail.com
Mon May 28 05:50:11 PDT 2007
Carmelo Amoroso wrote:
> Carmelo Amoroso wrote:
>> Hi Steve, All
>> running test suite for our uClibc-nptl/sh4 we found a bug into
>> tst-mqueue1.c test (this has been already fixed in glibc-cvs).
>> This patch solve the bug and sync the test with glibc version.
>>
>> Regards,
>> Carmelo
>>
> Sorry, forgot to attach the patch :-)
>
Hi Steve,
before any kind of merging, may be useful to apply this
into nptl branch.
Carmelo
>
> ------------------------------------------------------------------------
>
> --- tst-mqueue1.c.old 2007-04-06 13:23:05.000000000 +0200
> +++ tst-mqueue1.c 2007-04-06 13:19:55.000000000 +0200
> @@ -72,7 +72,7 @@
> {
> int result = 0;
>
> - char v []
> + unsigned char v []
> = { 0x32, 0x62, 0x22, 0x31, 0x11, 0x73, 0x61, 0x21, 0x72, 0x71, 0x81 };
>
> struct mq_attr attr;
> @@ -208,8 +208,9 @@
> for (int i = 0; i < 10; ++i)
> {
> if (i & 1)
> - rets = mq_receive (q, (char *) &vr[i], 1, &prio);
> - rets = mq_timedreceive (q, (char *) &vr[i], 1, &prio, &ts);
> + rets = mq_receive (q, &vr[i], 1, &prio);
> + else
> + rets = mq_timedreceive (q, &vr[i], 1, &prio, &ts);
>
> if (rets != 1)
> {
> @@ -235,7 +236,7 @@
> result = 1;
> }
>
> - rets = mq_timedreceive (q, (char *) &vr[10], 1, &prio, &ts);
> + rets = mq_timedreceive (q, &vr[10], 1, &prio, &ts);
> if (rets != -1)
> {
> puts ("mq_timedreceive on empty queue did not fail");
> @@ -250,7 +251,7 @@
>
> if (nonblock)
> {
> - ret = mq_receive (q, (char *) &vr[10], 1, &prio);
> + ret = mq_receive (q, &vr[10], 1, &prio);
> if (ret != -1)
> {
> puts ("mq_receive on empty non-blocking queue did not fail");
More information about the uClibc
mailing list