forked from Imagelibrary/rtems
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.
This commit is contained in:
@@ -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>
|
2011-04-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
|
||||||
|
|
||||||
* tar01/init.c: Fixed integer types.
|
* tar01/init.c: Fixed integer types.
|
||||||
|
|||||||
@@ -16,12 +16,14 @@
|
|||||||
#define FATAL_ERROR_EXPECTED_ERROR RTEMS_TOO_MANY
|
#define FATAL_ERROR_EXPECTED_ERROR RTEMS_TOO_MANY
|
||||||
|
|
||||||
#include <rtems/devnull.h>
|
#include <rtems/devnull.h>
|
||||||
|
#include "tmacros.h"
|
||||||
|
|
||||||
void force_error()
|
void force_error()
|
||||||
{
|
{
|
||||||
int status;
|
int status;
|
||||||
|
|
||||||
status = rtems_io_register_name( "/dev/null", 0, 0 );
|
status = rtems_io_register_name( "/dev/null", 0, 0 );
|
||||||
|
directive_failed( status, "io register" );
|
||||||
|
|
||||||
status = null_initialize( 0, 0, NULL );
|
status = null_initialize( 0, 0, NULL );
|
||||||
|
|
||||||
|
|||||||
@@ -69,6 +69,7 @@ rtems_task Init(
|
|||||||
puts( "Free from ISR successfully processed" );
|
puts( "Free from ISR successfully processed" );
|
||||||
puts( "Now malloc'ing more memory to process the free" );
|
puts( "Now malloc'ing more memory to process the free" );
|
||||||
pointer2 = malloc(20);
|
pointer2 = malloc(20);
|
||||||
|
rtems_test_assert( pointer2 );
|
||||||
|
|
||||||
puts( "*** END OF TEST MALLOC 02 ***" );
|
puts( "*** END OF TEST MALLOC 02 ***" );
|
||||||
rtems_test_exit( 0 );
|
rtems_test_exit( 0 );
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* COPYRIGHT (c) 1989-2010.
|
* COPYRIGHT (c) 1989-2011.
|
||||||
* On-Line Applications Research Corporation (OAR).
|
* On-Line Applications Research Corporation (OAR).
|
||||||
*
|
*
|
||||||
* The license and distribution terms for this file may be
|
* The license and distribution terms for this file may be
|
||||||
@@ -111,15 +111,23 @@ rtems_task Init(
|
|||||||
sbrk_count = 0;
|
sbrk_count = 0;
|
||||||
RTEMS_Malloc_Initialize( NULL, 0, 64 );
|
RTEMS_Malloc_Initialize( NULL, 0, 64 );
|
||||||
p1 = malloc(64);
|
p1 = malloc(64);
|
||||||
|
rtems_test_assert( p1 );
|
||||||
|
|
||||||
p2 = malloc(64);
|
p2 = malloc(64);
|
||||||
|
rtems_test_assert( p2 );
|
||||||
|
|
||||||
p3 = malloc(48);
|
p3 = malloc(48);
|
||||||
|
rtems_test_assert( p3 );
|
||||||
|
|
||||||
p4 = malloc(48);
|
p4 = malloc(48);
|
||||||
|
rtems_test_assert( p4 );
|
||||||
|
|
||||||
puts( "Initialize heap with no memory (sbrk aligned)" );
|
puts( "Initialize heap with no memory (sbrk aligned)" );
|
||||||
offset = 0;
|
offset = 0;
|
||||||
sbrk_count = 0;
|
sbrk_count = 0;
|
||||||
RTEMS_Malloc_Initialize( NULL, 0, 64 );
|
RTEMS_Malloc_Initialize( NULL, 0, 64 );
|
||||||
p1 = malloc(64);
|
p1 = malloc(64);
|
||||||
|
rtems_test_assert( p1 );
|
||||||
|
|
||||||
puts( "Set sbrk amount in heap to 0" );
|
puts( "Set sbrk amount in heap to 0" );
|
||||||
offset = 0;
|
offset = 0;
|
||||||
@@ -127,6 +135,7 @@ rtems_task Init(
|
|||||||
RTEMS_Malloc_Initialize( NULL, 0, 64 );
|
RTEMS_Malloc_Initialize( NULL, 0, 64 );
|
||||||
RTEMS_Malloc_Sbrk_amount = 0;
|
RTEMS_Malloc_Sbrk_amount = 0;
|
||||||
p4 = malloc(48);
|
p4 = malloc(48);
|
||||||
|
rtems_test_assert( p4 );
|
||||||
|
|
||||||
/* Restore information on real heap */
|
/* Restore information on real heap */
|
||||||
malloc_set_heap_pointer( TempHeap );
|
malloc_set_heap_pointer( TempHeap );
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
*
|
*
|
||||||
* Output parameters: NONE
|
* Output parameters: NONE
|
||||||
*
|
*
|
||||||
* COPYRIGHT (c) 1989-2009.
|
* COPYRIGHT (c) 1989-2011.
|
||||||
* On-Line Applications Research Corporation (OAR).
|
* On-Line Applications Research Corporation (OAR).
|
||||||
*
|
*
|
||||||
* Copyright (c) 2009, 2010 embedded brains GmbH.
|
* 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_block_begin = 0;
|
||||||
uintptr_t previous_last_page_begin = 0;
|
uintptr_t previous_last_page_begin = 0;
|
||||||
|
|
||||||
uintptr_t first_block_begin = 0;
|
|
||||||
|
|
||||||
uintptr_t last_block_begin = 0;
|
uintptr_t last_block_begin = 0;
|
||||||
uintptr_t last_alloc_begin = 0;
|
uintptr_t last_alloc_begin = 0;
|
||||||
|
|
||||||
test_heap_init( TEST_DEFAULT_PAGE_SIZE );
|
test_heap_init( TEST_DEFAULT_PAGE_SIZE );
|
||||||
|
|
||||||
first_block_begin = (uintptr_t) TestHeap.first_block;
|
|
||||||
|
|
||||||
last_block_begin = (uintptr_t) TestHeap.last_block;
|
last_block_begin = (uintptr_t) TestHeap.last_block;
|
||||||
last_alloc_begin = _Heap_Alloc_area_of_block( 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();
|
alloc_size = test_page_size();
|
||||||
p1 = test_init_and_alloc_simple( alloc_size, alignment, boundary );
|
p1 = test_init_and_alloc_simple( alloc_size, alignment, boundary );
|
||||||
p2 = test_alloc_simple( alloc_size, alignment, boundary );
|
p2 = test_alloc_simple( alloc_size, alignment, boundary );
|
||||||
|
rtems_test_assert( p2 );
|
||||||
|
|
||||||
test_free( p1 );
|
test_free( p1 );
|
||||||
|
|
||||||
alloc_size = 2 * alloc_size;
|
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" );
|
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 );
|
test_heap_init( TEST_DEFAULT_PAGE_SIZE );
|
||||||
p1 = test_alloc_one_page();
|
p1 = test_alloc_one_page();
|
||||||
|
rtems_test_assert( p1 );
|
||||||
|
|
||||||
p2 = test_alloc_one_page();
|
p2 = test_alloc_one_page();
|
||||||
|
rtems_test_assert( p2 );
|
||||||
|
|
||||||
new_alloc_size = 3 * TEST_DEFAULT_PAGE_SIZE / 2;
|
new_alloc_size = 3 * TEST_DEFAULT_PAGE_SIZE / 2;
|
||||||
test_simple_resize_block( p1, new_alloc_size, HEAP_RESIZE_UNSATISFIED );
|
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" );
|
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 );
|
test_heap_init( TEST_DEFAULT_PAGE_SIZE );
|
||||||
p1 = test_alloc_one_page();
|
p1 = test_alloc_one_page();
|
||||||
|
rtems_test_assert( p1 );
|
||||||
|
|
||||||
p2 = test_alloc_one_page();
|
p2 = test_alloc_one_page();
|
||||||
|
rtems_test_assert( p2 );
|
||||||
|
|
||||||
p3 = test_alloc_one_page();
|
p3 = test_alloc_one_page();
|
||||||
|
rtems_test_assert( p3 );
|
||||||
|
|
||||||
_Heap_Free( &TestHeap, p2 );
|
_Heap_Free( &TestHeap, p2 );
|
||||||
new_alloc_size = 5 * TEST_DEFAULT_PAGE_SIZE / 2;
|
new_alloc_size = 5 * TEST_DEFAULT_PAGE_SIZE / 2;
|
||||||
test_simple_resize_block( p1, new_alloc_size, HEAP_RESIZE_UNSATISFIED );
|
test_simple_resize_block( p1, new_alloc_size, HEAP_RESIZE_UNSATISFIED );
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* This file contains a test fixture termios device driver
|
* This file contains a test fixture termios device driver
|
||||||
*
|
*
|
||||||
* COPYRIGHT (c) 1989-2010.
|
* COPYRIGHT (c) 1989-2011.
|
||||||
* On-Line Applications Research Corporation (OAR).
|
* On-Line Applications Research Corporation (OAR).
|
||||||
*
|
*
|
||||||
* The license and distribution terms for this file may be
|
* 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);
|
sc = rtems_termios_open (major, minor, arg, &Callbacks);
|
||||||
|
directive_failed( sc, "termios open" );
|
||||||
|
|
||||||
return RTEMS_SUCCESSFUL;
|
return RTEMS_SUCCESSFUL;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* This file contains a test fixture termios device driver
|
* This file contains a test fixture termios device driver
|
||||||
*
|
*
|
||||||
* COPYRIGHT (c) 1989-2010.
|
* COPYRIGHT (c) 1989-2011.
|
||||||
* On-Line Applications Research Corporation (OAR).
|
* On-Line Applications Research Corporation (OAR).
|
||||||
*
|
*
|
||||||
* The license and distribution terms for this file may be
|
* 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);
|
sc = rtems_termios_open (major, minor, arg, &Callbacks);
|
||||||
|
directive_failed( sc, "termios open" );
|
||||||
|
|
||||||
Ttyp = args->iop->data1; /* Keep cookie returned by termios_open */
|
Ttyp = args->iop->data1; /* Keep cookie returned by termios_open */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user