diff options
author | Chris Johns <chrisj@rtems.org> | 2019-03-06 20:39:29 +1100 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2019-03-07 06:33:47 +1100 |
commit | 96e4b2231274429569cda56d965bcc11d8009800 (patch) | |
tree | e2cbbb277f99ed2ac864fb63fe2aed08a28b3604 /testsuites/psxtests/psxaio03/init.c | |
parent | testsuite: Add rexclude, rinclude and cflags to test config files. (diff) | |
download | rtems-96e4b2231274429569cda56d965bcc11d8009800.tar.bz2 |
testsuite: Make the OPERATION_COUNT a test configuration parameter.
- Add a small memory test config file.
- Update the small memory PowerPC BSPs to use the new test config.
Diffstat (limited to 'testsuites/psxtests/psxaio03/init.c')
-rw-r--r-- | testsuites/psxtests/psxaio03/init.c | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/testsuites/psxtests/psxaio03/init.c b/testsuites/psxtests/psxaio03/init.c index d8a13fa8e4..0893696962 100644 --- a/testsuites/psxtests/psxaio03/init.c +++ b/testsuites/psxtests/psxaio03/init.c @@ -7,6 +7,10 @@ * */ +#if !defined(OPERATION_COUNT) +#define OPERATION_COUNT 100 +#endif + #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -86,12 +90,12 @@ POSIX_Init (void *argument) fd[i] = open (filename, O_RDWR|O_CREAT, S_IRWXU|S_IRWXG|S_IRWXO); rtems_test_assert ( fd[i] != -1); } - + puts (" Init: [WQ] aio_write on 1st file "); aiocbp[0] = create_aiocb (fd[0]); status = aio_write (aiocbp[0]); rtems_test_assert (status != -1); - + puts (" Init: [WQ] aio_write on 2nd file "); aiocbp[1] = create_aiocb (fd[1]); status = aio_write (aiocbp[1]); @@ -101,17 +105,17 @@ POSIX_Init (void *argument) aiocbp[2] = create_aiocb (fd[1]); status = aio_read (aiocbp[2]); rtems_test_assert (status != -1); - + puts (" Init: [WQ] aio_write on 3rd file "); aiocbp[3] = create_aiocb (fd[2]); status = aio_write (aiocbp[3]); rtems_test_assert (status != -1); - + puts (" Init: [WQ] aio_write on 4th file "); aiocbp[4] = create_aiocb (fd[3]); status = aio_write (aiocbp[4]); rtems_test_assert (status != -1); - + puts (" Init: [WQ] aio_write on 5th file -- [WQ] full "); aiocbp[5] = create_aiocb (fd[4]); status = aio_write (aiocbp[5]); @@ -121,16 +125,16 @@ POSIX_Init (void *argument) aiocbp[6] = create_aiocb (fd[5]); status = aio_read (aiocbp[6]); rtems_test_assert (status != -1); - + puts (" Init: going to sleep for 5 sec "); sleep (5); puts (" Init: going to sleep again for 5 sec "); sleep (5); puts (" Init: going to sleep again for 5 sec "); sleep (5); - + TEST_END(); - + for (i = 0; i < FD_COUNT; i++) { close (fd[i]); @@ -138,8 +142,7 @@ POSIX_Init (void *argument) } free_aiocb (aiocbp[i]); rtems_test_exit (0); - + return NULL; - -} +} |