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