All of lore.kernel.org
 help / color / mirror / Atom feed
* Does the mq_timedreceive() fully implement the POSIX specification?
@ 2012-02-13  2:30 K K
  2012-02-13  8:51   ` Bernd Petrovitsch
  0 siblings, 1 reply; 7+ messages in thread
From: K K @ 2012-02-13  2:30 UTC (permalink / raw)
  To: kernelnewbies

Hi All,

I am doing POSIX test on linux. And for mq_timedreceive() in POSIX spec
2008 Issue 7, Line 43787:

  The validity of the abstime parameter need not be checked if a
  message can be removed from the message queue immediately.

But when I run test case mq_timedreceive/10-2 of POSIX suite (can be viewed
at :
http://ltp.git.sourceforge.net/git/gitweb.cgi?p=ltp/ltp.git;a=blob;f=testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/10-2.c;h=49ee4f243fc5046a965a551650d8697217faac35;hb=HEAD),
mq_timedreceive() could get the message without wait, but the timeout is
still validated.

Do we intend to do so, or the implementation needs update?

Thanks and Regards,
Kai
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120213/49dae0ba/attachment.html 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Does the mq_timedreceive() fully implement the POSIX specification?
  2012-02-13  2:30 Does the mq_timedreceive() fully implement the POSIX specification? K K
@ 2012-02-13  8:51   ` Bernd Petrovitsch
  0 siblings, 0 replies; 7+ messages in thread
From: Bernd Petrovitsch @ 2012-02-13  8:51 UTC (permalink / raw)
  To: K K; +Cc: kernelnewbies, linux-kernel

Hi!

