PR 1433/cpukit
	* block08/bdbuf_tests.c: Enabled tests 1.1, 1.2 and 1.3.
	* block08/bdbuf_test1_1.c, block08/bdbuf_test1_2.c,
	block08/bdbuf_test1_3.c: Use RTEMS_IO_ERROR instead of
	RTEMS_NO_MEMORY.
This commit is contained in:
Sebastian Huber
2010-05-17 08:34:55 +00:00
parent c8522fd2c4
commit 377c0cb0e3
5 changed files with 19 additions and 13 deletions

View File

@@ -1,3 +1,11 @@
2010-05-17 Sebastian Huber <sebastian.huber@embedded-brains.de>
PR 1433/cpukit
* block08/bdbuf_tests.c: Enabled tests 1.1, 1.2 and 1.3.
* block08/bdbuf_test1_1.c, block08/bdbuf_test1_2.c,
block08/bdbuf_test1_3.c: Use RTEMS_IO_ERROR instead of
RTEMS_NO_MEMORY.
2010-05-03 Sebastian Huber <Sebastian.Huber@embedded-brains.de> 2010-05-03 Sebastian Huber <Sebastian.Huber@embedded-brains.de>
* block01/init.c, block02/init.c, block03/init.c, block04/init.c, * block01/init.c, block02/init.c, block03/init.c, block04/init.c,

View File

@@ -77,10 +77,10 @@ bdbuf_test1_1_main()
* Check that rtems_bdbuf_read() returns status obtained * Check that rtems_bdbuf_read() returns status obtained
* from device driver via asynchonous notification. * from device driver via asynchonous notification.
* On this step device driver returns 0 from ioctl() call, * On this step device driver returns 0 from ioctl() call,
* but notification callback is called with RTEMS_NO_MEMORY status. * but notification callback is called with RTEMS_IO_ERROR status.
*/ */
WAIT_DRV_MSG(&msg); WAIT_DRV_MSG(&msg);
SEND_DRV_MSG(0, 0, RTEMS_NO_MEMORY, EFAULT); SEND_DRV_MSG(0, 0, RTEMS_IO_ERROR, EFAULT);
WAIT_THREAD_SYNC(1); WAIT_THREAD_SYNC(1);
TEST_CHECK_RESULT("6"); TEST_CHECK_RESULT("6");
@@ -130,11 +130,11 @@ bdbuf_test1_1_thread1(rtems_task_argument arg)
/* /*
* Step 5-6: * Step 5-6:
* Read operation fails with RTEMS_NO_MEMORY code. * Read operation fails with RTEMS_IO_ERROR code.
* The function shall not update user pointer. * The function shall not update user pointer.
*/ */
rc = rtems_bdbuf_read(test_dev, TEST_BLK_NUM, &bd2); rc = rtems_bdbuf_read(test_dev, TEST_BLK_NUM, &bd2);
if (rc != RTEMS_NO_MEMORY || bd2 != NULL) if (rc != RTEMS_IO_ERROR || bd2 != NULL)
{ {
TEST_FAILED(); TEST_FAILED();
} }

View File

@@ -69,7 +69,7 @@ bdbuf_test1_2_main()
* Step 3: * Step 3:
* Unblock thread #1 by reporting data transfer result. * Unblock thread #1 by reporting data transfer result.
*/ */
SEND_DRV_MSG(0, 0, RTEMS_NO_MEMORY, EFAULT); SEND_DRV_MSG(0, 0, RTEMS_IO_ERROR, EFAULT);
/* /*
* Wait for sync from thread #1. * Wait for sync from thread #1.
@@ -91,7 +91,7 @@ bdbuf_test1_2_main()
* Step 5: * Step 5:
* Report an error again from the driver. * Report an error again from the driver.
*/ */
SEND_DRV_MSG(0, 0, RTEMS_NO_MEMORY, EFAULT); SEND_DRV_MSG(0, 0, RTEMS_IO_ERROR, EFAULT);
/* /*
* Wait for sync from thread #2. * Wait for sync from thread #2.
@@ -119,7 +119,7 @@ bdbuf_test1_2_thread1(rtems_task_argument arg)
* result this call will return an error. * result this call will return an error.
*/ */
rc = rtems_bdbuf_read(test_dev, TEST_BLK_NUM, &bd); rc = rtems_bdbuf_read(test_dev, TEST_BLK_NUM, &bd);
if (rc != RTEMS_NO_MEMORY || bd != NULL) if (rc != RTEMS_IO_ERROR || bd != NULL)
{ {
TEST_FAILED(); TEST_FAILED();
} }
@@ -146,10 +146,10 @@ bdbuf_test1_2_thread2(rtems_task_argument arg)
* Due to the fact that thread #1 failed to read required block * Due to the fact that thread #1 failed to read required block
* number, bdbuf library should ask for re-read data again. * number, bdbuf library should ask for re-read data again.
* But main test task will agin tell device driver to return * But main test task will agin tell device driver to return
* RTEMS_NO_MEMORY data transfer result. * RTEMS_IO_ERROR data transfer result.
*/ */
rc = rtems_bdbuf_read(test_dev, TEST_BLK_NUM, &bd); rc = rtems_bdbuf_read(test_dev, TEST_BLK_NUM, &bd);
if (rc != RTEMS_NO_MEMORY || bd != NULL) if (rc != RTEMS_IO_ERROR || bd != NULL)
{ {
TEST_FAILED(); TEST_FAILED();
} }

View File

@@ -70,7 +70,7 @@ bdbuf_test1_3_main()
* Step 3: * Step 3:
* Unblock thread #1 by reporting erroneous data transfer result. * Unblock thread #1 by reporting erroneous data transfer result.
*/ */
SEND_DRV_MSG(0, 0, RTEMS_NO_MEMORY, EFAULT); SEND_DRV_MSG(0, 0, RTEMS_IO_ERROR, EFAULT);
/* /*
* Wait for sync from thread #1. * Wait for sync from thread #1.
@@ -128,7 +128,7 @@ bdbuf_test1_3_thread1(rtems_task_argument arg)
* result this call will return an error. * result this call will return an error.
*/ */
rc = rtems_bdbuf_read(test_dev, TEST_BLK_NUM, &bd); rc = rtems_bdbuf_read(test_dev, TEST_BLK_NUM, &bd);
if (rc != RTEMS_NO_MEMORY || bd != NULL) if (rc != RTEMS_IO_ERROR || bd != NULL)
{ {
TEST_FAILED(); TEST_FAILED();
} }

View File

@@ -24,11 +24,9 @@
struct bdbuf_test_descr { struct bdbuf_test_descr {
void (* main)(void); void (* main)(void);
} bdbuf_tests[] = { } bdbuf_tests[] = {
#if 0
{ bdbuf_test1_1_main }, { bdbuf_test1_1_main },
{ bdbuf_test1_2_main }, { bdbuf_test1_2_main },
{ bdbuf_test1_3_main }, { bdbuf_test1_3_main },
#endif
{ bdbuf_test1_4_main }, { bdbuf_test1_4_main },
{ bdbuf_test1_5_main }, { bdbuf_test1_5_main },