* [LTP] [PATCH 0/3] some fix for aio related cases
@ 2012-06-27 8:26 Kang Kai
2012-06-27 8:26 ` [LTP] [PATCH 1/3] aio_cancel/4-1: fails on routerstation randomly Kang Kai
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Kang Kai @ 2012-06-27 8:26 UTC (permalink / raw)
To: ltp-list
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(-)
--
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* [LTP] [PATCH 1/3] aio_cancel/4-1: fails on routerstation randomly
2012-06-27 8:26 [LTP] [PATCH 0/3] some fix for aio related cases Kang Kai
@ 2012-06-27 8:26 ` Kang Kai
2012-06-27 8:26 ` [LTP] [PATCH 2/3] aio_read/9-1: check aio resource limitation Kang Kai
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Kang Kai @ 2012-06-27 8:26 UTC (permalink / raw)
To: ltp-list
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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [LTP] [PATCH 2/3] aio_read/9-1: check aio resource limitation
2012-06-27 8:26 [LTP] [PATCH 0/3] some fix for aio related cases Kang Kai
2012-06-27 8:26 ` [LTP] [PATCH 1/3] aio_cancel/4-1: fails on routerstation randomly Kang Kai
@ 2012-06-27 8:26 ` 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
3 siblings, 0 replies; 5+ messages in thread
From: Kang Kai @ 2012-06-27 8:26 UTC (permalink / raw)
To: ltp-list
This 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.
Signed-off-by: Kang Kai <kai.kang@windriver.com>
---
.../conformance/interfaces/aio_read/9-1.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/aio_read/9-1.c b/testcases/open_posix_testsuite/conformance/interfaces/aio_read/9-1.c
index 746225a..413bdca 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/aio_read/9-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/aio_read/9-1.c
@@ -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",
--
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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [LTP] [PATCH 3/3] aio_write/7-1: check aio resource limitation
2012-06-27 8:26 [LTP] [PATCH 0/3] some fix for aio related cases Kang Kai
2012-06-27 8:26 ` [LTP] [PATCH 1/3] aio_cancel/4-1: fails on routerstation randomly Kang Kai
2012-06-27 8:26 ` [LTP] [PATCH 2/3] aio_read/9-1: check aio resource limitation Kang Kai
@ 2012-06-27 8:27 ` Kang Kai
2012-06-29 1:52 ` [LTP] [PATCH 0/3] some fix for aio related cases Wanlong Gao
3 siblings, 0 replies; 5+ messages in thread
From: Kang Kai @ 2012-06-27 8:27 UTC (permalink / raw)
To: ltp-list
Similiar 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.
Signed-off-by: Kang Kai <kai.kang@windriver.com>
---
.../conformance/interfaces/aio_write/7-1.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/aio_write/7-1.c b/testcases/open_posix_testsuite/conformance/interfaces/aio_write/7-1.c
index 164e9ae..3857136 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/aio_write/7-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/aio_write/7-1.c
@@ -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;
-}
\ 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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [LTP] [PATCH 0/3] some fix for aio related cases
2012-06-27 8:26 [LTP] [PATCH 0/3] some fix for aio related cases Kang Kai
` (2 preceding siblings ...)
2012-06-27 8:27 ` [LTP] [PATCH 3/3] aio_write/7-1: " Kang Kai
@ 2012-06-29 1:52 ` Wanlong Gao
3 siblings, 0 replies; 5+ messages in thread
From: Wanlong Gao @ 2012-06-29 1:52 UTC (permalink / raw)
To: Kang Kai; +Cc: ltp-list
On 06/27/2012 04:26 PM, Kang Kai wrote:
> Hi,
>
> These patches are for aio cases.
pushed, thank you.
Wanlong Gao
>
> 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(-)
>
------------------------------------------------------------------------------
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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-06-29 1:52 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-27 8:26 [LTP] [PATCH 0/3] some fix for aio related cases Kang Kai
2012-06-27 8:26 ` [LTP] [PATCH 1/3] aio_cancel/4-1: fails on routerstation randomly Kang Kai
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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox