* [LTP] [FIX PATCH] POSIX aio_write/8-2.c
@ 2009-06-12 13:40 naresh kamboju
2009-06-15 19:15 ` Subrata Modak
0 siblings, 1 reply; 2+ messages in thread
From: naresh kamboju @ 2009-06-12 13:40 UTC (permalink / raw)
To: ltp-list; +Cc: maxin john, brinda_mn, rohit.170309, naresh.kernel
[-- Attachment #1: Type: text/plain, Size: 1301 bytes --]
Hi,
I have noticed failures under
testcases/open_posix_testsuite/conformance/interfaces/aio_write/8-2.c
and fixed.
Please find the patch below and as attachment.
Best regards
Naresh Kamboju
Signed-off-by: Naresh Kamboju < naresh.kernel@gmail.com >
diff -Naurb a/testcases/open_posix_testsuite/conformance/interfaces/aio_write/8-2.c
b/testcases/open_posix_testsuite/conformance/interfaces/aio_write/8-2.c
--- a/testcases/open_posix_testsuite/conformance/interfaces/aio_write/8-2.c 2009-06-12
18:10:32.000000000 +0530
+++ b/testcases/open_posix_testsuite/conformance/interfaces/aio_write/8-2.c 2009-06-12
18:00:21.000000000 +0530
@@ -42,6 +42,7 @@
char buf[BUF_SIZE];
int fd;
struct aiocb aiocb;
+ int ret=0;
#if _POSIX_ASYNCHRONOUS_IO != 200112L
exit(PTS_UNSUPPORTED);
@@ -67,13 +68,21 @@
aiocb.aio_buf = buf;
aiocb.aio_nbytes = BUF_SIZE;
- if (aio_write(&aiocb) != -1)
+ /*
+ * EBADF is encountered at a later stage
+ * and should be collected by aio_error()
+ */
+
+ if (aio_write(&aiocb) != 0)
{
printf(TNAME " bad aio_write return value()\n");
exit(PTS_FAIL);
}
- if (errno != EBADF)
+ while (aio_error(&aiocb) == EINPROGRESS);
+ ret = aio_error(&aiocb);
+
+ if (ret != EBADF)
{
printf(TNAME " errno is not EBADF %s\n", strerror(errno));
exit(PTS_FAIL);
[-- Attachment #2: ltp-posix-aio_write_8-2.patch --]
[-- Type: application/octet-stream, Size: 1052 bytes --]
diff -Naurb a/testcases/open_posix_testsuite/conformance/interfaces/aio_write/8-2.c b/testcases/open_posix_testsuite/conformance/interfaces/aio_write/8-2.c
--- a/testcases/open_posix_testsuite/conformance/interfaces/aio_write/8-2.c 2009-06-12 18:10:32.000000000 +0530
+++ b/testcases/open_posix_testsuite/conformance/interfaces/aio_write/8-2.c 2009-06-12 18:00:21.000000000 +0530
@@ -42,6 +42,7 @@
char buf[BUF_SIZE];
int fd;
struct aiocb aiocb;
+ int ret=0;
#if _POSIX_ASYNCHRONOUS_IO != 200112L
exit(PTS_UNSUPPORTED);
@@ -67,13 +68,21 @@
aiocb.aio_buf = buf;
aiocb.aio_nbytes = BUF_SIZE;
- if (aio_write(&aiocb) != -1)
+ /*
+ * EBADF is encountered at a later stage
+ * and should be collected by aio_error()
+ */
+
+ if (aio_write(&aiocb) != 0)
{
printf(TNAME " bad aio_write return value()\n");
exit(PTS_FAIL);
}
- if (errno != EBADF)
+ while (aio_error(&aiocb) == EINPROGRESS);
+ ret = aio_error(&aiocb);
+
+ if (ret != EBADF)
{
printf(TNAME " errno is not EBADF %s\n", strerror(errno));
exit(PTS_FAIL);
[-- Attachment #3: Type: text/plain, Size: 332 bytes --]
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
[-- Attachment #4: Type: text/plain, Size: 155 bytes --]
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [LTP] [FIX PATCH] POSIX aio_write/8-2.c
2009-06-12 13:40 [LTP] [FIX PATCH] POSIX aio_write/8-2.c naresh kamboju
@ 2009-06-15 19:15 ` Subrata Modak
0 siblings, 0 replies; 2+ messages in thread
From: Subrata Modak @ 2009-06-15 19:15 UTC (permalink / raw)
To: naresh kamboju; +Cc: ltp-list, maxin john, brinda_mn, rohit.170309
On Fri, 2009-06-12 at 19:10 +0530, naresh kamboju wrote:
> Hi,
>
> I have noticed failures under
> testcases/open_posix_testsuite/conformance/interfaces/aio_write/8-2.c
> and fixed.
> Please find the patch below and as attachment.
>
> Best regards
> Naresh Kamboju
>
> Signed-off-by: Naresh Kamboju < naresh.kernel@gmail.com >
Done.
Regards--
Subrata
>
>
> diff -Naurb a/testcases/open_posix_testsuite/conformance/interfaces/aio_write/8-2.c
> b/testcases/open_posix_testsuite/conformance/interfaces/aio_write/8-2.c
> --- a/testcases/open_posix_testsuite/conformance/interfaces/aio_write/8-2.c 2009-06-12
> 18:10:32.000000000 +0530
> +++ b/testcases/open_posix_testsuite/conformance/interfaces/aio_write/8-2.c 2009-06-12
> 18:00:21.000000000 +0530
> @@ -42,6 +42,7 @@
> char buf[BUF_SIZE];
> int fd;
> struct aiocb aiocb;
> + int ret=0;
>
> #if _POSIX_ASYNCHRONOUS_IO != 200112L
> exit(PTS_UNSUPPORTED);
> @@ -67,13 +68,21 @@
> aiocb.aio_buf = buf;
> aiocb.aio_nbytes = BUF_SIZE;
>
> - if (aio_write(&aiocb) != -1)
> + /*
> + * EBADF is encountered at a later stage
> + * and should be collected by aio_error()
> + */
> +
> + if (aio_write(&aiocb) != 0)
> {
> printf(TNAME " bad aio_write return value()\n");
> exit(PTS_FAIL);
> }
>
> - if (errno != EBADF)
> + while (aio_error(&aiocb) == EINPROGRESS);
> + ret = aio_error(&aiocb);
> +
> + if (ret != EBADF)
> {
> printf(TNAME " errno is not EBADF %s\n", strerror(errno));
> exit(PTS_FAIL);
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-06-15 19:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-12 13:40 [LTP] [FIX PATCH] POSIX aio_write/8-2.c naresh kamboju
2009-06-15 19:15 ` Subrata Modak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox