summaryrefslogtreecommitdiffstats
path: root/testsuites/libtests
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2009-11-30 03:33:25 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2009-11-30 03:33:25 +0000
commitb1274bd94c94520ed9402f85c949976d7008093e (patch)
tree6ed7755c34e5fcccbe06ff095017a4399de180ff /testsuites/libtests
parentWhitespace removal. (diff)
downloadrtems-b1274bd94c94520ed9402f85c949976d7008093e.tar.bz2
Whitespace removal.
Diffstat (limited to 'testsuites/libtests')
-rw-r--r--testsuites/libtests/block06/init.c146
-rw-r--r--testsuites/libtests/bspcmdline01/init.c4
-rw-r--r--testsuites/libtests/bspcmdline01/test.c6
-rw-r--r--testsuites/libtests/heapwalk/init.c4
-rw-r--r--testsuites/libtests/malloctest/init.c64
-rw-r--r--testsuites/libtests/malloctest/task1.c2
-rw-r--r--testsuites/libtests/monitor02/init.c8
-rw-r--r--testsuites/libtests/termios01/init.c6
-rw-r--r--testsuites/libtests/termios01/termios_testdriver.h14
-rw-r--r--testsuites/libtests/tztest/init.c4
10 files changed, 129 insertions, 129 deletions
diff --git a/testsuites/libtests/block06/init.c b/testsuites/libtests/block06/init.c
index 0bfa631aaa..63d62981d6 100644
--- a/testsuites/libtests/block06/init.c
+++ b/testsuites/libtests/block06/init.c
@@ -340,7 +340,7 @@ bdbuf_task_control_init (int task,
{
char name[6];
sprintf (name, "bdt%d", task);
-
+
tc->die = false;
tc->name = strdup (name); /* leaks */
tc->task = 0;
@@ -366,7 +366,7 @@ bdbuf_disk_ioctl_watcher (bdbuf_disk* bdd, int update)
else
bdd->watch_count = 0;
}
-
+
if (bdd->watch_count == 0)
{
bdbuf_send_watch_event (bdd->watcher_name,
@@ -375,7 +375,7 @@ bdbuf_disk_ioctl_watcher (bdbuf_disk* bdd, int update)
bdd->watcher = 0;
}
}
-
+
return true;
}
@@ -385,7 +385,7 @@ bdbuf_disk_ioctl_process (bdbuf_disk* bdd, rtems_blkdev_request* req)
{
bool result = true;
int b;
-
+
/*
* Perform the requested action.
*/
@@ -393,7 +393,7 @@ bdbuf_disk_ioctl_process (bdbuf_disk* bdd, rtems_blkdev_request* req)
{
case BDBUF_DISK_NOOP:
break;
-
+
case BDBUF_DISK_WAIT:
if (bdd->waiting)
bdbuf_test_printf ("disk ioctl: bad waiter: %s:%08x\n",
@@ -445,7 +445,7 @@ bdbuf_disk_ioctl_leave (bdbuf_disk* bdd, int buffer_count)
* Handle the watcher.
*/
bdbuf_disk_ioctl_watcher (bdd, buffer_count);
-
+
return true;
}
@@ -464,7 +464,7 @@ bdbuf_disk_ioctl (rtems_disk_device *dd, uint32_t req, void* argp)
bdbuf_disk *bdd = rtems_disk_driver_data (dd);
errno = 0;
-
+
if (!bdbuf_disk_lock (bdd))
{
errno = EIO;
@@ -505,14 +505,14 @@ bdbuf_disk_ioctl (rtems_disk_device *dd, uint32_t req, void* argp)
}
bdbuf_disk_ioctl_leave (bdd, r->bufnum);
break;
-
+
case RTEMS_BLKDEV_REQ_WRITE:
if (!bdbuf_disk_ioctl_process (bdd, r))
errno = EIO;
r->req_done (r->done_arg, RTEMS_SUCCESSFUL, 0);
bdbuf_disk_ioctl_leave (bdd, r->bufnum);
break;
-
+
default:
errno = EBADRQC;
break;
@@ -544,12 +544,12 @@ bdbuf_disk_initialize (rtems_device_major_number major,
void* arg)
{
rtems_status_code sc;
-
+
bdbuf_test_printf ("disk io init: ");
sc = rtems_disk_io_initialize ();
if (!bdbuf_test_print_sc (sc, true))
return sc;
-
+
for (minor = 0; minor < BDBUF_DISKS; minor++)
{
char name[sizeof (BDBUF_DISK_DEVICE_BASE_NAME) + 10];
@@ -560,7 +560,7 @@ bdbuf_disk_initialize (rtems_device_major_number major,
BDBUF_DISK_DEVICE_BASE_NAME "%" PRIu32, minor);
bdd->name = strdup (name);
-
+
bdbuf_test_printf ("disk init: %s\n", bdd->name);
bdbuf_test_printf ("disk lock: ");
@@ -582,7 +582,7 @@ bdbuf_disk_initialize (rtems_device_major_number major,
bdbuf_test_print_sc (sc, true);
return sc;
}
-
+
}
return RTEMS_SUCCESSFUL;
}
@@ -607,7 +607,7 @@ static bool
bdbuf_tests_setup_disk (rtems_device_major_number* major)
{
rtems_status_code sc;
-
+
/*
* Register the disk driver.
*/
@@ -616,7 +616,7 @@ bdbuf_tests_setup_disk (rtems_device_major_number* major)
sc = rtems_io_register_driver (RTEMS_DRIVER_AUTO_MAJOR,
&bdbuf_disk_io_ops,
major);
-
+
return sc == RTEMS_SUCCESSFUL;
}
@@ -629,7 +629,7 @@ bdbuf_tests_create_task (bdbuf_task_control* tc,
bdbuf_test_printf ("creating task: %s: priority: %d: ",
tc->name, priority);
-
+
sc = rtems_task_create (rtems_build_name (tc->name[0], tc->name[1],
tc->name[2], tc->name[3]),
priority,
@@ -639,9 +639,9 @@ bdbuf_tests_create_task (bdbuf_task_control* tc,
&tc->task);
if (!bdbuf_test_print_sc (sc, true))
return false;
-
+
bdbuf_test_printf ("starting task: %s: ", tc->name);
-
+
sc = rtems_task_start (tc->task, entry_point, (rtems_task_argument) tc);
return bdbuf_test_print_sc (sc, true);
@@ -659,7 +659,7 @@ bdbuf_tests_task_0_test_1 (bdbuf_task_control* tc)
bool passed;
int i;
rtems_bdbuf_buffer* bd;
-
+
/*
* Set task control's passed to false to handle a timeout.
*/
@@ -677,7 +677,7 @@ bdbuf_tests_task_0_test_1 (bdbuf_task_control* tc)
passed = false;
break;
}
-
+
bdbuf_test_printf ("%s: rtems_bdbuf_release[0]: ", tc->name);
sc = rtems_bdbuf_release (bd);
if (!bdbuf_test_print_sc (sc, true))
@@ -686,7 +686,7 @@ bdbuf_tests_task_0_test_1 (bdbuf_task_control* tc)
break;
}
}
-
+
tc->passed = passed;
tc->test = 0;
}
@@ -704,18 +704,18 @@ bdbuf_tests_task_0_test_2 (bdbuf_task_control* tc)
int i;
rtems_bdbuf_buffer* bd;
rtems_chain_control buffers;
-
+
/*
* Set task control's passed to false to handle a timeout.
*/
tc->passed = false;
passed = true;
-
+
/*
* Get the blocks 0 -> 4 and hold them.
*/
rtems_chain_initialize_empty (&buffers);
-
+
for (i = 0; (i < 5) && passed; i++)
{
dev_t device = rtems_filesystem_make_dev_t (tc->major, tc->minor);
@@ -732,7 +732,7 @@ bdbuf_tests_task_0_test_2 (bdbuf_task_control* tc)
* Wake the master to tell it we have the buffers.
*/
bdbuf_send_wait_event (tc->name, "wake master", tc->master);
-
+
if (passed)
{
/*
@@ -765,7 +765,7 @@ bdbuf_tests_task_0_test_2 (bdbuf_task_control* tc)
}
}
}
-
+
tc->passed = passed;
tc->test = 0;
}
@@ -780,7 +780,7 @@ bdbuf_tests_task_0_test_3 (bdbuf_task_control* tc)
bool passed;
rtems_bdbuf_buffer* bd;
dev_t device;
-
+
/*
* Set task control's passed to false to handle a timeout.
*/
@@ -847,24 +847,24 @@ bdbuf_tests_task_0_test_4 (bdbuf_task_control* tc)
rtems_bdbuf_buffer* bd;
rtems_chain_control buffers;
size_t num = bdbuf_test_buffer_count ();
-
+
/*
* Set task control's passed to false to handle a timeout.
*/
tc->passed = false;
passed = true;
-
+
/*
* Clear any disk settings.
*/
bdbuf_clear_disk_driver_watch (tc);
bdbuf_set_disk_driver_action (tc, BDBUF_DISK_NOOP);
-
+
/*
* Get the blocks 0 -> 4 and hold them.
*/
rtems_chain_initialize_empty (&buffers);
-
+
for (i = 0; (i < num) && passed; i++)
{
dev_t device = rtems_filesystem_make_dev_t (tc->major, tc->minor);
@@ -881,7 +881,7 @@ bdbuf_tests_task_0_test_4 (bdbuf_task_control* tc)
* Wake the master to tell it we have the buffers.
*/
bdbuf_send_wait_event (tc->name, "wake master", tc->master);
-
+
if (passed)
{
bdbuf_sleep (250);
@@ -893,7 +893,7 @@ bdbuf_tests_task_0_test_4 (bdbuf_task_control* tc)
* remainder. This tests the swap out timer on each buffer.
*/
bdbuf_test_printf ("%s: rtems_bdbuf_release_modified[0]: unblocks task 1\n",
- tc->name);
+ tc->name);
bd = (rtems_bdbuf_buffer*) rtems_chain_get (&buffers);
sc = rtems_bdbuf_release_modified (bd);
bdbuf_test_printf ("%s: rtems_bdbuf_release_modified[0]: ", tc->name);
@@ -922,7 +922,7 @@ bdbuf_tests_task_0_test_4 (bdbuf_task_control* tc)
bdbuf_sleep (500);
bdbuf_set_disk_driver_watch (tc, num / 2);
-
+
for (i = 0; (i < (num / 2)) && passed; i++)
{
bdbuf_test_printf ("%s: rtems_bdbuf_release_modified[%d]: ",
@@ -948,7 +948,7 @@ bdbuf_tests_task_0_test_4 (bdbuf_task_control* tc)
}
}
}
-
+
tc->passed = passed;
tc->test = 0;
}
@@ -967,24 +967,24 @@ bdbuf_tests_task_0_test_6 (bdbuf_task_control* tc)
int i;
rtems_bdbuf_buffer* bd;
rtems_chain_control buffers;
-
+
/*
* Set task control's passed to false to handle a timeout.
*/
tc->passed = false;
passed = true;
-
+
/*
* Clear any disk settings.
*/
bdbuf_clear_disk_driver_watch (tc);
bdbuf_set_disk_driver_action (tc, BDBUF_DISK_NOOP);
-
+
/*
* Get the blocks 0 -> 4 and hold them.
*/
rtems_chain_initialize_empty (&buffers);
-
+
for (i = 0; (i < 5) && passed; i++)
{
dev_t device = rtems_filesystem_make_dev_t (tc->major, tc->minor);
@@ -1013,7 +1013,7 @@ bdbuf_tests_task_0_test_6 (bdbuf_task_control* tc)
passed = bdbuf_test_print_sc (rtems_bdbuf_sync (bd), true);
}
-
+
tc->passed = passed;
tc->test = 0;
}
@@ -1027,13 +1027,13 @@ bdbuf_tests_task_0_test_7 (bdbuf_task_control* tc)
rtems_bdbuf_buffer* bd;
rtems_chain_control buffers;
dev_t device;
-
+
/*
* Set task control's passed to false to handle a timeout.
*/
tc->passed = false;
passed = true;
-
+
/*
* Clear any disk settings.
*/
@@ -1041,12 +1041,12 @@ bdbuf_tests_task_0_test_7 (bdbuf_task_control* tc)
bdbuf_set_disk_driver_action (tc, BDBUF_DISK_NOOP);
device = rtems_filesystem_make_dev_t (tc->major, tc->minor);
-
+
/*
* Get the blocks 0 -> 4 and hold them.
*/
rtems_chain_initialize_empty (&buffers);
-
+
for (i = 0; (i < 5) && passed; i++)
{
bdbuf_test_printf ("%s: rtems_bdbuf_read[%d]: ", tc->name, i);
@@ -1074,7 +1074,7 @@ bdbuf_tests_task_0_test_7 (bdbuf_task_control* tc)
rtems_filesystem_dev_minor_t (device));
passed = bdbuf_test_print_sc (rtems_bdbuf_syncdev (device), true);
}
-
+
tc->passed = passed;
tc->test = 0;
}
@@ -1090,13 +1090,13 @@ bdbuf_tests_task_0_test_8 (bdbuf_task_control* tc)
rtems_chain_node* node;
rtems_chain_node* pnode;
dev_t device;
-
+
/*
* Set task control's passed to false to handle a timeout.
*/
tc->passed = false;
passed = true;
-
+
/*
* Clear any disk settings.
*/
@@ -1104,12 +1104,12 @@ bdbuf_tests_task_0_test_8 (bdbuf_task_control* tc)
bdbuf_set_disk_driver_action (tc, BDBUF_DISK_NOOP);
device = rtems_filesystem_make_dev_t (tc->major, tc->minor);
-
+
/*
* Get the blocks 0 -> 4 and hold them.
*/
rtems_chain_initialize_empty (&buffers);
-
+
for (i = 0; (i < 5) && passed; i++)
{
bdbuf_test_printf ("%s: rtems_bdbuf_read[%d]: ", tc->name, i);
@@ -1152,7 +1152,7 @@ bdbuf_tests_task_0_test_8 (bdbuf_task_control* tc)
* Check the block order.
*/
bdbuf_set_disk_driver_action (tc, BDBUF_DISK_BLOCKS_INORDER);
-
+
bdbuf_test_printf ("%s: rtems_bdbuf_syncdev[%d:%d]: checking order\n",
tc->name, i,
rtems_filesystem_dev_major_t (device),
@@ -1173,7 +1173,7 @@ static void
bdbuf_tests_task_0 (rtems_task_argument arg)
{
bdbuf_task_control* tc = (bdbuf_task_control*) arg;
-
+
while (!tc->die)
{
switch (tc->test)
@@ -1188,7 +1188,7 @@ bdbuf_tests_task_0 (rtems_task_argument arg)
case 1:
bdbuf_tests_task_0_test_1 (tc);
break;
-
+
case 2:
bdbuf_tests_task_0_test_2 (tc);
break;
@@ -1246,7 +1246,7 @@ bdbuf_tests_ranged_get_release (bdbuf_task_control* tc,
bool passed;
int i;
rtems_bdbuf_buffer* bd;
-
+
/*
* Set task control's passed to false to handle a timeout.
*/
@@ -1256,7 +1256,7 @@ bdbuf_tests_ranged_get_release (bdbuf_task_control* tc,
for (i = lower; (i < upper) && passed; i++)
{
dev_t device = rtems_filesystem_make_dev_t (tc->major, tc->minor);
-
+
bdbuf_test_printf ("%s: rtems_bdbuf_get[%d]: blocking ...\n", tc->name, i);
sc = rtems_bdbuf_get (device, i, &bd);
bdbuf_test_printf ("%s: rtems_bdbuf_get[%d]: ", tc->name, i);
@@ -1280,7 +1280,7 @@ bdbuf_tests_ranged_get_release (bdbuf_task_control* tc,
if (wake_master)
bdbuf_send_wait_event (tc->name, "wake master", tc->master);
}
-
+
tc->passed = passed;
tc->test = 0;
}
@@ -1345,7 +1345,7 @@ static void
bdbuf_tests_task_2 (rtems_task_argument arg)
{
bdbuf_task_control* tc = (bdbuf_task_control*) arg;
-
+
while (!tc->die)
{
switch (tc->test)
@@ -1385,7 +1385,7 @@ static rtems_task_entry bdbuf_test_tasks[] =
bdbuf_tests_task_1,
bdbuf_tests_task_2
};
-
+
#define BDBUF_TESTS_PRI_HIGH (30)
/**
@@ -1403,7 +1403,7 @@ bdbuf_tests_finished (bdbuf_task_control* tasks)
int t;
finished = true;
-
+
for (t = 0; t < BDBUF_TEST_TASKS; t++)
if (tasks[t].test)
{
@@ -1413,7 +1413,7 @@ bdbuf_tests_finished (bdbuf_task_control* tasks)
if (finished)
break;
-
+
bdbuf_sleep (250);
time++;
}
@@ -1430,7 +1430,7 @@ bdbuf_tests_finished (bdbuf_task_control* tasks)
break;
}
}
-
+
return finished;
}
@@ -1446,9 +1446,9 @@ bdbuf_test_1 (bdbuf_task_control* tasks)
/*
* Use pool 0.
- */
+ */
tasks[0].minor = 0;
-
+
bdbuf_send_wait_event ("master", "wake task 0", tasks[0].task);
return bdbuf_tests_finished (tasks);
@@ -1465,7 +1465,7 @@ static bool
bdbuf_test_2 (bdbuf_task_control* tasks)
{
int i;
-
+
tasks[0].test = 2;
tasks[1].test = 2;
tasks[2].test = 2;
@@ -1493,21 +1493,21 @@ bdbuf_test_2 (bdbuf_task_control* tasks)
* Wake task 2.
*/
bdbuf_send_wait_event ("master", "wake task 2", tasks[2].task);
-
+
for (i = 0; i < 5; i++)
{
/*
* Wake task 0 and watch task 2 then task 1 get the released buffer.
*/
bdbuf_send_wait_event ("master", "wake task 0", tasks[0].task);
-
+
/*
* Wait until task 2 has the buffer.
*/
if (bdbuf_wait ("master", BDBUF_SECONDS (5)) != RTEMS_SUCCESSFUL)
return false;
}
-
+
/*
* Wait for the tests to finish.
*/
@@ -1534,7 +1534,7 @@ bdbuf_test_3 (bdbuf_task_control* tasks)
* Wake task 0.
*/
bdbuf_send_wait_event ("master", "wake task 0", tasks[0].task);
-
+
return bdbuf_tests_finished (tasks);
}
@@ -1580,7 +1580,7 @@ bdbuf_test_4 (bdbuf_task_control* tasks)
* Wake task 0 to release it buffers.
*/
bdbuf_send_wait_event ("master", "wake task 0", tasks[0].task);
-
+
return bdbuf_tests_finished (tasks);
}
@@ -1626,7 +1626,7 @@ bdbuf_test_5 (bdbuf_task_control* tasks)
* Wake task 0 to release it buffers.
*/
bdbuf_send_wait_event ("master", "wake task 0", tasks[0].task);
-
+
return bdbuf_tests_finished (tasks);
}
@@ -1712,7 +1712,7 @@ typedef struct bdbuf_test_ident
const char* label;
bdbuf_test test;
} bdbuf_test_ident;
-
+
/**
* Table of tests.
*/
@@ -1775,7 +1775,7 @@ bdbuf_tester (void)
BDBUF_TESTS_PRI_HIGH + 1,
&old_priority),
true);
-
+
/*
* This sets up the buffer pools.
*/
@@ -1795,13 +1795,13 @@ bdbuf_tester (void)
/*
* Start the test tasks used to test the threading parts
* of the bdbuf code.
- */
+ */
for (t = 0; t < BDBUF_TEST_TASKS; t++)
{
bdbuf_task_control_init (t, &tasks[t],
rtems_task_self (),
major);
-
+
if (!bdbuf_tests_create_task (&tasks[t],
BDBUF_TESTS_PRI_HIGH - t,
bdbuf_test_tasks[t]))
diff --git a/testsuites/libtests/bspcmdline01/init.c b/testsuites/libtests/bspcmdline01/init.c
index 7fb82a5d4a..84553f520b 100644
--- a/testsuites/libtests/bspcmdline01/init.c
+++ b/testsuites/libtests/bspcmdline01/init.c
@@ -38,7 +38,7 @@ void test_errors(void)
assert( p == NULL );
bsp_boot_cmdline = NULL;
-
+
puts( "rtems_bsp_cmdline_get_param - bsp_boot_cmdline=NULL - returns NULL" );
p = rtems_bsp_cmdline_get_param( "name", result, 5 );
assert( p == NULL );
@@ -83,7 +83,7 @@ void test_search(
printf( "rtems_bsp_cmdline_get_param_raw(%s) returned (%s)\n", param, p );
else
printf( "rtems_bsp_cmdline_get_param_raw(%s) returned NULL\n", param );
-
+
assert( p );
}
diff --git a/testsuites/libtests/bspcmdline01/test.c b/testsuites/libtests/bspcmdline01/test.c
index 6bfdce03c1..9a795681e9 100644
--- a/testsuites/libtests/bspcmdline01/test.c
+++ b/testsuites/libtests/bspcmdline01/test.c
@@ -42,7 +42,7 @@ void test_errors(void)
assert( p == NULL );
bsp_boot_cmdline = NULL;
-
+
puts( "bsp_cmdline_get_param - bsp_boot_cmdline=NULL - returns NULL" );
p = bsp_cmdline_get_param( "name", result, 5 );
assert( p == NULL );
@@ -86,7 +86,7 @@ void test_search(
printf( "bsp_cmdline_get_param_raw(%s) returned (%s)\n", param, p );
else
printf( "bsp_cmdline_get_param_raw(%s) returned NULL\n", param );
-
+
assert( p );
}
@@ -116,7 +116,7 @@ void test_search(
void test_cmdline(void)
{
-
+
puts( "\n\n*** TEST OF PARSING BOOT COMMAND STRING ***" );
puts( "Test Parameter Error Conditions" );
diff --git a/testsuites/libtests/heapwalk/init.c b/testsuites/libtests/heapwalk/init.c
index 7e4d7e6ff9..56cf0627b1 100644
--- a/testsuites/libtests/heapwalk/init.c
+++ b/testsuites/libtests/heapwalk/init.c
@@ -204,7 +204,7 @@ static void test_main_loop(void)
Heap_Block *next_block = NULL;
puts( "Test the main loop" );
-
+
puts( "\tset the blocksize so, that the next block is outside the heap" );
test_heap_init_custom();
/* use all blocks */
@@ -270,7 +270,7 @@ static void test_check_free_block(void)
Heap_Block *first_free_block = NULL;
Heap_Block *secound_free_block = NULL;
void *p1 = NULL;
-
+
puts( "test the _Heap_Walk_check_free_block() function" );
puts( "\tset a previous size for the next block which is not equal to the size of the actual block" );
diff --git a/testsuites/libtests/malloctest/init.c b/testsuites/libtests/malloctest/init.c
index 47f1bf62dd..4210372ff5 100644
--- a/testsuites/libtests/malloctest/init.c
+++ b/testsuites/libtests/malloctest/init.c
@@ -139,7 +139,7 @@ static void test_heap_cases_1(void)
/*
* Another odd case. What we are trying to do from Sergei
- *
+ *
* 32-bit CPU when CPU_ALIGNMENT = 4 (most targets have 8) with the
* code like this:
*/
@@ -165,15 +165,15 @@ static void test_heap_cases_1(void)
/* XXX what should we expect */
test_free( p3 );
test_free( p1 );
-
+
/*
- * To tackle a special case of resizing a block in order to cover the
+ * To tackle a special case of resizing a block in order to cover the
* code in heapresizeblock.c
*
- * Re-initialise the heap, so that the blocks created from now on
+ * Re-initialise the heap, so that the blocks created from now on
* are contiguous.
*/
- test_heap_default_init();
+ test_heap_default_init();
puts( "Heap Initialized" );
p1 = _Heap_Allocate( &TestHeap, 400 );
rtems_test_assert( p1 != NULL );
@@ -182,7 +182,7 @@ static void test_heap_cases_1(void)
rsc = _Heap_Resize_block( &TestHeap, p1, 256, &u1, &u2 );
rtems_test_assert( rsc == HEAP_RESIZE_SUCCESSFUL );
test_free( p1 );
- test_free( p2 );
+ test_free( p2 );
}
#define TEST_DEFAULT_PAGE_SIZE 128
@@ -506,23 +506,23 @@ static void test_heap_allocate(void)
/* Force the page size to a small enough value */
TestHeap.page_size = page_size;
-
+
alignment = first_page_begin - sizeof(uintptr_t);
p1 = test_alloc( alloc_size, alignment, boundary, NULL );
-
+
first_page_begin = ((uintptr_t) TestHeap.first_block ) + HEAP_BLOCK_HEADER_SIZE;
alignment = first_page_begin + sizeof(uintptr_t);
p1 = test_alloc( alloc_size, alignment, boundary, NULL );
- first_page_begin = ((uintptr_t) TestHeap.first_block )
+ first_page_begin = ((uintptr_t) TestHeap.first_block )
+ HEAP_BLOCK_HEADER_SIZE;
alignment = first_page_begin;
p1 = test_alloc_simple( alloc_size, alignment, boundary );
-
+
puts( "\tallocate last block with different boundarys" );
page_size = TEST_DEFAULT_PAGE_SIZE;
test_heap_init( page_size );
- previous_last_block_begin = ((uintptr_t) TestHeap.last_block )
+ previous_last_block_begin = ((uintptr_t) TestHeap.last_block )
- TestHeap.min_block_size;
previous_last_page_begin = previous_last_block_begin
+ HEAP_BLOCK_HEADER_SIZE;
@@ -530,7 +530,7 @@ static void test_heap_allocate(void)
alignment = sizeof(uintptr_t);
boundary = 0;
p1 = test_alloc( alloc_size, alignment, boundary, (void *) (previous_last_page_begin + sizeof(uintptr_t)));
-
+
test_heap_init( page_size );
boundary = ((uintptr_t) TestHeap.last_block );
p1 = test_alloc( alloc_size, alignment, boundary, (void *) previous_last_page_begin );
@@ -561,15 +561,15 @@ static void test_heap_allocate(void)
boundary = (uintptr_t) TestHeap.last_block;
p1 = test_alloc( alloc_size, alignment, boundary, NULL );
-
+
alloc_size = 0;
p1 = test_alloc( alloc_size, alignment, boundary, NULL );
-
+
alloc_size = 1;
alignment = sizeof(uintptr_t);
boundary = 0;
p1 = test_alloc_simple( alloc_size, alignment, boundary );
-
+
puts( "\ttry to create a block, which is not possible because of the alignment and boundary" );
alloc_size = 2;
@@ -597,13 +597,13 @@ static void test_block_alloc(
int free_variant,
int alloc_variant,
uintptr_t alloc_begin,
- uintptr_t alloc_size
+ uintptr_t alloc_size
)
{
void *p1 = NULL;
void *p2 = NULL;
void *p3 = NULL;
-
+
uintptr_t size_fresh_heap = 0;
uintptr_t pages_per_default_block = 0;
uint32_t exp_free_pages = 0;
@@ -611,16 +611,16 @@ static void test_block_alloc(
uint32_t exp_used_blocks = 0;
test_heap_init( TEST_DEFAULT_PAGE_SIZE );
-
+
size_fresh_heap = _Heap_Get_size( &TestHeap );
exp_free_pages = size_fresh_heap / TestHeap.page_size;
p1 = test_create_used_block();
p2 = test_create_used_block();
p3 = test_create_used_block();
-
- pages_per_default_block = _Heap_Block_size(
- _Heap_Block_of_alloc_area( (uintptr_t) p1, TestHeap.page_size )
+
+ pages_per_default_block = _Heap_Block_size(
+ _Heap_Block_of_alloc_area( (uintptr_t) p1, TestHeap.page_size )
) / TestHeap.page_size;
if (free_variant == 1) {
@@ -640,13 +640,13 @@ static void test_block_alloc(
);
test_check_alloc_simple( (void *) alloc_begin, alloc_size, 0, 0 );
-
+
/* check statistics */
switch( free_variant ) {
case 1:
exp_free_pages = exp_free_pages - 2 * pages_per_default_block;
exp_used_blocks = 2;
-
+
switch( alloc_variant ) {
case 1:
/* allocate block full space */
@@ -672,7 +672,7 @@ static void test_block_alloc(
case 2:
exp_free_pages = exp_free_pages - 2 * pages_per_default_block;
exp_used_blocks = 2;
-
+
switch( alloc_variant ) {
case 1:
/* allocate block full space */
@@ -698,7 +698,7 @@ static void test_block_alloc(
case 3:
exp_free_pages = exp_free_pages - pages_per_default_block;
exp_used_blocks = 2;
-
+
switch( alloc_variant ) {
case 1:
/* allocate block full space */
@@ -725,7 +725,7 @@ static void test_block_alloc(
default:
exp_free_pages = exp_free_pages - 3 * pages_per_default_block;
exp_used_blocks = 3;
-
+
switch( alloc_variant ) {
case 1:
/* allocate block full space */
@@ -767,7 +767,7 @@ static void test_heap_do_block_allocate( int variant, void *p2 )
alloc_begin = alloc_box_begin;
alloc_size = 0;
test_block_alloc( variant, 0, alloc_begin, alloc_size );
-
+
puts( "\tallocate block full space");
alloc_begin = alloc_box_begin;
alloc_size = alloc_box_size + HEAP_BLOCK_SIZE_OFFSET
@@ -778,7 +778,7 @@ static void test_heap_do_block_allocate( int variant, void *p2 )
alloc_begin = alloc_box_begin + TEST_DEFAULT_PAGE_SIZE;
alloc_size = 0;
test_block_alloc( variant, 2, alloc_begin, alloc_size );
-
+
puts( "\tallocate block at the end");
alloc_begin = alloc_box_end - TEST_DEFAULT_PAGE_SIZE;
alloc_size = TEST_DEFAULT_PAGE_SIZE + HEAP_BLOCK_SIZE_OFFSET
@@ -853,7 +853,7 @@ static void test_simple_resize_block(
{
uintptr_t old_size = 0;
uintptr_t new_size = 0;
-
+
Heap_Resize_status status = _Heap_Resize_block(
&TestHeap,
alloc_pointer,
@@ -911,7 +911,7 @@ static void test_heap_resize_block(void)
test_simple_resize_block( p1, new_alloc_size, HEAP_RESIZE_SUCCESSFUL );
puts( "\tdecrease size");
-
+
puts( "\t\tdecrease a block with two pages to one page" );
test_heap_init( TEST_DEFAULT_PAGE_SIZE );
p1 = test_alloc_two_pages();
@@ -931,7 +931,7 @@ static void test_heap_extend(void)
/*
* Easier to hit extend with a dedicated heap.
- *
+ *
*/
_Heap_Initialize( &TestHeap, TestHeapMemory, 512, 0 );
@@ -954,7 +954,7 @@ static void test_heap_info(void)
s1 = malloc_free_space();
p1 = malloc( 512 );
s2 = malloc_free_space();
- puts( "malloc_free_space - check malloc space drops after malloc" );
+ puts( "malloc_free_space - check malloc space drops after malloc" );
rtems_test_assert( s1 );
rtems_test_assert( s2 );
rtems_test_assert( s2 <= s1 );
diff --git a/testsuites/libtests/malloctest/task1.c b/testsuites/libtests/malloctest/task1.c
index 289016f1bf..2c56a27351 100644
--- a/testsuites/libtests/malloctest/task1.c
+++ b/testsuites/libtests/malloctest/task1.c
@@ -14,7 +14,7 @@
*/
#include "system.h"
-#include <rtems/malloc.h>
+#include <rtems/malloc.h>
#include <string.h>
#include <stdlib.h>
diff --git a/testsuites/libtests/monitor02/init.c b/testsuites/libtests/monitor02/init.c
index 3fefa417ea..30088e7e58 100644
--- a/testsuites/libtests/monitor02/init.c
+++ b/testsuites/libtests/monitor02/init.c
@@ -23,7 +23,7 @@
/*
* HACK: API visibility violation
- * rtems_shell_main_monitor should better be declared in rtems/shell.h
+ * rtems_shell_main_monitor should better be declared in rtems/shell.h
*/
extern int rtems_shell_main_monitor(int argc, char **argv);
@@ -41,11 +41,11 @@ rtems_task Init(
int argc;
char *argv[MAX_ARGS];
char tmp[256];
-
+
puts( "\n*** START OF MONITOR02 ***\n");
-
+
for (i=0; i < MAX_ARGS && Commands[i] ; i++) {
- strcpy( tmp, Commands[i] );
+ strcpy( tmp, Commands[i] );
if (!rtems_shell_make_args(tmp, &argc, argv, MAX_ARGS) ) {
printf( "===> %s\n", Commands[i] );
rtems_shell_main_monitor(argc, argv);
diff --git a/testsuites/libtests/termios01/init.c b/testsuites/libtests/termios01/init.c
index dffbc43919..bf8fc59664 100644
--- a/testsuites/libtests/termios01/init.c
+++ b/testsuites/libtests/termios01/init.c
@@ -422,7 +422,7 @@ rtems_task Init(
/*
* Test character size
- */
+ */
puts(
"\n"
"Init - open - " TERMIOS_TEST_DRIVER_DEVICE_NAME " - OK"
@@ -444,7 +444,7 @@ rtems_task Init(
/*
* Test parity
- */
+ */
puts(
"\n"
"Init - open - " TERMIOS_TEST_DRIVER_DEVICE_NAME " - OK"
@@ -468,7 +468,7 @@ rtems_task Init(
/*
* Test stop bits
- */
+ */
puts(
"\n"
"Init - open - " TERMIOS_TEST_DRIVER_DEVICE_NAME " - OK"
diff --git a/testsuites/libtests/termios01/termios_testdriver.h b/testsuites/libtests/termios01/termios_testdriver.h
index 1a9a92ad17..2a17847f6a 100644
--- a/testsuites/libtests/termios01/termios_testdriver.h
+++ b/testsuites/libtests/termios01/termios_testdriver.h
@@ -44,7 +44,7 @@ extern "C" {
* @param[in] minor is the device driver minor number
* @param[in] arg is the parameters to this call
*
- * @return This method returns RTEMS_SUCCESSFUL when
+ * @return This method returns RTEMS_SUCCESSFUL when
* the device driver is successfully initialized.
*/
rtems_device_driver termios_test_driver_initialize(
@@ -52,7 +52,7 @@ rtems_device_driver termios_test_driver_initialize(
rtems_device_minor_number minor,
void *arg
);
-
+
/**
* @brief Console Open Entry Point
*
@@ -63,7 +63,7 @@ rtems_device_driver termios_test_driver_initialize(
* @param[in] minor is the device driver minor number
* @param[in] arg is the parameters to this call
*
- * @return This method returns RTEMS_SUCCESSFUL when
+ * @return This method returns RTEMS_SUCCESSFUL when
* the device driver is successfully opened.
*/
rtems_device_driver termios_test_driver_open(
@@ -82,7 +82,7 @@ rtems_device_driver termios_test_driver_open(
* @param[in] minor is the device driver minor number
* @param[in] arg is the parameters to this call
*
- * @return This method returns RTEMS_SUCCESSFUL when
+ * @return This method returns RTEMS_SUCCESSFUL when
* the device is successfully closed.
*/
rtems_device_driver termios_test_driver_close(
@@ -101,7 +101,7 @@ rtems_device_driver termios_test_driver_close(
* @param[in] minor is the device driver minor number
* @param[in] arg is the parameters to this call
*
- * @return This method returns RTEMS_SUCCESSFUL when
+ * @return This method returns RTEMS_SUCCESSFUL when
* the device is successfully read from.
*/
rtems_device_driver termios_test_driver_read(
@@ -120,7 +120,7 @@ rtems_device_driver termios_test_driver_read(
* @param[in] minor is the device driver minor number
* @param[in] arg is the parameters to this call
*
- * @return This method returns RTEMS_SUCCESSFUL when
+ * @return This method returns RTEMS_SUCCESSFUL when
* the device is successfully written.
*/
rtems_device_driver termios_test_driver_write(
@@ -139,7 +139,7 @@ rtems_device_driver termios_test_driver_write(
* @param[in] minor is the device driver minor number
* @param[in] arg is the parameters to this call
*
- * @return This method returns RTEMS_SUCCESSFUL when
+ * @return This method returns RTEMS_SUCCESSFUL when
* the device driver IO control operation is
* successfully performed.
*/
diff --git a/testsuites/libtests/tztest/init.c b/testsuites/libtests/tztest/init.c
index 9ccd6d13ce..9b514e7021 100644
--- a/testsuites/libtests/tztest/init.c
+++ b/testsuites/libtests/tztest/init.c
@@ -1,4 +1,4 @@
-/*
+/*
* This routine is the initialization task of test to exercise some
* timezone functionality.
*
@@ -45,7 +45,7 @@ rtems_task Init(
rtems_status_code status;
puts( "\n\n*** TIMEZONE TEST ***" );
-
+
build_time( &time, 3, 14, 2007, 15, 9, 26, 5 );
status = rtems_clock_set( &time );
directive_failed( status, "rtems_clock_set" );