summaryrefslogtreecommitdiffstats
path: root/testsuites/fstests/tftpfs/init.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--testsuites/fstests/tftpfs/init.c63
1 files changed, 5 insertions, 58 deletions
diff --git a/testsuites/fstests/tftpfs/init.c b/testsuites/fstests/tftpfs/init.c
index fe18476ef3..38e429f11e 100644
--- a/testsuites/fstests/tftpfs/init.c
+++ b/testsuites/fstests/tftpfs/init.c
@@ -14,7 +14,7 @@
*/
/*
- * Copyright (C) 2022 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 2022 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -42,6 +42,7 @@
#include "config.h"
#endif
+#include <stdio.h>
#include <stdlib.h> /* malloc(), free() */
#include <ctype.h> /* isprint() */
#include <errno.h>
@@ -919,7 +920,7 @@ T_TEST_CASE( tftp_read_null_buffer )
*/
T_TEST_CASE( tftp_write_null_tftp_handle )
{
- char data_buffer[10];
+ char data_buffer[10] = { 0 };
ssize_t res;
res = tftp_write(
@@ -6895,65 +6896,11 @@ T_TEST_CASE_FIXTURE( OACK_with_surplus_option, &fixture_large_blocksize )
T_no_more_interactions();
}
-/*
- * Test suite and configuration
- */
-
const char rtems_test_name[] = "TFTPFS";
-static char buffer[ 512 ];
-
-static const T_action actions[] = {
- T_report_hash_sha256,
- T_check_task_context,
- T_check_file_descriptors,
- T_check_rtems_barriers,
- T_check_rtems_extensions,
- T_check_rtems_message_queues,
- T_check_rtems_partitions,
- T_check_rtems_periods,
- T_check_rtems_regions,
- T_check_rtems_semaphores,
- T_check_rtems_tasks,
- T_check_rtems_timers,
- T_check_posix_keys
-};
-
-static const T_config config = {
- .name = rtems_test_name,
- .buf = buffer,
- .buf_size = sizeof( buffer ),
- .putchar = T_putchar_default,
- .verbosity = RTEMS_TEST_VERBOSITY,
- .now = T_now_clock,
- .allocate = T_memory_allocate,
- .deallocate = T_memory_deallocate,
- .action_count = T_ARRAY_SIZE( actions ),
- .actions = actions
-};
-
static void Init( rtems_task_argument argument )
{
- (void) argument;
- int exit_code;
-
- /*
- * It would be much easier to simply use
- * rtems_test_run( argument, TEST_STATE );
- * instead of all the code below and the variables
- * buffer, actions, config
- * above. Yet, rtems_test_run() sets the verbosity always to
- * T_VERBOSE and this would produce plenty of output.
- */
- rtems_test_begin( rtems_test_name, TEST_STATE );
- T_register();
- exit_code = T_main( &config );
-
- if ( exit_code == 0 ) {
- rtems_test_end( rtems_test_name );
- }
-
- rtems_fatal( RTEMS_FATAL_SOURCE_EXIT, (uint32_t) exit_code );
+ rtems_test_run( argument, TEST_STATE );
}
/*
@@ -6968,7 +6915,7 @@ static void Init( rtems_task_argument argument )
*/
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
-#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER
#define CONFIGURE_MAXIMUM_TASKS 1