diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-10-26 13:59:07 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-10-28 13:33:55 +0200 |
commit | 73d892d8a8da4fd35a2cad9b52405c6da0c8cb8f (patch) | |
tree | 0520913c846b9004f0590b31f699631238ebcb42 /testsuites/libtests | |
parent | 7bec7f2715f0f3495f59513e61c319fe65a3fd40 (diff) |
tests: Use rtems_test_printer
Update #3170.
Update #3199.
Diffstat (limited to 'testsuites/libtests')
-rw-r--r-- | testsuites/libtests/block14/init.c | 5 | ||||
-rw-r--r-- | testsuites/libtests/debugger01/init.c | 7 | ||||
-rw-r--r-- | testsuites/libtests/mouse01/init.c | 4 | ||||
-rw-r--r-- | testsuites/libtests/tar01/init.c | 29 | ||||
-rw-r--r-- | testsuites/libtests/uid01/init.c | 4 |
5 files changed, 18 insertions, 31 deletions
diff --git a/testsuites/libtests/block14/init.c b/testsuites/libtests/block14/init.c index fcbb1b5f66..d7cd640e25 100644 --- a/testsuites/libtests/block14/init.c +++ b/testsuites/libtests/block14/init.c @@ -120,11 +120,8 @@ static int test_disk_ioctl(rtems_disk_device *dd, uint32_t req, void *arg) static void test_actions(rtems_disk_device *dd) { - rtems_printer printer; int i; - rtems_print_printer_printf(&printer); - for (i = 0; i < ACTION_COUNT; ++i) { const test_action *action = &actions [i]; rtems_status_code sc; @@ -160,7 +157,7 @@ static void test_actions(rtems_disk_device *dd) ); } - rtems_blkdev_print_stats(&dd->stats, 0, 1, 2, &printer); + rtems_blkdev_print_stats(&dd->stats, 0, 1, 2, &rtems_test_printer); } static void test(void) diff --git a/testsuites/libtests/debugger01/init.c b/testsuites/libtests/debugger01/init.c index e7db8fe15d..1bb28d4992 100644 --- a/testsuites/libtests/debugger01/init.c +++ b/testsuites/libtests/debugger01/init.c @@ -25,14 +25,11 @@ static void test(void) { - rtems_printer printer; - - rtems_print_printer_fprintf(&printer, stdout); rtems_test_assert(rtems_debugger_start("test", "something", - 3, 10, &printer) < 0); + 3, 10, &rtems_test_printer) < 0); rtems_test_assert(rtems_debugger_register_test_remote() == 0); rtems_test_assert(rtems_debugger_start("test", "something", - 3, 10, &printer) == 0); + 3, 10, &rtems_test_printer) == 0); rtems_debugger_set_verbose(true); rtems_test_assert(rtems_debugger_remote_debug(true) == 0); diff --git a/testsuites/libtests/mouse01/init.c b/testsuites/libtests/mouse01/init.c index 145887a15a..24d6a2e0cc 100644 --- a/testsuites/libtests/mouse01/init.c +++ b/testsuites/libtests/mouse01/init.c @@ -97,10 +97,8 @@ void printf_uid_message( struct MW_UID_MESSAGE *uid ) { - rtems_printer printer; - rtems_print_printer_printf( &printer ); uid_print_message_with_plugin( - &printer, + &rtems_test_printer, uid ); } diff --git a/testsuites/libtests/tar01/init.c b/testsuites/libtests/tar01/init.c index ffc49b68c1..8f3d69094c 100644 --- a/testsuites/libtests/tar01/init.c +++ b/testsuites/libtests/tar01/init.c @@ -69,12 +69,13 @@ static void test_untar_check_mode(const char* file, int mode) void test_untar_from_memory(void) { rtems_status_code sc; - rtems_printer printer; - - rtems_print_printer_printf(&printer); printf("Untaring from memory - "); - sc = Untar_FromMemory_Print((void *)TARFILE_START, TARFILE_SIZE, &printer); + sc = Untar_FromMemory_Print( + (void *)TARFILE_START, + TARFILE_SIZE, + &rtems_test_printer + ); if (sc != RTEMS_SUCCESSFUL) { printf ("error: untar failed: %s\n", rtems_status_text (sc)); exit(1); @@ -146,7 +147,6 @@ void test_untar_from_file(void) void test_untar_chunks_from_memory(void) { rtems_status_code sc; - rtems_printer printer; int rv; Untar_ChunkContext ctx; unsigned long counter = 0; @@ -155,8 +155,6 @@ void test_untar_chunks_from_memory(void) puts( "" ); - rtems_print_printer_printf(&printer); - /* make a directory to untar it into */ rv = mkdir( "/dest2", 0777 ); rtems_test_assert( rv == 0 ); @@ -167,7 +165,12 @@ void test_untar_chunks_from_memory(void) printf( "Untaring chunks from memory - " ); Untar_ChunkContext_Init(&ctx); do { - sc = Untar_FromChunk_Print(&ctx, &buffer[counter], (size_t)1 , &printer); + sc = Untar_FromChunk_Print( + &ctx, + &buffer[counter], + (size_t)1 , + &rtems_test_printer + ); rtems_test_assert(sc == RTEMS_SUCCESSFUL); counter ++; } while (counter < buflen); @@ -191,7 +194,6 @@ void test_untar_chunks_from_memory(void) void test_untar_unzip_tgz(void) { int status; - rtems_printer printer; int rv; Untar_GzChunkContext ctx; size_t i = 0; @@ -203,8 +205,6 @@ void test_untar_unzip_tgz(void) rtems_test_assert( buflen != 0 ); - rtems_print_printer_printf(&printer); - /* make a directory to untar it into */ rv = mkdir( "/dest3", 0777 ); rtems_test_assert( rv == 0 ); @@ -217,7 +217,7 @@ void test_untar_unzip_tgz(void) status = Untar_GzChunkContext_Init(&ctx, &inflate_buffer, 1); rtems_test_assert(status == UNTAR_SUCCESSFUL); for(i = 0; i < buflen; i++) { - status = Untar_FromGzChunk_Print(&ctx, &buffer[i], 1, &printer); + status = Untar_FromGzChunk_Print(&ctx, &buffer[i], 1, &rtems_test_printer); rtems_test_assert(status == UNTAR_SUCCESSFUL); } printf( "successful\n" ); @@ -240,7 +240,6 @@ void test_untar_unzip_txz(void) { #if HAVE_XZ int status; - rtems_printer printer; int rv; Untar_XzChunkContext ctx; size_t i = 0; @@ -252,8 +251,6 @@ void test_untar_unzip_txz(void) rtems_test_assert( buflen != 0 ); - rtems_print_printer_printf(&printer); - /* make a directory to untar it into */ rv = mkdir( "/dest4", 0777 ); rtems_test_assert( rv == 0 ); @@ -270,7 +267,7 @@ void test_untar_unzip_txz(void) 8 * 1024, &inflate_buffer, 1); rtems_test_assert(status == UNTAR_SUCCESSFUL); for(i = 0; i < buflen; i++) { - status = Untar_FromXzChunk_Print(&ctx, &buffer[i], 1, &printer); + status = Untar_FromXzChunk_Print(&ctx, &buffer[i], 1, &rtems_test_printer); rtems_test_assert(status == UNTAR_SUCCESSFUL); } printf( "successful\n" ); diff --git a/testsuites/libtests/uid01/init.c b/testsuites/libtests/uid01/init.c index 56eba61a94..90490fa48c 100644 --- a/testsuites/libtests/uid01/init.c +++ b/testsuites/libtests/uid01/init.c @@ -71,10 +71,8 @@ void printf_uid_message( struct MW_UID_MESSAGE *uid ) { - rtems_printer printer; - rtems_print_printer_printf( &printer ); uid_print_message_with_plugin( - &printer, + &rtems_test_printer, uid ); } |