forked from Imagelibrary/rtems
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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
|
||||
);
|
||||
}
|
||||
|
||||
@@ -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" );
|
||||
|
||||
@@ -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
|
||||
);
|
||||
}
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
|
||||
#include <rtems.h>
|
||||
#include <rtems/cpuuse.h>
|
||||
#include <rtems/printer.h>
|
||||
|
||||
#include "tmacros.h"
|
||||
|
||||
@@ -73,7 +72,6 @@ static void t2(rtems_task_argument arg)
|
||||
static void test(test_context *ctx)
|
||||
{
|
||||
rtems_status_code sc;
|
||||
rtems_printer printer;
|
||||
|
||||
ctx->one_tick_busy = rtems_test_get_one_tick_busy_count();
|
||||
|
||||
@@ -117,9 +115,8 @@ static void test(test_context *ctx)
|
||||
sc = rtems_task_suspend(ctx->task[1]);
|
||||
rtems_test_assert(sc == RTEMS_SUCCESSFUL);
|
||||
|
||||
rtems_print_printer_printf(&printer);
|
||||
rtems_cpu_usage_report_with_plugin(&printer);
|
||||
rtems_rate_monotonic_report_statistics_with_plugin(&printer);
|
||||
rtems_cpu_usage_report_with_plugin(&rtems_test_printer);
|
||||
rtems_rate_monotonic_report_statistics_with_plugin(&rtems_test_printer);
|
||||
}
|
||||
|
||||
static void Init(rtems_task_argument arg)
|
||||
|
||||
@@ -117,15 +117,13 @@ static void test_iterate(void)
|
||||
|
||||
static void test_report_xml(void)
|
||||
{
|
||||
rtems_printer printer;
|
||||
rtems_status_code sc;
|
||||
int rv;
|
||||
|
||||
sc = rtems_task_wake_after(3);
|
||||
rtems_test_assert(sc == RTEMS_SUCCESSFUL);
|
||||
|
||||
rtems_print_printer_printf(&printer);
|
||||
rv = rtems_profiling_report_xml("X", &printer, 1, " ");
|
||||
rv = rtems_profiling_report_xml("X", &rtems_test_printer, 1, " ");
|
||||
printf("characters produced by rtems_profiling_report_xml(): %i\n", rv);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user