some fix for aio related cases
cover some fix for aio related cases
Hi,
These patches are for aio cases.
Regards,
Kai
Kang Kai (3):
aio_cancel/4-1: fails on routerstation randomly
aio_read/9-1: check aio resource limitation
aio_write/7-1: check aio resource limitation
.../conformance/interfaces/aio_cancel/4-1.c | 5 +++-- .../conformance/interfaces/aio_read/9-1.c | 2 +- .../conformance/interfaces/aio_write/7-1.c | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-)
Signature · 13 lines
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
PATCH 1/3 aio_cancel/4-1: fails on routerstation randomly
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.
--- .../conformance/interfaces/aio_cancel/4-1.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
testcases/open_posix_testsuite/conformance/interfaces/aio_cancel/4-1.c +3 -2
@@ -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 ; -} +}
Signature · 13 lines
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
PATCH 2/3 aio_read/9-1: check aio resource limitation
In reply to Kang KaiThis case try to overflow the aio queue by call NUM_AIOCBS times aio_read.
But for some system, the queue has no limit. So check the _SC_AIO_MAX, if no limit then return UNSUPPORT.
--- .../conformance/interfaces/aio_read/9-1.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
testcases/open_posix_testsuite/conformance/interfaces/aio_read/9-1.c +1 -1
@@ -50,7 +50,7 @@ int main()int err;int ret; -if (sysconf (_SC_ASYNCHRONOUS_IO) <200112L ) +if (sysconf (_SC_ASYNCHRONOUS_IO) <200112L ||sysconf (_SC_AIO_MAX) ==-1 )return PTS_UNSUPPORTED ; snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_aio_write_4_1_%d",
Signature · 13 lines
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
PATCH 3/3 aio_write/7-1: check aio resource limitation
In reply to Kang KaiSimiliar with aio_read/9-1, this case try to overflow the aio queue by call NUM_AIOCBS times aio_write.
But for some system, the queue has no limit. So check the _SC_AIO_MAX, if no limit then return UNSUPPORT.
--- .../conformance/interfaces/aio_write/7-1.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
testcases/open_posix_testsuite/conformance/interfaces/aio_write/7-1.c +2 -2
@@ -50,7 +50,7 @@ int main()int err;int ret; -if (sysconf (_SC_ASYNCHRONOUS_IO) <200112L ) +if (sysconf (_SC_ASYNCHRONOUS_IO) <200112L ||sysconf (_SC_AIO_MAX) ==-1 )return PTS_UNSUPPORTED ; snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_aio_write_4_1_%d",
@@ -106,4 +106,4 @@ int main()printf (TNAME " PASSED\n" );return PTS_PASS ; -} +}
Signature · 13 lines
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
Quoted 3 lines · Kang Kai
Hi,
These patches are for aio cases.
pushed, thank you.
Wanlong Gao
Quoted 9 lines
Regards,
KaiKang Kai (3):
aio_cancel/4-1: fails on routerstation randomly
aio_read/9-1: check aio resource limitation
aio_write/7-1: check aio resource limitation
Quoted 5 lines
.../conformance/interfaces/aio_cancel/4-1.c | 5 +++-- .../conformance/interfaces/aio_read/9-1.c | 2 +- .../conformance/interfaces/aio_write/7-1.c | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-)
------------------------------------------------------------------------------
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