public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: ltp-list@lists.sourceforge.net
Subject: [LTP] aio_error/3-1.c
Date: Mon, 25 Oct 2010 22:59:15 +0200	[thread overview]
Message-ID: <20101025205915.GD3003@saboteur.suse.cz> (raw)

Hi!
I've been reading POSIX documentation for some time now and even reading
glibc source code and the result is that aio_error/3-1.c doesn't test
anyting and should be removed.

The test is trying to assert EINVAL from aio_error accordingly to:

http://www.opengroup.org/onlinepubs/009695399/functions/aio_error.html

...

The aio_error() function may fail if:

	[EINVAL]
            The aiocbp argument does not refer to an asynchronous
	    operation whose return status has not yet been retrieved.

...


As far as I understand this, it's says you may get EINVAL if you call
aio_error() on finished aiocb second (and more) times.

This is implemented on linux as "return aiocb->__error_code" so IMHO
there is no way to test this.

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

             reply	other threads:[~2010-10-25 20:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-25 20:59 Cyril Hrubis [this message]
     [not found] ` <AANLkTinUHQ6EUWi3ZhkuO0Ccd2FSSsLm6DiQpM=bZKcB@mail.gmail.com>
2010-10-26 16:16   ` [LTP] aio_error/3-1.c Cyril Hrubis
     [not found]     ` <AANLkTikO=yKXhxx7giTYBMM1uerYzEj3Uj+gWY42kg3Q@mail.gmail.com>
     [not found]       ` <AANLkTi=2bCEpmjmikx4mUZFE_fBNEz-jP+jsK2He3QF-@mail.gmail.com>
2010-10-27 12:38         ` Cyril Hrubis
     [not found]           ` <AANLkTi=Fm_ZwOGFUf6+6J8GLqcPigkX=c6UzBMWnSrvi@mail.gmail.com>
2010-10-29 11:24             ` Cyril Hrubis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101025205915.GD3003@saboteur.suse.cz \
    --to=chrubis@suse.cz \
    --cc=ltp-list@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox