SMP users needed to test patch

Stathis Kamperis ekamperi at
Wed Nov 4 19:37:19 PST 2009

> Oh, t_mq_send failed at line 56 after raising kern.mqueue.mq_prio_max to 200,
> but if I put it back to default (32), the test passes. Is it expected too?
Thanks for discovering a double defect :)

First, my test case uses the MQ_PRIO_MAX constant (default 32) as
defined in sys/mqueue.h to figure out the largest possible value for
message queue priorities.

This is wrong.
It should get the value via sysconf() and _SC_MQ_PRIO_MAX. That said,
when you set max priorities to 200, the test assumed that 32 was the
largest possible value and that 2*32 would certainly be an invalid
priority value. And it expected mq_send(..., 64); to fail, which it
didn't since the real upper value for priorities was 200. When you
restored the limit to its default value, 64 was a "legitimate invalid"
value and the test passed.

Second, we don't expose the real values for MQ_OPEN_MAX, MQ_PRIO_MAX

I'll fix both of them tomorrow.

> Cheers.

Thanks, for once more.

Best regards,
Stathis Kamperis

More information about the Kernel mailing list