Skip to contentSkip to conversation

aio_cancel/3-1: call aio_read before aio_cancel

PATCH In review Kang Kai 2 participants 3 messages Feb 16, 2012

lore
Share & tools
lore

Kang Kai

author
#0 lore raw

PATCH 1/1 aio_cancel/3-1: call aio_read before aio_cancel

The case calls aio_error() with an invalid aiocbp, but it should do some asynchronous I/O operations first, so call aio_read() and then test the aio_error().

---
 .../conformance/interfaces/aio_error/3-1.c         |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
testcases/open_posix_testsuite/conformance/interfaces/aio_error/3-1.c +4 -1
index 8b6c2f5..6665da1 100644
@@ -68,6 +68,9 @@ int main()
 	aiocb.aio_reqprio = -1;
 	aiocb.aio_nbytes = BUF_SIZE;
 
+	/* Just do aio_read() or aio_write */
+	aio_read(&aiocb);
+
 	ret = aio_error(&aiocb);
 
 	if (ret != EINVAL)
@@ -80,4 +83,4 @@ int main()
 	close(fd);
 	printf ("Test PASSED\n");
 	return PTS_PASS;
-}
\ No newline at end of file
+}
Signature · 12 lines
1.7.5.4


------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
#1 lore raw
Quoted 3 lines · Kang Kai

The case calls aio_error() with an invalid aiocbp, but it should do some asynchronous I/O operations first, so call aio_read() and then test the aio_error().

NACK. If so, the error is from aio_read but not from aio_error. This was discussed long time ago, please refer to the mail archive.

This test case is right, but this FAIL is not hard in POSIX, so we changed the result from FAIL to UNRESOLVED now.

So, just let it UNRESOLVED. ;)

Thanks
-Wanlong Gao

Quoted 21 lines
---
 .../conformance/interfaces/aio_error/3-1.c         |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
testcases/open_posix_testsuite/conformance/interfaces/aio_error/3-1.c +3 -0
index 8b6c2f5..6665da1 100644
@@ -68,6 +68,9 @@ int main()
 	aiocb.aio_reqprio = -1;
 	aiocb.aio_nbytes = BUF_SIZE;
 
+	/* Just do aio_read() or aio_write */
+	aio_read(&aiocb);
+
 	ret = aio_error(&aiocb);
 
 	if (ret != EINVAL)

testcases/open_posix_testsuite/conformance/interfaces/aio_error/3-1.c int main() · line 86

Quoted 6 lines
testcases/open_posix_testsuite/conformance/interfaces/aio_error/3-1.c +1 -1
@@ -80,4 +83,4 @@ int main()
 	close(fd);
 	printf ("Test PASSED\n");
 	return PTS_PASS;
-}
\ No newline at end of file
+}

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

author
#2 lore raw

On 2012年02月16日 11:25, Wanlong Gao wrote:

Hi WanLong,

Quoted 11 lines · Kang Kai
Quoted 4 lines

The case calls aio_error() with an invalid aiocbp, but it should do some asynchronous I/O operations first, so call aio_read() and then test the aio_error().

NACK. If so, the error is from aio_read but not from aio_error. This was discussed long time ago, please refer to the mail archive.

This test case is right, but this FAIL is not hard in POSIX, so we changed the result from FAIL to UNRESOLVED now.

OK, I got it.
Thanks.

Kai

Quoted 24 lines

So, just let it UNRESOLVED. ;)

Thanks
-Wanlong Gao

Quoted 18 lines
---
  .../conformance/interfaces/aio_error/3-1.c         |    5 ++++-
  1 files changed, 4 insertions(+), 1 deletions(-)
testcases/open_posix_testsuite/conformance/interfaces/aio_error/3-1.c +3 -0
index 8b6c2f5..6665da1 100644
@@ -68,6 +68,9 @@ int main()
  	aiocb.aio_reqprio = -1;
  	aiocb.aio_nbytes = BUF_SIZE;
 
+	/* Just do aio_read() or aio_write */
+	aio_read(&aiocb);
+
  	ret = aio_error(&aiocb);
 
Quoted 9 lines

testcases/open_posix_testsuite/conformance/interfaces/aio_error/3-1.c int main() · line 86

Quoted 8 lines
testcases/open_posix_testsuite/conformance/interfaces/aio_error/3-1.c +1 -1
  	if (ret != EINVAL)
@@ -80,4 +83,4 @@ int main()
  	close(fd);
  	printf ("Test PASSED\n");
  	return PTS_PASS;
-}
\ No newline at end of file
+}

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list