diff options
Diffstat (limited to 'testsuites/libtests')
-rw-r--r-- | testsuites/libtests/ChangeLog | 6 | ||||
-rw-r--r-- | testsuites/libtests/devnullfatal01/testcase.h | 2 | ||||
-rw-r--r-- | testsuites/libtests/malloc02/init.c | 1 | ||||
-rw-r--r-- | testsuites/libtests/malloc04/init.c | 11 | ||||
-rw-r--r-- | testsuites/libtests/malloctest/init.c | 18 | ||||
-rw-r--r-- | testsuites/libtests/termios03/termios_testdriver_polled.c | 3 | ||||
-rw-r--r-- | testsuites/libtests/termios04/termios_testdriver_intr.c | 3 |
7 files changed, 36 insertions, 8 deletions
diff --git a/testsuites/libtests/ChangeLog b/testsuites/libtests/ChangeLog index 0b90d682b9..b7065df04a 100644 --- a/testsuites/libtests/ChangeLog +++ b/testsuites/libtests/ChangeLog @@ -1,3 +1,9 @@ +2011-05-05 Joel Sherrill <joel.sherrill@oarcorp.com> + + * devnullfatal01/testcase.h, malloc02/init.c, malloc04/init.c, + malloctest/init.c, termios03/termios_testdriver_polled.c, + termios04/termios_testdriver_intr.c: Remove warnings. + 2011-04-05 Sebastian Huber <sebastian.huber@embedded-brains.de> * tar01/init.c: Fixed integer types. diff --git a/testsuites/libtests/devnullfatal01/testcase.h b/testsuites/libtests/devnullfatal01/testcase.h index 9ebf0344f7..a590d5f68d 100644 --- a/testsuites/libtests/devnullfatal01/testcase.h +++ b/testsuites/libtests/devnullfatal01/testcase.h @@ -16,12 +16,14 @@ #define FATAL_ERROR_EXPECTED_ERROR RTEMS_TOO_MANY #include <rtems/devnull.h> +#include "tmacros.h" void force_error() { int status; status = rtems_io_register_name( "/dev/null", 0, 0 ); + directive_failed( status, "io register" ); status = null_initialize( 0, 0, NULL ); diff --git a/testsuites/libtests/malloc02/init.c b/testsuites/libtests/malloc02/init.c index b9025f6a5f..2645b87e65 100644 --- a/testsuites/libtests/malloc02/init.c +++ b/testsuites/libtests/malloc02/init.c @@ -69,6 +69,7 @@ rtems_task Init( puts( "Free from ISR successfully processed" ); puts( "Now malloc'ing more memory to process the free" ); pointer2 = malloc(20); + rtems_test_assert( pointer2 ); puts( "*** END OF TEST MALLOC 02 ***" ); rtems_test_exit( 0 ); diff --git a/testsuites/libtests/malloc04/init.c b/testsuites/libtests/malloc04/init.c index d8e2c9d701..f5d371812d 100644 --- a/testsuites/libtests/malloc04/init.c +++ b/testsuites/libtests/malloc04/init.c @@ -1,5 +1,5 @@ /* - * COPYRIGHT (c) 1989-2010. + * COPYRIGHT (c) 1989-2011. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -111,15 +111,23 @@ rtems_task Init( sbrk_count = 0; RTEMS_Malloc_Initialize( NULL, 0, 64 ); p1 = malloc(64); + rtems_test_assert( p1 ); + p2 = malloc(64); + rtems_test_assert( p2 ); + p3 = malloc(48); + rtems_test_assert( p3 ); + p4 = malloc(48); + rtems_test_assert( p4 ); puts( "Initialize heap with no memory (sbrk aligned)" ); offset = 0; sbrk_count = 0; RTEMS_Malloc_Initialize( NULL, 0, 64 ); p1 = malloc(64); + rtems_test_assert( p1 ); puts( "Set sbrk amount in heap to 0" ); offset = 0; @@ -127,6 +135,7 @@ rtems_task Init( RTEMS_Malloc_Initialize( NULL, 0, 64 ); RTEMS_Malloc_Sbrk_amount = 0; p4 = malloc(48); + rtems_test_assert( p4 ); /* Restore information on real heap */ malloc_set_heap_pointer( TempHeap ); diff --git a/testsuites/libtests/malloctest/init.c b/testsuites/libtests/malloctest/init.c index 35cb0c7f72..89797d8554 100644 --- a/testsuites/libtests/malloctest/init.c +++ b/testsuites/libtests/malloctest/init.c @@ -11,7 +11,7 @@ * * Output parameters: NONE * - * COPYRIGHT (c) 1989-2009. + * COPYRIGHT (c) 1989-2011. * On-Line Applications Research Corporation (OAR). * * Copyright (c) 2009, 2010 embedded brains GmbH. @@ -420,15 +420,11 @@ static void test_heap_allocate(void) uintptr_t previous_last_block_begin = 0; uintptr_t previous_last_page_begin = 0; - uintptr_t first_block_begin = 0; - uintptr_t last_block_begin = 0; uintptr_t last_alloc_begin = 0; test_heap_init( TEST_DEFAULT_PAGE_SIZE ); - first_block_begin = (uintptr_t) TestHeap.first_block; - last_block_begin = (uintptr_t) TestHeap.last_block; last_alloc_begin = _Heap_Alloc_area_of_block( TestHeap.last_block ); @@ -467,6 +463,8 @@ static void test_heap_allocate(void) alloc_size = test_page_size(); p1 = test_init_and_alloc_simple( alloc_size, alignment, boundary ); p2 = test_alloc_simple( alloc_size, alignment, boundary ); + rtems_test_assert( p2 ); + test_free( p1 ); alloc_size = 2 * alloc_size; @@ -890,7 +888,11 @@ static void test_heap_resize_block(void) puts( "\t\tlet the next block be used alredy and try to get a size bigger than the actual block" ); test_heap_init( TEST_DEFAULT_PAGE_SIZE ); p1 = test_alloc_one_page(); + rtems_test_assert( p1 ); + p2 = test_alloc_one_page(); + rtems_test_assert( p2 ); + new_alloc_size = 3 * TEST_DEFAULT_PAGE_SIZE / 2; test_simple_resize_block( p1, new_alloc_size, HEAP_RESIZE_UNSATISFIED ); @@ -903,8 +905,14 @@ static void test_heap_resize_block(void) puts( "\t\tlet the block after the next be used and try to allocate more then one pagesize more" ); test_heap_init( TEST_DEFAULT_PAGE_SIZE ); p1 = test_alloc_one_page(); + rtems_test_assert( p1 ); + p2 = test_alloc_one_page(); + rtems_test_assert( p2 ); + p3 = test_alloc_one_page(); + rtems_test_assert( p3 ); + _Heap_Free( &TestHeap, p2 ); new_alloc_size = 5 * TEST_DEFAULT_PAGE_SIZE / 2; test_simple_resize_block( p1, new_alloc_size, HEAP_RESIZE_UNSATISFIED ); diff --git a/testsuites/libtests/termios03/termios_testdriver_polled.c b/testsuites/libtests/termios03/termios_testdriver_polled.c index b148049a6b..4cc1280f9e 100644 --- a/testsuites/libtests/termios03/termios_testdriver_polled.c +++ b/testsuites/libtests/termios03/termios_testdriver_polled.c @@ -1,7 +1,7 @@ /* * This file contains a test fixture termios device driver * - * COPYRIGHT (c) 1989-2010. + * COPYRIGHT (c) 1989-2011. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -134,6 +134,7 @@ rtems_device_driver termios_test_driver_open( } sc = rtems_termios_open (major, minor, arg, &Callbacks); + directive_failed( sc, "termios open" ); return RTEMS_SUCCESSFUL; } diff --git a/testsuites/libtests/termios04/termios_testdriver_intr.c b/testsuites/libtests/termios04/termios_testdriver_intr.c index a0212e6095..916d8bb698 100644 --- a/testsuites/libtests/termios04/termios_testdriver_intr.c +++ b/testsuites/libtests/termios04/termios_testdriver_intr.c @@ -1,7 +1,7 @@ /* * This file contains a test fixture termios device driver * - * COPYRIGHT (c) 1989-2010. + * COPYRIGHT (c) 1989-2011. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -205,6 +205,7 @@ rtems_device_driver termios_test_driver_open( } sc = rtems_termios_open (major, minor, arg, &Callbacks); + directive_failed( sc, "termios open" ); Ttyp = args->iop->data1; /* Keep cookie returned by termios_open */ |