From: Kang Kai <kai.kang@windriver.com>
To: ltp-list@lists.sourceforge.net
Subject: [LTP] [PATCH 1/3] aio_cancel/4-1: fails on routerstation randomly
Date: Wed, 27 Jun 2012 16:26:58 +0800 [thread overview]
Message-ID: <1340785620-4444-2-git-send-email-kai.kang@windriver.com> (raw)
In-Reply-To: <1340785620-4444-1-git-send-email-kai.kang@windriver.com>
The case fails on routerstation(MIPS) board randomly. The root cause
is that the aio_write() calls already complete before call aio_cancel().
Fix it by increase BUF_SIZE.
Fill every struct aiocb with 0 at same time.
Signed-off-by: Kang Kai <kai.kang@windriver.com>
---
.../conformance/interfaces/aio_cancel/4-1.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/aio_cancel/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/aio_cancel/4-1.c
index 75bed8c..69cc512 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/aio_cancel/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/aio_cancel/4-1.c
@@ -42,7 +42,7 @@
#define TNAME "aio_cancel/4-1.c"
#define BUF_NB 128
-#define BUF_SIZE 1024
+#define BUF_SIZE (1024*1024)
int main()
{
@@ -80,6 +80,7 @@ int main()
strerror(errno));
return PTS_UNRESOLVED;
}
+ memset(aiocb[i], 0, sizeof(struct aiocb));
aiocb[i]->aio_fildes = fd;
aiocb[i]->aio_buf = malloc(BUF_SIZE);
if (aiocb[i]->aio_buf == NULL)
@@ -144,4 +145,4 @@ int main()
} while (in_progress);
return PTS_UNRESOLVED;
-}
\ No newline at end of file
+}
--
1.7.5.4
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
next prev parent reply other threads:[~2012-06-27 8:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-27 8:26 [LTP] [PATCH 0/3] some fix for aio related cases Kang Kai
2012-06-27 8:26 ` Kang Kai [this message]
2012-06-27 8:26 ` [LTP] [PATCH 2/3] aio_read/9-1: check aio resource limitation Kang Kai
2012-06-27 8:27 ` [LTP] [PATCH 3/3] aio_write/7-1: " Kang Kai
2012-06-29 1:52 ` [LTP] [PATCH 0/3] some fix for aio related cases Wanlong Gao
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=1340785620-4444-2-git-send-email-kai.kang@windriver.com \
--to=kai.kang@windriver.com \
--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