forked from Imagelibrary/rtems
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.
This commit is contained in:
@@ -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>
|
||||
|
||||
* block01/init.c, block02/init.c, block03/init.c, block04/init.c,
|
||||
|
||||
@@ -77,10 +77,10 @@ bdbuf_test1_1_main()
|
||||
* Check that rtems_bdbuf_read() returns status obtained
|
||||
* from device driver via asynchonous notification.
|
||||
* 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);
|
||||
SEND_DRV_MSG(0, 0, RTEMS_NO_MEMORY, EFAULT);
|
||||
SEND_DRV_MSG(0, 0, RTEMS_IO_ERROR, EFAULT);
|
||||
|
||||
WAIT_THREAD_SYNC(1);
|
||||
TEST_CHECK_RESULT("6");
|
||||
@@ -130,11 +130,11 @@ bdbuf_test1_1_thread1(rtems_task_argument arg)
|
||||
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
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();
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ bdbuf_test1_2_main()
|
||||
* Step 3:
|
||||
* 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.
|
||||
@@ -91,7 +91,7 @@ bdbuf_test1_2_main()
|
||||
* Step 5:
|
||||
* 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.
|
||||
@@ -119,7 +119,7 @@ bdbuf_test1_2_thread1(rtems_task_argument arg)
|
||||
* result this call will return an error.
|
||||
*/
|
||||
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();
|
||||
}
|
||||
@@ -146,10 +146,10 @@ bdbuf_test1_2_thread2(rtems_task_argument arg)
|
||||
* Due to the fact that thread #1 failed to read required block
|
||||
* number, bdbuf library should ask for re-read data again.
|
||||
* 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);
|
||||
if (rc != RTEMS_NO_MEMORY || bd != NULL)
|
||||
if (rc != RTEMS_IO_ERROR || bd != NULL)
|
||||
{
|
||||
TEST_FAILED();
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ bdbuf_test1_3_main()
|
||||
* Step 3:
|
||||
* 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.
|
||||
@@ -128,7 +128,7 @@ bdbuf_test1_3_thread1(rtems_task_argument arg)
|
||||
* result this call will return an error.
|
||||
*/
|
||||
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();
|
||||
}
|
||||
|
||||
@@ -24,11 +24,9 @@
|
||||
struct bdbuf_test_descr {
|
||||
void (* main)(void);
|
||||
} bdbuf_tests[] = {
|
||||
#if 0
|
||||
{ bdbuf_test1_1_main },
|
||||
{ bdbuf_test1_2_main },
|
||||
{ bdbuf_test1_3_main },
|
||||
#endif
|
||||
{ bdbuf_test1_4_main },
|
||||
{ bdbuf_test1_5_main },
|
||||
|
||||
|
||||
Reference in New Issue
Block a user