On Mon, 2012-02-13 at 10:30 +0800, K K wrote:
[....]
> I am doing POSIX test on linux. And for mq_timedreceive() in POSIX spec
> 2008 Issue 7, Line 43787:
> 
>   The validity of the abstime parameter need not be checked if a
>   message can be removed from the message queue immediately.
> 
> But when I run test case mq_timedreceive/10-2 of POSIX suite (can be viewed
> at :
> http://ltp.git.sourceforge.net/git/gitweb.cgi?p=ltp/ltp.git;a=blob;f=testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/10-2.c;h=49ee4f243fc5046a965a551650d8697217faac35;hb=HEAD),
> mq_timedreceive() could get the message without wait, but the timeout is
> still validated.
> 
> Do we intend to do so, or the implementation needs update?

I'm not a native English speaker but there is IMHO no problem as the
above quoted part of POSIX simply does not require the check in that
case. But it doesn't forbid the check.

	Bernd
-- 
Bernd Petrovitsch                  Email : bernd@petrovitsch.priv.at
                     LUGA : http://www.luga.at


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Does the mq_timedreceive() fully implement the POSIX specification?
@ 2012-02-13  8:51   ` Bernd Petrovitsch
  0 siblings, 0 replies; 7+ messages in thread
From: Bernd Petrovitsch @ 2012-02-13  8:51 UTC (permalink / raw)
  To: kernelnewbies

Hi!

On Mon, 2012-02-13 at 10:30 +0800, K K wrote:
[....]
> I am doing POSIX test on linux. And for mq_timedreceive() in POSIX spec
> 2008 Issue 7, Line 43787:
> 
>   The validity of the abstime parameter need not be checked if a
>   message can be removed from the message queue immediately.
> 
> But when I run test case mq_timedreceive/10-2 of POSIX suite (can be viewed
> at :
> http://ltp.git.sourceforge.net/git/gitweb.cgi?p=ltp/ltp.git;a=blob;f=testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/10-2.c;h=49ee4f243fc5046a965a551650d8697217faac35;hb=HEAD),
> mq_timedreceive() could get the message without wait, but the timeout is
> still validated.
> 
> Do we intend to do so, or the implementation needs update?

I'm not a native English speaker but there is IMHO no problem as the
above quoted part of POSIX simply does not require the check in that
case. But it doesn't forbid the check.

	Bernd
-- 
Bernd Petrovitsch                  Email : bernd at petrovitsch.priv.at
                     LUGA : http://www.luga.at

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Does the mq_timedreceive() fully implement the POSIX specification?
  2012-02-13  8:51   ` Bernd Petrovitsch
  (?)
@ 2012-02-14  2:07   ` K K
  2012-02-14  6:44     ` K K
  -1 siblings, 1 reply; 7+ messages in thread
From: K K @ 2012-02-14  2:07 UTC (permalink / raw)
  To: kernelnewbies

Hi Bernd,

On Mon, Feb 13, 2012 at 4:51 PM, Bernd Petrovitsch <
bernd@petrovitsch.priv.at> wrote:

> Hi!
>
> On Mon, 2012-02-13 at 10:30 +0800, K K wrote:
> [....]
> > I am doing POSIX test on linux. And for mq_timedreceive() in POSIX spec
> > 2008 Issue 7, Line 43787:
> >
> >   The validity of the abstime parameter need not be checked if a
> >   message can be removed from the message queue immediately.
> >
> > But when I run test case mq_timedreceive/10-2 of POSIX suite (can be
> viewed
> > at :
> >
> http://ltp.git.sourceforge.net/git/gitweb.cgi?p=ltp/ltp.git;a=blob;f=testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/10-2.c;h=49ee4f243fc5046a965a551650d8697217faac35;hb=HEAD
> ),
> > mq_timedreceive() could get the message without wait, but the timeout is
> > still validated.
> >
> > Do we intend to do so, or the implementation needs update?
>
> I'm not a native English speaker but there is IMHO no problem as the
> above quoted part of POSIX simply does not require the check in that
> case. But it doesn't forbid the check.
>

That's my misunderstanding.
Thanks for your reply.

Regards,
Kai



>
>        Bernd
> --
> Bernd Petrovitsch                  Email : bernd at petrovitsch.priv.at
>                     LUGA : http://www.luga.at
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120214/b84a6c39/attachment.html 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Does the mq_timedreceive() fully implement the POSIX specification?
  2012-02-14  2:07   ` K K
@ 2012-02-14  6:44     ` K K
  2012-02-14 12:27         ` Bernd Petrovitsch
  0 siblings, 1 reply; 7+ messages in thread
From: K K @ 2012-02-14  6:44 UTC (permalink / raw)
  To: kernelnewbies

Hi Bernd,



On Tue, Feb 14, 2012 at 10:07 AM, K K <knewsgroup@gmail.com> wrote:

> Hi Bernd,
>
> On Mon, Feb 13, 2012 at 4:51 PM, Bernd Petrovitsch <
> bernd at petrovitsch.priv.at> wrote:
>
>> Hi!
>>
>> On Mon, 2012-02-13 at 10:30 +0800, K K wrote:
>> [....]
>> > I am doing POSIX test on linux. And for mq_timedreceive() in POSIX spec
>> > 2008 Issue 7, Line 43787:
>> >
>> >   The validity of the abstime parameter need not be checked if a
>> >   message can be removed from the message queue immediately.
>> >
>>
>
Sorry about that I miss the previous sentence, the whole paragraph is:

Under no circumstance shall the operation fail with a timeout if a message
can be removed from
the message queue immediately. The validity of the abstime parameter need
not be checked if a
message can be removed from the message queue immediately.

It seems that the first sentence is more affirmative that the timeout
should not be checked when a message can be removed from message queue
immediately.
How do you think?

Thanks,
Kai
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120214/79ee90d5/attachment.html 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Does the mq_timedreceive() fully implement the POSIX specification?
  2012-02-14  6:44     ` K K
@ 2012-02-14 12:27         ` Bernd Petrovitsch
  0 siblings, 0 replies; 7+ messages in thread
From: Bernd Petrovitsch @ 2012-02-14 12:27 UTC (permalink / raw)
  To: K K; +Cc: linux-kernel, kernelnewbies, adam.li

Hi!

[ also Cc: the email address on the top on the test case. Therefore
self-quoting for the rest of the thread. ]

On Mon, 2012-02-13 at 09:51 +0100, Bernd Petrovitsch wrote:
> On Mon, 2012-02-13 at 10:30 +0800, K K wrote:
> [....]
> > I am doing POSIX test on linux. And for mq_timedreceive() in POSIX spec
> > 2008 Issue 7, Line 43787:
> > 
> >   The validity of the abstime parameter need not be checked if a
> >   message can be removed from the message queue immediately.
> > 
> > But when I run test case mq_timedreceive/10-2 of POSIX suite (can be viewed
> > at :
> > http://ltp.git.sourceforge.net/git/gitweb.cgi?p=ltp/ltp.git;a=blob;f=testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/10-2.c;h=49ee4f243fc5046a965a551650d8697217faac35;hb=HEAD),
> > mq_timedreceive() could get the message without wait, but the timeout is
> > still validated.
> > 
> > Do we intend to do so, or the implementation needs update?
> 
> I'm not a native English speaker but there is IMHO no problem as the
> above quoted part of POSIX simply does not require the check in that
> case. But it doesn't forbid the check.

On Die, 2012-02-14 at 14:44 +0800, K K wrote:
[...]
> Under no circumstance shall the operation fail with a timeout if a message
> can be removed from
> the message queue immediately. The validity of the abstime parameter need
> not be checked if a
> message can be removed from the message queue immediately.
> 
> It seems that the first sentence is more affirmative that the timeout
> should not be checked when a message can be removed from message queue
> immediately.
> How do you think?

Well, and the sys-call actually does not fail with a *timeout* - which
is indicated with a return value == -1 and errno == ETIMEDOUT if I read
http://pubs.opengroup.org/onlinepubs/009695399/functions/mq_receive.html
correctly - but with some another error - return value == -1 and errno
== EINVAL.
So the first quoted sentence actually doesn't apply IMHO.

The test description in the second comment on 
http://ltp.git.sourceforge.net/git/gitweb.cgi?p=ltp/ltp.git;a=blob;f=testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/10-2.c;h=49ee4f243fc5046a965a551650d8697217faac35;hb=HEAD
reparaphrases the above quoted part incorrectly IMHO. The test
implements the description at the top though.


	Bernd
-- 
Bernd Petrovitsch                  Email : bernd@petrovitsch.priv.at
                     LUGA : http://www.luga.at


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Does the mq_timedreceive() fully implement the POSIX specification?
@ 2012-02-14 12:27         ` Bernd Petrovitsch
  0 siblings, 0 replies; 7+ messages in thread
From: Bernd Petrovitsch @ 2012-02-14 12:27 UTC (permalink / raw)
  To: kernelnewbies

Hi!

[ also Cc: the email address on the top on the test case. Therefore
self-quoting for the rest of the thread. ]

On Mon, 2012-02-13 at 09:51 +0100, Bernd Petrovitsch wrote:
> On Mon, 2012-02-13 at 10:30 +0800, K K wrote:
> [....]
> > I am doing POSIX test on linux. And for mq_timedreceive() in POSIX spec
> > 2008 Issue 7, Line 43787:
> > 
> >   The validity of the abstime parameter need not be checked if a
> >   message can be removed from the message queue immediately.
> > 
> > But when I run test case mq_timedreceive/10-2 of POSIX suite (can be viewed
> > at :
> > http://ltp.git.sourceforge.net/git/gitweb.cgi?p=ltp/ltp.git;a=blob;f=testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/10-2.c;h=49ee4f243fc5046a965a551650d8697217faac35;hb=HEAD),
> > mq_timedreceive() could get the message without wait, but the timeout is
> > still validated.
> > 
> > Do we intend to do so, or the implementation needs update?
> 
> I'm not a native English speaker but there is IMHO no problem as the
> above quoted part of POSIX simply does not require the check in that
> case. But it doesn't forbid the check.

On Die, 2012-02-14 at 14:44 +0800, K K wrote:
[...]
> Under no circumstance shall the operation fail with a timeout if a message
> can be removed from
> the message queue immediately. The validity of the abstime parameter need
> not be checked if a
> message can be removed from the message queue immediately.
> 
> It seems that the first sentence is more affirmative that the timeout
> should not be checked when a message can be removed from message queue
> immediately.
> How do you think?

Well, and the sys-call actually does not fail with a *timeout* - which
is indicated with a return value == -1 and errno == ETIMEDOUT if I read
http://pubs.opengroup.org/onlinepubs/009695399/functions/mq_receive.html
correctly - but with some another error - return value == -1 and errno
== EINVAL.
So the first quoted sentence actually doesn't apply IMHO.

The test description in the second comment on 
http://ltp.git.sourceforge.net/git/gitweb.cgi?p=ltp/ltp.git;a=blob;f=testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/10-2.c;h=49ee4f243fc5046a965a551650d8697217faac35;hb=HEAD
reparaphrases the above quoted part incorrectly IMHO. The test
implements the description at the top though.


	Bernd
-- 
Bernd Petrovitsch                  Email : bernd at petrovitsch.priv.at
                     LUGA : http://www.luga.at

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-02-14 12:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-13  2:30 Does the mq_timedreceive() fully implement the POSIX specification? K K
2012-02-13  8:51 ` Bernd Petrovitsch
2012-02-13  8:51   ` Bernd Petrovitsch
2012-02-14  2:07   ` K K
2012-02-14  6:44     ` K K
2012-02-14 12:27       ` Bernd Petrovitsch
2012-02-14 12:27         ` Bernd Petrovitsch

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.