Hi,

I have noticed failures under
testcases/open_posix_testsuite/conformance/interfaces/aio_write/8-1.c
and fixed.
Please find the patch below and as attachment.

Best regards
Naresh Kamboju

Signed-off-by: Naresh Kamboju < [email protected] >


diff -Naurb 
a/testcases/open_posix_testsuite/conformance/interfaces/aio_write/8-1.c
b/testcases/open_posix_testsuite/conformance/interfaces/aio_write/8-1.c
--- a/testcases/open_posix_testsuite/conformance/interfaces/aio_write/8-1.c     
2009-06-12
18:08:40.000000000 +0530
+++ b/testcases/open_posix_testsuite/conformance/interfaces/aio_write/8-1.c     
2009-06-12
18:00:21.000000000 +0530
@@ -40,6 +40,7 @@
 #define BUF_SIZE 512
        char buf[BUF_SIZE];
        struct aiocb aiocb;
+       int ret=0;

 #if _POSIX_ASYNCHRONOUS_IO != 200112L
        exit(PTS_UNSUPPORTED);
@@ -51,13 +52,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: ltp-posix-aio_write_8-1.patch
Description: Binary data

------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to