public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Kang Kai <kai.kang@windriver.com>
To: ltp-list@lists.sourceforge.net
Subject: [LTP] [PATCH 3/3] aio_write/7-1: check aio resource limitation
Date: Wed, 27 Jun 2012 16:27:00 +0800	[thread overview]
Message-ID: <1340785620-4444-4-git-send-email-kai.kang@windriver.com> (raw)
In-Reply-To: <1340785620-4444-1-git-send-email-kai.kang@windriver.com>

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

  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 ` [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 [this message]
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-4-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