From: Cyril H. <su...@li...> - 2013-04-29 17:22:20
|
The branch, master, has been updated via be0fe25ec364aad44531171e6bd748d29272565c (commit) via db25118e45199ec46950fa291e6920e0407779d8 (commit) from a25f89ec9c0ead801445582c4f839f74d364b63e (commit) - Log ----------------------------------------------------------------- commit be0fe25ec364aad44531171e6bd748d29272565c Author: Cyril Hrubis <ch...@su...> Date: Mon Apr 29 18:39:13 2013 +0200 openposix/.../aio_fsync/5-1.c: Fixes. * Don't use ret variable to store return value from aio_error() as this overwrites the value that should be returned (coincidentally both PTS_PASS and return from aio_error() when I/O has finised are zero). * Print "Test PASSED" when test has passed. Signed-off-by: Cyril Hrubis <ch...@su...> commit db25118e45199ec46950fa291e6920e0407779d8 Author: Cyril Hrubis <ch...@su...> Date: Mon Apr 29 18:15:41 2013 +0200 openposix/.../aio_fsync/2-1,3-1: Add "Test PASSED" Make the tests to print "Test PASSED" when the test has passed. Signed-off-by: Cyril Hrubis <ch...@su...> ----------------------------------------------------------------------- Summary of changes: .../conformance/interfaces/aio_fsync/2-1.c | 2 ++ .../conformance/interfaces/aio_fsync/3-1.c | 1 + .../conformance/interfaces/aio_fsync/5-1.c | 13 +++++++------ 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/testcases/open_posix_testsuite/conformance/interfaces/aio_fsync/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/aio_fsync/2-1.c index 09da565..3f65b94 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/aio_fsync/2-1.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/aio_fsync/2-1.c @@ -84,6 +84,8 @@ int main(void) close(fd); return PTS_FAIL; } + close(fd); + printf("Test PASSED\n"); return PTS_PASS; } diff --git a/testcases/open_posix_testsuite/conformance/interfaces/aio_fsync/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/aio_fsync/3-1.c index adda4d9..7d6dbaf 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/aio_fsync/3-1.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/aio_fsync/3-1.c @@ -85,5 +85,6 @@ int main(void) } close(fd); + printf("Test PASSED\n"); return PTS_PASS; } diff --git a/testcases/open_posix_testsuite/conformance/interfaces/aio_fsync/5-1.c b/testcases/open_posix_testsuite/conformance/interfaces/aio_fsync/5-1.c index f9995dc..34fb7f8 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/aio_fsync/5-1.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/aio_fsync/5-1.c @@ -30,7 +30,7 @@ int main(void) int fd; struct aiocb aiocb_write; struct aiocb aiocb_fsync; - int ret; + int ret, err; if (sysconf(_SC_ASYNCHRONOUS_IO) < 200112L) return PTS_UNSUPPORTED; @@ -69,14 +69,13 @@ int main(void) ret = PTS_PASS; /* allow to check if aio_error() move from EINPROGRESS to - * something else - * otherwise test hangs + * something else otherwise test hangs */ do { usleep(10000); - ret = aio_error(&aiocb_fsync); - } while (ret == EINPROGRESS); - if (ret < 0) { + err = aio_error(&aiocb_fsync); + } while (err == EINPROGRESS); + if (err < 0) { printf(TNAME " Error at aio_error() : %s\n", strerror(ret)); exit(PTS_FAIL); } @@ -84,6 +83,8 @@ int main(void) close(fd); /* we didn't check if the operation is really performed */ + if (ret == PTS_PASS) + printf("Test PASSED\n"); return ret; } hooks/post-receive -- ltp |