tests/libtests: Use <rtems/test.h>

This commit is contained in:
Sebastian Huber
2014-03-17 08:10:40 +01:00
parent 802d3ba712
commit f8b2eb03f7
82 changed files with 449 additions and 146 deletions

View File

@@ -33,6 +33,8 @@
#include <rtems/ramdisk.h>
#include <rtems/diskdevs.h>
const char rtems_test_name[] = "BLOCK 1";
/* forward declarations to avoid warnings */
static rtems_task Init(rtems_task_argument argument);
@@ -235,11 +237,11 @@ static void test_diskdevs(void)
static rtems_task Init(rtems_task_argument argument)
{
puts("\n\n*** TEST BLOCK 1 ***");
TEST_BEGIN();
test_diskdevs();
puts("*** END OF TEST BLOCK 1 ***");
TEST_END();
exit(0);
}
@@ -256,6 +258,8 @@ static rtems_task Init(rtems_task_argument argument)
#define CONFIGURE_MAXIMUM_TASKS 1
#define CONFIGURE_MAXIMUM_DRIVERS 2
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#include <rtems/confdefs.h>

View File

@@ -31,6 +31,8 @@
#include <rtems/bdbuf.h>
#include <rtems/diskdevs.h>
const char rtems_test_name[] = "BLOCK 2";
/* forward declarations to avoid warnings */
static rtems_task Init(rtems_task_argument argument);
@@ -80,7 +82,7 @@ static void task_low(rtems_task_argument arg)
rtems_test_assert(bd->dd == dd_a);
printk("*** END OF TEST BLOCK 2 ***\n");
rtems_test_endk();
exit(0);
}
@@ -134,7 +136,7 @@ static rtems_task Init(rtems_task_argument argument)
dev_t dev_a = 0;
dev_t dev_b = 0;
printk("\n\n*** TEST BLOCK 2 ***\n");
rtems_test_begink();
sc = rtems_disk_io_initialize();
ASSERT_SC(sc);
@@ -202,6 +204,8 @@ static rtems_task Init(rtems_task_argument argument)
#define CONFIGURE_MAXIMUM_TASKS 3
#define CONFIGURE_MAXIMUM_DRIVERS 3
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_INIT_TASK_PRIORITY PRIORITY_INIT

View File

@@ -31,6 +31,8 @@
#include <rtems/bdbuf.h>
#include <rtems/diskdevs.h>
const char rtems_test_name[] = "BLOCK 3";
/* forward declarations to avoid warnings */
static rtems_task Init(rtems_task_argument argument);
@@ -74,7 +76,7 @@ static void task_low(rtems_task_argument arg)
rtems_test_assert(bd->block == 0);
printk("*** END OF TEST BLOCK 3 ***\n");
rtems_test_endk();
exit(0);
}
@@ -127,7 +129,7 @@ static rtems_task Init(rtems_task_argument argument)
rtems_bdbuf_buffer *bd = NULL;
dev_t dev = 0;
printk("\n\n*** TEST BLOCK 3 ***\n");
rtems_test_begink();
sc = rtems_disk_io_initialize();
ASSERT_SC(sc);
@@ -189,6 +191,8 @@ static rtems_task Init(rtems_task_argument argument)
#define CONFIGURE_MAXIMUM_TASKS 3
#define CONFIGURE_MAXIMUM_DRIVERS 2
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_INIT_TASK_PRIORITY PRIORITY_INIT

View File

@@ -31,6 +31,8 @@
#include <rtems/bdbuf.h>
#include <rtems/diskdevs.h>
const char rtems_test_name[] = "BLOCK 4";
/* forward declarations to avoid warnings */
static rtems_task Init(rtems_task_argument argument);
@@ -99,7 +101,7 @@ static void task_high(rtems_task_argument arg)
printk("H: release done: 0\n");
printk("*** END OF TEST BLOCK 4 ***\n");
rtems_test_endk();
exit(0);
}
@@ -109,7 +111,7 @@ static rtems_task Init(rtems_task_argument argument)
rtems_status_code sc = RTEMS_SUCCESSFUL;
dev_t dev = 0;
printk("\n\n*** TEST BLOCK 4 ***\n");
rtems_test_begink();
sc = rtems_disk_io_initialize();
ASSERT_SC(sc);
@@ -161,6 +163,8 @@ static rtems_task Init(rtems_task_argument argument)
#define CONFIGURE_MAXIMUM_TASKS 3
#define CONFIGURE_MAXIMUM_DRIVERS 2
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_INIT_TASK_PRIORITY PRIORITY_INIT

View File

@@ -32,6 +32,8 @@
#include <rtems/bdbuf.h>
#include <rtems/diskdevs.h>
const char rtems_test_name[] = "BLOCK 5";
/* forward declarations to avoid warnings */
static rtems_task Init(rtems_task_argument argument);
@@ -424,7 +426,7 @@ static rtems_task Init(rtems_task_argument argument)
rtems_status_code sc = RTEMS_SUCCESSFUL;
unsigned i = 0;
printk("\n\n*** TEST BLOCK 5 ***\n");
rtems_test_begink();
task_id_init = rtems_task_self();
@@ -503,7 +505,7 @@ static rtems_task Init(rtems_task_argument argument)
}
}
printk("*** END OF TEST BLOCK 5 ***\n");
rtems_test_endk();
exit(0);
}
@@ -519,6 +521,8 @@ static rtems_task Init(rtems_task_argument argument)
#define CONFIGURE_MAXIMUM_TASKS 4
#define CONFIGURE_MAXIMUM_DRIVERS 4
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_INIT_TASK_PRIORITY PRIORITY_INIT

View File

@@ -32,6 +32,10 @@
#include <bsp.h>
#include <tmacros.h>
const char rtems_test_name[] = "BLOCK 6";
/* forward declarations to avoid warnings */
static rtems_task Init(rtems_task_argument argument);
@@ -1831,11 +1835,11 @@ bdbuf_tester (void)
static rtems_task Init(rtems_task_argument argument)
{
printf ("\n\n*** TEST BLOCK 6 ***\n");
TEST_BEGIN();
bdbuf_tester ();
printf ("*** END OF TEST BLOCK 6 ***\n");
TEST_END();
exit (0);
}
@@ -1858,6 +1862,8 @@ static rtems_task Init(rtems_task_argument argument)
(BDBUF_TEST_TASKS * BDBUF_TEST_STACK_SIZE)
#define CONFIGURE_INIT_TASK_STACK_SIZE BDBUF_TEST_STACK_SIZE
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#include <rtems/confdefs.h>

View File

@@ -34,6 +34,8 @@
#include <rtems/bdbuf.h>
#include <rtems/diskdevs.h>
const char rtems_test_name[] = "BLOCK 7";
/* forward declarations to avoid warnings */
static rtems_task Init(rtems_task_argument argument);
@@ -100,7 +102,7 @@ static void task_low(rtems_task_argument arg)
printk("L: release done: 0\n");
printk("*** END OF TEST BLOCK 7 ***\n");
rtems_test_endk();
exit(0);
}
@@ -162,7 +164,7 @@ static rtems_task Init(rtems_task_argument argument)
rtems_bdbuf_buffer *bd = NULL;
dev_t dev = 0;
printk("\n\n*** TEST BLOCK 7 ***\n");
rtems_test_begink();
sc = rtems_disk_io_initialize();
ASSERT_SC(sc);
@@ -265,6 +267,8 @@ static rtems_task Init(rtems_task_argument argument)
#define CONFIGURE_MAXIMUM_TASKS 4
#define CONFIGURE_MAXIMUM_DRIVERS 2
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_INIT_TASK_PRIORITY PRIORITY_INIT

View File

@@ -24,11 +24,13 @@
#include "bdbuf_tests.h"
const char rtems_test_name[] = "BLOCK 8";
rtems_task Init(rtems_task_argument argument)
{
puts( "\n\n*** TEST BLOCK 8 ***" );
rtems_test_begin();
run_bdbuf_tests();
puts( "*** END OF TEST BLOCK 8 ***" );
rtems_test_end();
exit(0);
}

View File

@@ -12,7 +12,8 @@
*/
#include <rtems.h>
#include "rtems/blkdev.h"
#include <rtems/blkdev.h>
#include <rtems/test.h>
#include <bsp.h>
@@ -46,6 +47,8 @@ rtems_task Init(
*/
#define CONFIGURE_MAXIMUM_DRIVERS 5
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_INIT_TASK_STACK_SIZE (4 * RTEMS_MINIMUM_STACK_SIZE)

View File

@@ -30,9 +30,12 @@
#include <rtems.h>
#include <rtems/bdbuf.h>
#include <rtems/diskdevs.h>
#include <rtems/test.h>
#include <bsp.h>
const char rtems_test_name[] = "BLOCK 9";
/* forward declarations to avoid warnings */
static rtems_task Init(rtems_task_argument argument);
@@ -172,7 +175,7 @@ static rtems_task Init(rtems_task_argument argument)
dev_t dev = 0;
rtems_disk_device *dd = NULL;
printk("\n\n*** TEST BLOCK 9 ***\n");
rtems_test_begink();
sc = rtems_disk_io_initialize();
ASSERT_SC(sc);
@@ -220,7 +223,7 @@ static rtems_task Init(rtems_task_argument argument)
sc = rtems_disk_release(dd);
ASSERT_SC(sc);
printk("*** END OF TEST BLOCK 9 ***\n");
rtems_test_endk();
exit(0);
}
@@ -236,6 +239,8 @@ static rtems_task Init(rtems_task_argument argument)
#define CONFIGURE_MAXIMUM_TASKS 1
#define CONFIGURE_MAXIMUM_DRIVERS 4
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_BDBUF_BUFFER_MIN_SIZE BLOCK_SIZE

View File

@@ -29,9 +29,12 @@
#include <rtems.h>
#include <rtems/bdbuf.h>
#include <rtems/diskdevs.h>
#include <rtems/test.h>
#include <bsp.h>
const char rtems_test_name[] = "BLOCK 10";
/* forward declarations to avoid warnings */
static rtems_task Init(rtems_task_argument argument);
@@ -398,7 +401,7 @@ static rtems_task Init(rtems_task_argument argument)
size_t i_rel = 0;
size_t i_p = 0;
printk("\n\n*** TEST BLOCK 10 ***\n");
rtems_test_begink();
task_id_init = rtems_task_self();
@@ -462,7 +465,7 @@ static rtems_task Init(rtems_task_argument argument)
}
}
printk("*** END OF TEST BLOCK 10 ***\n");
rtems_test_endk();
exit(0);
}
@@ -478,6 +481,8 @@ static rtems_task Init(rtems_task_argument argument)
#define CONFIGURE_MAXIMUM_TASKS 3
#define CONFIGURE_MAXIMUM_DRIVERS 4
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_INIT_TASK_PRIORITY PRIORITY_INIT

View File

@@ -37,6 +37,8 @@
#include <rtems/diskdevs.h>
#include <rtems/malloc.h>
const char rtems_test_name[] = "BLOCK 11";
/* forward declarations to avoid warnings */
static rtems_task Init(rtems_task_argument argument);
@@ -401,7 +403,7 @@ static rtems_task Init(rtems_task_argument argument)
{
rtems_status_code sc;
puts("\n\n*** TEST BLOCK 11 ***");
TEST_BEGIN();
sc = rtems_disk_io_initialize();
ASSERT_SC(sc);
@@ -413,7 +415,7 @@ static rtems_task Init(rtems_task_argument argument)
sc = rtems_disk_io_done();
ASSERT_SC(sc);
puts("*** END OF TEST BLOCK 11 ***");
TEST_END();
exit(0);
}
@@ -434,6 +436,8 @@ static rtems_task Init(rtems_task_argument argument)
#define CONFIGURE_MAXIMUM_TASKS 1
#define CONFIGURE_MAXIMUM_DRIVERS 2
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#include <rtems/confdefs.h>

View File

@@ -24,6 +24,8 @@
#include <rtems/blkdev.h>
#include <rtems/bdbuf.h>
const char rtems_test_name[] = "BLOCK 12";
#define BLOCK_COUNT 15
static int block_access_counts [BLOCK_COUNT];
@@ -123,11 +125,11 @@ static void test(void)
static void Init(rtems_task_argument arg)
{
puts("\n\n*** TEST BLOCK 12 ***");
TEST_BEGIN();
test();
puts("*** END OF TEST BLOCK 12 ***");
TEST_END();
rtems_test_exit(0);
}
@@ -144,6 +146,8 @@ static void Init(rtems_task_argument arg)
#define CONFIGURE_MAXIMUM_TASKS 1
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_INIT

View File

@@ -24,6 +24,8 @@
#include <rtems/blkdev.h>
#include <rtems/bdbuf.h>
const char rtems_test_name[] = "BLOCK 13";
#define BLOCK_COUNT 11
#define READ_COUNT 23
@@ -209,11 +211,11 @@ static void test(void)
static void Init(rtems_task_argument arg)
{
puts("\n\n*** TEST BLOCK 13 ***");
TEST_BEGIN();
test();
puts("*** END OF TEST BLOCK 13 ***");
TEST_END();
rtems_test_exit(0);
}
@@ -232,6 +234,8 @@ static void Init(rtems_task_argument arg)
#define CONFIGURE_MAXIMUM_TASKS 1
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_INIT_TASK_INITIAL_MODES RTEMS_DEFAULT_MODES

View File

@@ -24,6 +24,8 @@
#include <rtems/blkdev.h>
#include <rtems/bdbuf.h>
const char rtems_test_name[] = "BLOCK 14";
#define ACTION_COUNT 7
#define BLOCK_COUNT 6
@@ -189,11 +191,11 @@ static void test(void)
static void Init(rtems_task_argument arg)
{
puts("\n\n*** TEST BLOCK 14 ***");
TEST_BEGIN();
test();
puts("*** END OF TEST BLOCK 14 ***");
TEST_END();
rtems_test_exit(0);
}
@@ -212,6 +214,8 @@ static void Init(rtems_task_argument arg)
#define CONFIGURE_MAXIMUM_TASKS 1
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_INIT_TASK_INITIAL_MODES RTEMS_DEFAULT_MODES

View File

@@ -25,6 +25,8 @@
#include <rtems/blkdev.h>
#include <rtems/bdbuf.h>
const char rtems_test_name[] = "BLOCK 15";
#define BLOCK_COUNT 20
#define ACTION_COUNT 8
@@ -154,11 +156,11 @@ static void test(void)
static void Init(rtems_task_argument arg)
{
puts("\n\n*** TEST BLOCK 15 ***");
TEST_BEGIN();
test();
puts("*** END OF TEST BLOCK 15 ***");
TEST_END();
rtems_test_exit(0);
}
@@ -176,6 +178,8 @@ static void Init(rtems_task_argument arg)
#define CONFIGURE_MAXIMUM_TASKS 1
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_INIT

View File

@@ -28,6 +28,8 @@
#include <rtems/ramdisk.h>
#include <rtems/bdbuf.h>
const char rtems_test_name[] = "BLOCK 16";
#define ASSERT_SC(sc) rtems_test_assert((sc) == RTEMS_SUCCESSFUL)
static void test(void)
@@ -123,11 +125,11 @@ static void test(void)
static void Init(rtems_task_argument arg)
{
puts("\n\n*** TEST BLOCK 16 ***");
TEST_BEGIN();
test();
puts("*** END OF TEST BLOCK 16 ***");
TEST_END();
rtems_test_exit(0);
}
@@ -146,6 +148,8 @@ static void Init(rtems_task_argument arg)
#define CONFIGURE_MAXIMUM_TASKS 1
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_INIT

View File

@@ -20,6 +20,8 @@
#include "tmacros.h"
const char rtems_test_name[] = "BLOCK 17";
static void test(void)
{
rtems_status_code sc = rtems_bdbuf_init();
@@ -28,11 +30,11 @@ static void test(void)
static void Init(rtems_task_argument arg)
{
puts("\n\n*** TEST BLOCK 17 ***");
TEST_BEGIN();
test();
puts("*** END OF TEST BLOCK 17 ***");
TEST_END();
rtems_test_exit(0);
}
@@ -47,6 +49,8 @@ static void Init(rtems_task_argument arg)
#define CONFIGURE_MAXIMUM_TASKS 1
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_INIT

View File

@@ -14,6 +14,8 @@
#include <tmacros.h>
#include <rtems/bspcmdline.h>
const char rtems_test_name[] = "BSPCMDLINE 1";
/* forward declarations to avoid warnings */
rtems_task Init(rtems_task_argument argument);
void test_errors(void);
@@ -140,7 +142,7 @@ rtems_task Init(
{
const char *bspcmdline;
puts( "\n\n*** TEST OF PARSING BOOT COMMAND STRING ***" );
TEST_BEGIN();
bspcmdline = rtems_bsp_cmdline_get();
if ( bspcmdline ) {
@@ -166,7 +168,7 @@ rtems_task Init(
"-name"
);
puts( "*** END OF OF PARSING BOOT COMMAND STRING ***" );
TEST_END();
rtems_test_exit(0);
}
@@ -176,6 +178,8 @@ rtems_task Init(
#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
#define CONFIGURE_MAXIMUM_TASKS 1
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_INIT

View File

@@ -24,6 +24,9 @@
#if __rtems__
#include <bsp.h> /* for device driver prototypes */
#include <rtems/test.h>
const char rtems_test_name[] = "COMPLEX";
#endif
#include <stdio.h>
@@ -42,6 +45,8 @@ extern void docomplexl(void);
#define CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM
#define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_FLOATING_POINT
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_INIT
@@ -54,11 +59,15 @@ rtems_task Init(
int main( void )
#endif
{
fprintf( stdout, "*** COMPLEX MATH TEST ***\n" );
#if __rtems__
rtems_test_begin();
#endif
docomplex();
docomplexf();
docomplexl();
fprintf( stdout, "*** END OF COMPLEX MATH TEST ***\n" );
#if __rtems__
rtems_test_end();
#endif
exit( 0 );
}

View File

@@ -22,6 +22,8 @@
#define CONFIGURE_INIT
#include "system.h"
const char rtems_test_name[] = "CPUUSE";
rtems_extensions_table Extensions = {
NULL, /* task create user extension */
NULL, /* task start user extension */
@@ -40,7 +42,7 @@ rtems_task Init(
rtems_status_code status;
rtems_time_of_day time;
puts( "\n\n*** CPU USAGE LIBRARY TEST ***" );
TEST_BEGIN();
build_time( &time, 12, 31, 1988, 9, 15, 0, 0 );
status = rtems_clock_set( &time );

View File

@@ -46,6 +46,8 @@ void Task_switch(
#define CONFIGURE_MAXIMUM_TASKS 4
#define CONFIGURE_TICKS_PER_TIMESLICE 100
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#include <rtems/confdefs.h>

View File

@@ -51,6 +51,6 @@ rtems_task Task_2(
puts( "" );
rtems_cpu_usage_report();
puts( "" );
puts( "*** END OF CPU USAGE LIBRARY TEST ***" );
TEST_END();
rtems_test_exit( 0 );
}

View File

@@ -16,6 +16,8 @@
#include <rtems/devfs.h>
#include <errno.h>
const char rtems_test_name[] = "DEVFS 1";
/* forward declarations to avoid warnings */
rtems_task Init(rtems_task_argument argument);
@@ -23,12 +25,12 @@ rtems_task Init(
rtems_task_argument argument
)
{
puts( "\n\n*** TEST DEVFS01 ***" );
TEST_BEGIN();
puts( "devFS_Show" );
devFS_Show();
puts( "*** END OF TEST DEVFS01 ***" );
TEST_END();
rtems_test_exit(0);
}
@@ -39,6 +41,8 @@ rtems_task Init(
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
#define CONFIGURE_MAXIMUM_TASKS 1
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM

View File

@@ -26,6 +26,8 @@
#include <rtems/devfs.h>
#include <rtems/malloc.h>
const char rtems_test_name[] = "DEVFS 2";
/* forward declarations to avoid warnings */
rtems_task Init(rtems_task_argument argument);
@@ -42,7 +44,7 @@ rtems_task Init(
};
void *opaque;
puts( "\n\n*** TEST DEVFS02 ***" );
TEST_BEGIN();
puts( "Init - attempt to create a fifo - expect ENOTSUP" );
status = mkfifo( "/fifo01", 0 );
@@ -80,7 +82,7 @@ rtems_task Init(
rtems_test_assert( status == -1 );
rtems_test_assert( errno == EEXIST );
puts( "*** END OF TEST DEVFS02 ***" );
TEST_END();
rtems_test_exit(0);
}
@@ -91,6 +93,8 @@ rtems_task Init(
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
#define CONFIGURE_MAXIMUM_TASKS 1
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 5

View File

@@ -23,6 +23,8 @@
#include <sys/stat.h>
#include <fcntl.h>
const char rtems_test_name[] = "DEVFS 3";
/* forward declarations to avoid warnings */
rtems_task Init(rtems_task_argument argument);
@@ -37,7 +39,7 @@ rtems_task Init(
.count = 1
};
puts( "\n\n*** TEST DEVFS03 ***" );
TEST_BEGIN();
memset(nodes, 0, sizeof(nodes));
@@ -74,7 +76,7 @@ rtems_task Init(
status = rmdir( "/dir01" );
rtems_test_assert( status == 0 );
puts( "*** END OF TEST DEVFS03 ***" );
TEST_END();
rtems_test_exit(0);
}
@@ -86,6 +88,8 @@ rtems_task Init(
#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 4
#define CONFIGURE_MAXIMUM_TASKS 1
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM

View File

@@ -22,6 +22,8 @@
#include "test_driver.h"
#include <rtems/devnull.h>
const char rtems_test_name[] = "DEVFS 4";
/* forward declarations to avoid warnings */
rtems_task Init(rtems_task_argument argument);
@@ -33,7 +35,7 @@ rtems_task Init(
int fdr = 0, fdw = 0;
char buf[10];
puts( "\n\n*** TEST DEVFS04 ***" );
TEST_BEGIN();
puts( "Init - attempt to open the /dev/test WR mode -- OK" );
fdw = open( "/dev/test", O_WRONLY );
@@ -70,7 +72,7 @@ rtems_task Init(
status = mknod( "/dev/null", 0777 | S_IFCHR, 0LL );
rtems_test_assert( status == 0 );
puts( "*** END OF TEST DEVFS04 ***" );
TEST_END();
rtems_test_exit(0);
}
@@ -87,6 +89,8 @@ rtems_task Init(
#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 5
#define CONFIGURE_MAXIMUM_TASKS 1
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM

View File

@@ -22,6 +22,8 @@
#include "test_driver.h"
#include <rtems/devnull.h>
const char rtems_test_name[] = "DEVICEIO 1";
/* forward declarations to avoid warnings */
rtems_task Init(rtems_task_argument argument);
@@ -33,7 +35,7 @@ rtems_task Init(
int fdr = 0, fdw = 0;
char buf[10];
puts( "\n\n*** TEST DEVICEIO - 01 ***" );
TEST_BEGIN();
puts( "Init - attempt to open the /dev/test WR mode -- OK" );
fdw = open( "/dev/test", O_WRONLY );
@@ -58,7 +60,7 @@ rtems_task Init(
rtems_test_assert( status == -1 );
rtems_test_assert( errno == ENOSYS );
puts( "*** END OF TEST DEVICEIO - 01 ***" );
TEST_END();
rtems_test_exit(0);
}
@@ -74,6 +76,8 @@ rtems_task Init(
#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 5
#define CONFIGURE_MAXIMUM_TASKS 1
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM

View File

@@ -15,6 +15,8 @@
#include "test_support.h"
#include <rtems/dumpbuf.h>
const char rtems_test_name[] = "DUMPBUF 1";
/* forward declarations to avoid warnings */
rtems_task Init(rtems_task_argument argument);
void do_test(int length);
@@ -36,14 +38,14 @@ rtems_task Init(
{
int i;
puts( "\n\n*** TEST DUMPBUF01 ***" );
TEST_BEGIN();
for ( i = 0 ; i < sizeof(Buffer) ; i++ ) {
do_test( i );
}
do_test( -1 );
puts( "*** END OF TEST DUMPBUF01 ***" );
TEST_END();
rtems_test_exit(0);
}
@@ -54,6 +56,8 @@ rtems_task Init(
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
#define CONFIGURE_MAXIMUM_TASKS 1
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_INIT

View File

@@ -22,6 +22,9 @@
#include <assert.h>
#include <rtems.h>
#include <rtems/test.h>
const char rtems_test_name[] = "EXIT 1";
#define EXIT_STATUS 123
@@ -57,7 +60,7 @@ static void fatal_extension(
&& error == EXIT_STATUS
&& counter == 3
) {
printk("*** END OF TEST EXIT 1 ***\n");
rtems_test_endk();
}
}
@@ -82,7 +85,7 @@ static void Init(rtems_task_argument arg)
rtems_status_code sc;
rtems_id id;
printk("\n\n*** TEST EXIT 1 ***\n");
rtems_test_begink();
sc = rtems_task_create(
rtems_build_name('E', 'X', 'I', 'T'),
@@ -106,7 +109,9 @@ static void Init(rtems_task_argument arg)
#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
#define CONFIGURE_INITIAL_EXTENSIONS { .fatal = fatal_extension }
#define CONFIGURE_INITIAL_EXTENSIONS \
{ .fatal = fatal_extension }, \
RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_MAXIMUM_TASKS 2

View File

@@ -22,6 +22,9 @@
#include <assert.h>
#include <rtems.h>
#include <rtems/test.h>
const char rtems_test_name[] = "EXIT 2";
#define EXIT_STATUS 123
@@ -41,7 +44,7 @@ static void fatal_extension(
&& !is_internal
&& error == EXIT_STATUS
) {
printk("*** END OF TEST EXIT 2 ***\n");
rtems_test_endk();
}
}
@@ -60,7 +63,7 @@ static void Init(rtems_task_argument arg)
rtems_status_code sc;
rtems_id id;
printk("\n\n*** TEST EXIT 2 ***\n");
rtems_test_begink();
sc = rtems_task_create(
rtems_build_name('E', 'X', 'I', 'T'),
@@ -84,7 +87,9 @@ static void Init(rtems_task_argument arg)
#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
#define CONFIGURE_INITIAL_EXTENSIONS { .fatal = fatal_extension }
#define CONFIGURE_INITIAL_EXTENSIONS \
{ .fatal = fatal_extension }, \
RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_MAXIMUM_TASKS 2

View File

@@ -34,6 +34,8 @@
#include "test-file-system.h"
const char rtems_test_name[] = "FLASHDISK 1";
/* forward declarations to avoid warnings */
static rtems_task Init(rtems_task_argument argument);
@@ -149,11 +151,11 @@ static void test(void)
static void Init(rtems_task_argument arg)
{
puts("\n\n*** TEST FLASHDISK 1 ***");
TEST_BEGIN();
test();
puts("*** END OF TEST FLASHDISK 1 ***");
TEST_END();
rtems_test_exit(0);
}
@@ -351,6 +353,8 @@ uint32_t rtems_flashdisk_configuration_size = FLASHDISK_CONFIG_COUNT;
#define CONFIGURE_EXTRA_TASK_STACKS (8 * 1024)
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_INIT
@@ -361,7 +365,7 @@ uint32_t rtems_flashdisk_configuration_size = FLASHDISK_CONFIG_COUNT;
static void Init(rtems_task_argument arg)
{
puts("\n\n*** TEST FLASHDISK 1 ***");
TEST_BEGIN();
puts("NOT ENOUGH MEMORY TO RUN TEST");
rtems_test_exit(0);

View File

@@ -27,6 +27,8 @@
#include <rtems/ftpd.h>
#include <rtems/ftpfs.h>
const char rtems_test_name[] = "FTP 1";
/* forward declarations to avoid warnings */
static rtems_task Init(rtems_task_argument argument);
@@ -216,9 +218,9 @@ static void test(void)
static rtems_task Init(rtems_task_argument argument)
{
puts("\n\n*** TEST FTP 1 ***");
TEST_BEGIN();
test();
puts("*** END OF TEST FTP 1 ***");
TEST_END();
rtems_test_exit(0);
}
@@ -242,6 +244,8 @@ static rtems_task Init(rtems_task_argument argument)
#define CONFIGURE_EXTRA_TASK_STACKS FTP_WORKER_TASK_EXTRA_STACK
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#include <rtems/confdefs.h>

View File

@@ -15,6 +15,8 @@
#include "test_support.h"
#include <rtems/gxx_wrappers.h>
const char rtems_test_name[] = "GXX 1";
/* forward declarations to avoid warnings */
rtems_task Init(rtems_task_argument argument);
void test_recursive_mutex(void);
@@ -176,7 +178,7 @@ rtems_task Init(
rtems_task_argument argument
)
{
puts( "\n\n*** TEST GXX 01 ***" );
TEST_BEGIN();
test_mutex();
puts( "" );
@@ -190,7 +192,7 @@ rtems_task Init(
test_key();
puts( "" );
puts( "*** END OF TEST GXX 01 ***" );
TEST_END();
rtems_test_exit( 0 );
}
@@ -202,6 +204,8 @@ rtems_task Init(
#define CONFIGURE_MAXIMUM_TASKS 1
#define CONFIGURE_MAXIMUM_SEMAPHORES 2
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_INIT

View File

@@ -26,6 +26,8 @@
#include <rtems/score/sysstate.h>
#include <rtems/dumpbuf.h>
const char rtems_test_name[] = "HEAPWALK";
#define TEST_HEAP_SIZE 1024
#define TEST_DEFAULT_PAGESIZE 128
#define DUMP false
@@ -316,7 +318,7 @@ rtems_task Init(
rtems_task_argument argument
)
{
puts( "\n\n*** HEAP WALK TEST ***" );
TEST_BEGIN();
test_system_not_up();
test_check_control();
@@ -326,6 +328,6 @@ rtems_task Init(
test_check_free_block();
test_output();
puts( "*** END OF HEAP WALK TEST ***" );
TEST_END();
rtems_test_exit(0);
}

View File

@@ -37,6 +37,8 @@ void blow_stack( void );
#define CONFIGURE_EXTRA_TASK_STACKS ((TASK_STACK_SIZE)*5)
#define CONFIGURE_MAXIMUM_TASKS 6
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#include <rtems/confdefs.h>

View File

@@ -13,6 +13,8 @@
#include <tmacros.h>
const char rtems_test_name[] = "MALLOC 2";
/* forward declarations to avoid warnings */
rtems_task Init(rtems_task_argument argument);
rtems_timer_service_routine test_operation_from_isr(rtems_id timer, void *arg);
@@ -40,7 +42,7 @@ rtems_task Init(
rtems_id timer;
void *pointer2;
puts( "\n\n*** TEST MALLOC 02 ***" );
TEST_BEGIN();
puts( "malloc memory to free from ISR" );
Pointer1 = malloc( 20 );
@@ -73,7 +75,7 @@ rtems_task Init(
pointer2 = malloc(20);
rtems_test_assert( pointer2 );
puts( "*** END OF TEST MALLOC 02 ***" );
TEST_END();
rtems_test_exit( 0 );
}
@@ -84,6 +86,8 @@ rtems_task Init(
#define CONFIGURE_MALLOC_DIRTY
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_MAXIMUM_TASKS 1
#define CONFIGURE_MAXIMUM_TIMERS 1

View File

@@ -14,6 +14,8 @@
#include <tmacros.h>
#include "test_support.h"
const char rtems_test_name[] = "MALLOC 3";
/* forward declarations to avoid warnings */
rtems_task Init(rtems_task_argument argument);
@@ -23,13 +25,13 @@ rtems_task Init(
{
void *p1;
puts( "\n\n*** TEST MALLOC03 ***" );
TEST_BEGIN();
p1 = __builtin_frame_address(0);
printf("Attempt to free stack memory\n");
free( p1 );
puts( "*** END OF TEST MALLOC03 ***" );
TEST_END();
rtems_test_exit(0);
}
@@ -40,6 +42,8 @@ rtems_task Init(
#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
#define CONFIGURE_MAXIMUM_TASKS 1
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_INIT

View File

@@ -17,6 +17,8 @@
#include <rtems/malloc.h>
#include <errno.h>
const char rtems_test_name[] = "MALLOC 4";
/* configuration information */
/* At top of file to have access to configuration variables */
@@ -24,6 +26,8 @@
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
#define CONFIGURE_MAXIMUM_TASKS 1
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_INIT
@@ -77,7 +81,7 @@ rtems_task Init(
Heap_Area area;
void *p;
puts( "\n\n*** TEST MALLOC 04 ***" );
TEST_BEGIN();
/* Safe information on real heap */
real_heap = malloc_get_heap_pointer();
@@ -164,7 +168,7 @@ rtems_task Init(
/* Restore information on real heap */
malloc_set_heap_pointer( real_heap );
puts( "*** END OF TEST MALLOC 04 ***" );
TEST_END();
rtems_test_exit(0);
}

View File

@@ -15,6 +15,8 @@
#include "test_support.h"
#include <rtems/malloc.h>
const char rtems_test_name[] = "MALLOC 5";
/* forward declarations to avoid warnings */
rtems_task Init(rtems_task_argument argument);
@@ -25,7 +27,7 @@ rtems_task Init(
int sc;
rtems_malloc_statistics_t stats;
puts( "\n\n*** TEST MALLOC05 ***" );
TEST_BEGIN();
puts( "malloc_get_statistics( NULL ) - returns -1" );
sc = malloc_get_statistics( NULL );
@@ -35,7 +37,7 @@ rtems_task Init(
sc = malloc_get_statistics( &stats );
rtems_test_assert( sc == 0 );
puts( "*** END OF TEST MALLOC05 ***" );
TEST_END();
rtems_test_exit(0);
}
@@ -46,6 +48,8 @@ rtems_task Init(
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
#define CONFIGURE_MAXIMUM_TASKS 1
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_INIT

View File

@@ -35,6 +35,8 @@
#include <rtems/score/protectedheap.h>
#include <rtems/malloc.h>
const char rtems_test_name[] = "MALLOCTEST";
/*
* A simple test of realloc
*/
@@ -1249,7 +1251,7 @@ rtems_task Init(
rtems_time_of_day time;
rtems_status_code status;
puts( "\n\n*** MALLOC TEST ***" );
TEST_BEGIN();
build_time( &time, 12, 31, 1988, 9, 0, 0, 0 );
status = rtems_clock_set( &time );

View File

@@ -39,6 +39,8 @@ void blow_stack( void );
#define CONFIGURE_MALLOC_STATISTICS
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#include <rtems/confdefs.h>

View File

@@ -42,7 +42,7 @@ rtems_task Task_1_through_5(
bool malloc_walk_ok;
if ( passes++ > NUM_PASSES ) {
puts("*** END OF MALLOC TEST ***");
TEST_END();
rtems_test_exit(0);
}

View File

@@ -24,6 +24,9 @@
#if __rtems__
#include <bsp.h> /* for device driver prototypes */
#include <rtems/test.h>
const char rtems_test_name[] = "MATH";
#endif
#include <stdio.h>
@@ -40,6 +43,8 @@ extern void domath(void);
#define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_FLOATING_POINT
#define CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_INIT
@@ -52,11 +57,15 @@ rtems_task Init(
int main( void )
#endif
{
fprintf( stdout, "*** DOUBLE MATH TEST ***\n" );
#if __rtems__
rtems_test_begin();
#endif
domath();
fprintf( stdout, "*** END OF DOUBLE MATH TEST ***\n" );
#if __rtems__
rtems_test_end();
#endif
exit( 0 );
}

View File

@@ -24,6 +24,9 @@
#if __rtems__
#include <bsp.h> /* for device driver prototypes */
#include <rtems/test.h>
const char rtems_test_name[] = "MATHF";
#endif
#include <stdio.h>
@@ -40,6 +43,8 @@ extern void domathf(void);
#define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_FLOATING_POINT
#define CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_INIT
@@ -52,11 +57,15 @@ rtems_task Init(
int main( void )
#endif
{
fprintf( stdout, "*** FLOAT MATH TEST ***\n" );
#if __rtems__
rtems_test_begin();
#endif
domathf();
fprintf( stdout, "*** END OF FLOAT MATH TEST ***\n" );
#if __rtems__
rtems_test_end();
#endif
exit( 0 );
}

View File

@@ -24,6 +24,9 @@
#if __rtems__
#include <bsp.h> /* for device driver prototypes */
#include <rtems/test.h>
const char rtems_test_name[] = "MATHL";
#endif
#include <stdio.h>
@@ -40,6 +43,8 @@ extern void domathl(void);
#define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_FLOATING_POINT
#define CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_INIT
@@ -52,10 +57,14 @@ rtems_task Init(
int main( void )
#endif
{
fprintf( stdout, "*** LONG DOUBLE MATH TEST ***\n" );
#if __rtems__
rtems_test_begin();
#endif
domathl();
fprintf( stdout, "*** END OF LONG DOUBLE MATH TEST ***\n" );
#if __rtems__
rtems_test_end();
#endif
exit( 0 );
}

View File

@@ -20,6 +20,8 @@
#include <md5.h>
const char rtems_test_name[] = "MD5 1";
#ifndef MD5_BLOCK_SIZE
#define MD5_BLOCK_SIZE 64
#endif
@@ -231,11 +233,11 @@ static void test(void)
static void Init(rtems_task_argument arg)
{
puts("\n\n*** TEST MD5 1 ***");
TEST_BEGIN();
test();
puts("*** END OF TEST MD5 1 ***");
TEST_END();
rtems_test_exit(0);
}
@@ -247,6 +249,8 @@ static void Init(rtems_task_argument arg)
#define CONFIGURE_MAXIMUM_TASKS 1
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_INIT

View File

@@ -31,6 +31,8 @@
#include "test-http-client.h"
const char rtems_test_name[] = "MGHTTPD 1";
#define TARFILE_START init_fs_tar
#define TARFILE_SIZE init_fs_tar_size
@@ -199,7 +201,7 @@ static void Init(rtems_task_argument arg)
{
int rv = 0;
puts("\n\n*** TEST MGHTTPD 01 ***");
TEST_BEGIN();
rv = rtems_bsdnet_initialize_network();
rtems_test_assert(rv == 0);
@@ -208,7 +210,7 @@ static void Init(rtems_task_argument arg)
test_mongoose();
puts("*** END OF TEST MGHTTPD 01 ***");
TEST_END();
rtems_test_exit(0);
}
@@ -226,6 +228,8 @@ static void Init(rtems_task_argument arg)
#define CONFIGURE_UNIFIED_WORK_AREAS
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_INIT_TASK_STACK_SIZE (16 * 1024)

View File

@@ -21,6 +21,8 @@
#include <rtems/monitor.h>
#include <rtems/shell.h>
const char rtems_test_name[] = "MONITOR";
rtems_task_priority Priorities[6] = { 0, 1, 1, 3, 4, 5 };
rtems_task Task_1_through_5(
@@ -50,7 +52,7 @@ rtems_task Init(
uint32_t index;
rtems_status_code status;
puts( "\n\n*** TEST MONITOR ***" );
TEST_BEGIN();
Task_name[ 1 ] = rtems_build_name( 'T', 'A', '1', ' ' );
Task_name[ 2 ] = rtems_build_name( 'T', 'A', '2', ' ' );
@@ -87,7 +89,7 @@ rtems_task Init(
status = rtems_task_delete( RTEMS_SELF );
directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
} else {
puts( "*** END OF TEST MONITOR ***" );
TEST_END();
rtems_test_exit( 0 );
}

View File

@@ -41,6 +41,8 @@ void Get_all_counters( void );
#define CONFIGURE_INIT_TASK_PRIORITY 10
#define CONFIGURE_INIT_TASK_INITIAL_MODES RTEMS_DEFAULT_MODES
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_EXTRA_TASK_STACKS \

View File

@@ -21,6 +21,9 @@
#include <rtems/shell.h>
#include <rtems/shellconfig.h>
const char rtems_test_name[] = "MONITOR 2";
#define MAX_ARGS 128
char *Commands[] = {
@@ -38,7 +41,7 @@ rtems_task Init(
char *argv[MAX_ARGS];
char tmp[256];
puts( "\n*** START OF MONITOR02 ***\n");
TEST_BEGIN();
for (i=0; i < MAX_ARGS && Commands[i] ; i++) {
strcpy( tmp, Commands[i] );
@@ -47,7 +50,7 @@ rtems_task Init(
rtems_shell_main_monitor(argc, argv);
}
}
puts( "\n*** END OF MONITOR02 ***\n");
TEST_END();
#else
puts( "TARGET MEMORY TOO SMALL TO RUN\n\n");
#endif

View File

@@ -41,6 +41,8 @@ void Get_all_counters( void );
#define CONFIGURE_INIT_TASK_PRIORITY 10
#define CONFIGURE_INIT_TASK_INITIAL_MODES RTEMS_DEFAULT_MODES
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_APPLICATION_NEEDS_LIBBLOCK
#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM

View File

@@ -25,6 +25,8 @@
#include "termios_testdriver_intr.h"
#include "tmacros.h"
const char rtems_test_name[] = "MOUSE 1";
#define UID_MESSAGE_COUNT 10
/* forward declarations to avoid warnings */
@@ -130,7 +132,7 @@ rtems_task Init(
{
bool more_data;
printf( "\n\n*** %s TEST ***\n", Mouse_Type_Long );
TEST_BEGIN();
open_it();
register_it();
@@ -143,7 +145,7 @@ rtems_task Init(
receive_uid_message();
} while (more_data);
close_it();
printf( "*** END OF %s TEST ***\n", Mouse_Type_Long );
TEST_END();
rtems_test_exit( 0 );
}
@@ -174,6 +176,8 @@ rtems_task Init(
sizeof(struct MW_UID_MESSAGE) \
)
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_INIT

View File

@@ -28,6 +28,8 @@
#include <stdio.h>
#include <stdlib.h>
const char rtems_test_name[] = "PUTENVTEST";
rtems_task Init(
rtems_task_argument argument
);
@@ -41,6 +43,8 @@ rtems_task Init(
#define CONFIGURE_MAXIMUM_TASKS 1
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#include <rtems/confdefs.h>
@@ -49,12 +53,12 @@ rtems_task Init(
rtems_task_argument argument
)
{
puts( "\n\n*** PUTENV/GETENV TEST ***" );
TEST_BEGIN();
puts( "putenv(\"FOO=BAR\") - expected to work" );
putenv ("FOO=BAR");
printf ("getenv(\"FOO\") ==> \"%s\"\n", getenv ("FOO"));
puts( "*** END OF PUTENV/GETENV TEST ***" );
TEST_END();
rtems_test_exit(0);
}

View File

@@ -23,6 +23,8 @@
#include <rtems/malloc.h>
#include <rtems/score/rbtreeimpl.h>
const char rtems_test_name[] = "RBHEAP 1";
/* forward declarations to avoid warnings */
static rtems_task Init(rtems_task_argument argument);
@@ -593,7 +595,7 @@ static void test_free_merge_left_or_right(bool left)
static void Init(rtems_task_argument arg)
{
puts("\n\n*** TEST RBHEAP 1 ***");
TEST_BEGIN();
test_init_chunk_alignment();
test_init_begin_greater_than_end();
@@ -613,7 +615,7 @@ static void Init(rtems_task_argument arg)
test_free_merge_left_or_right(true);
test_free_merge_left_or_right(false);
puts("*** END OF TEST RBHEAP 1 ***");
TEST_END();
rtems_test_exit(0);
}
@@ -623,6 +625,8 @@ static void Init(rtems_task_argument arg)
#define CONFIGURE_MAXIMUM_TASKS 1
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_INIT

View File

@@ -26,12 +26,14 @@
#define CONFIGURE_INIT
#include "System.h"
const char rtems_test_name[] = "RTEMS++";
// make global so it lasts past the Init task's stack's life time
Task1 task_1;
rtems_task Init(rtems_task_argument )
{
puts( "\n\n*** RTEMS++ TEST ***" );
TEST_BEGIN();
printf( "INIT - Task.create() - " );
task_1.create("TA1 ", 0, RTEMS_MINIMUM_STACK_SIZE);

View File

@@ -123,6 +123,8 @@ class Io_during_interrupt
#define CONFIGURE_MAXIMUM_USER_EXTENSIONS 0
#define CONFIGURE_TICKS_PER_TIMESLICE 100
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_INIT_TASK_STACK_SIZE (4 * RTEMS_MINIMUM_STACK_SIZE)

View File

@@ -694,7 +694,7 @@ EndTask::EndTask(const char* name,
void EndTask::body(rtems_task_argument)
{
printf("*** END OF RTEMS++ TEST ***\n");
TEST_END();
exit(0);
}

View File

@@ -26,6 +26,8 @@
#define CONFIGURE_INIT
#include "system.h"
const char rtems_test_name[] = "RTMONUSE";
rtems_task Init(
rtems_task_argument argument
)
@@ -35,7 +37,7 @@ rtems_task Init(
rtems_id rmid;
rtems_name period;
puts( "\n\n*** RATE MONOTONIC PERIOD STATISTICS TEST ***" );
TEST_BEGIN();
period = rtems_build_name( 'I', 'G', 'N', 'R' );
status = rtems_rate_monotonic_create( period, &rmid );

View File

@@ -42,6 +42,8 @@ void Get_all_counters( void );
#define CONFIGURE_INIT_TASK_PRIORITY 10
#define CONFIGURE_INIT_TASK_INITIAL_MODES RTEMS_DEFAULT_MODES
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_EXTRA_TASK_STACKS (20 * RTEMS_MINIMUM_STACK_SIZE)

View File

@@ -124,7 +124,7 @@ rtems_task Task_1_through_5(
rtems_rate_monotonic_report_statistics();
puts( "" );
puts( "*** END OF RATE MONOTONIC PERIOD STATISTICS TEST ***" );
TEST_END();
rtems_test_exit( 0 );
}

View File

@@ -22,6 +22,8 @@
#include "tmacros.h"
const char rtems_test_name[] = "SPARSEDISK 1";
/* Number of bytes for test pattern within a sparse disk container */
#define STATIC_PATTERN_SIZE 4096
@@ -415,11 +417,11 @@ void test( void )
static void Init( rtems_task_argument arg )
{
(void) arg;
puts( "\n\n*** TEST SPARSEDISK 1 ***" );
TEST_BEGIN();
test();
puts( "*** END OF TEST SPARSEDISK 1 ***" );
TEST_END();
rtems_test_exit( 0 );
}
@@ -436,8 +438,10 @@ static void Init( rtems_task_argument arg )
#define CONFIGURE_INIT_TASK_STACK_SIZE ( 16 * 1024 )
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_INIT
#include <rtems/confdefs.h>
#include <rtems/confdefs.h>

View File

@@ -26,6 +26,8 @@
#define CONFIGURE_INIT
#include "system.h"
const char rtems_test_name[] = "STACKCHK";
rtems_task Init(
rtems_task_argument argument
)
@@ -33,7 +35,7 @@ rtems_task Init(
rtems_time_of_day time;
rtems_status_code status;
puts( "\n\n*** TEST STACK CHECKER ***" );
TEST_BEGIN();
build_time( &time, 12, 31, 1988, 9, 0, 0, 0 );
status = rtems_clock_set( &time );
@@ -99,6 +101,6 @@ void Fatal_extension(
} else if ( error != rtems_build_name( 'T', 'A', '1', ' ' ) ) {
printk( "unexpected fatal error\n" );
} else {
printk( "*** END OF TEST STACK CHECKER ***\n" );
rtems_test_endk();
}
}

View File

@@ -48,7 +48,8 @@ void Fatal_extension(
);
#define CONFIGURE_INITIAL_EXTENSIONS \
{ NULL, NULL, NULL, NULL, NULL, NULL, NULL, Fatal_extension }
{ NULL, NULL, NULL, NULL, NULL, NULL, NULL, Fatal_extension }, \
RTEMS_TEST_INITIAL_EXTENSION
#include <rtems/confdefs.h>

View File

@@ -14,6 +14,8 @@
#include <tmacros.h>
#include <rtems/stackchk.h>
const char rtems_test_name[] = "STACKCHK 1";
/* forward declarations to avoid warnings */
rtems_task Init(rtems_task_argument argument);
@@ -23,13 +25,13 @@ rtems_task Init(
{
bool blown;
puts( "\n\n*** TEST STACK CHECKER 01 ***" );
TEST_BEGIN();
puts( "stack_checker_is_blown - NOT BLOWN" );
blown = rtems_stack_checker_is_blown();
rtems_test_assert(!blown);
puts( "*** END OF TEST STACK CHECKER 01 ***" );
TEST_END();
rtems_test_exit(0);
}
@@ -39,6 +41,8 @@ rtems_task Init(
#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
#define CONFIGURE_MAXIMUM_TASKS 1
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_STACK_CHECKER_ENABLED

View File

@@ -18,6 +18,8 @@
#include <stdio.h>
const char rtems_test_name[] = "STRINGTO 1";
/* forward declarations to avoid warnings */
rtems_task Init(rtems_task_argument argument);
@@ -138,7 +140,7 @@ rtems_task Init(
rtems_task_argument ignored
)
{
puts( "\n\n*** STRING TO CONVERSION TEST ***" );
TEST_BEGIN();
test_rtems_string_to_pointer();
test_rtems_string_to_unsigned_char();
test_rtems_string_to_int();
@@ -150,7 +152,7 @@ rtems_task Init(
test_rtems_string_to_float();
test_rtems_string_to_double();
puts( "*** END OF STRING TO CONVERSION TEST ***" );
TEST_END();
rtems_test_exit(0);
}
@@ -162,6 +164,8 @@ rtems_task Init(
#define CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM
#define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_FLOATING_POINT
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_INIT

View File

@@ -27,6 +27,8 @@
#include <rtems/libio.h>
#include <rtems/rtems_bsdnet.h>
const char rtems_test_name[] = "SYSCALL 1";
/* forward declarations to avoid warnings */
static rtems_task Init(rtems_task_argument argument);
@@ -78,14 +80,14 @@ static void Init(rtems_task_argument arg)
{
int rv;
puts("\n\n*** TEST SYSCALL 1 ***");
TEST_BEGIN();
rv = rtems_bsdnet_initialize_network();
rtems_test_assert(rv == 0);
test();
puts("*** END OF TEST SYSCALL 1 ***");
TEST_END();
rtems_test_exit(0);
}
@@ -131,6 +133,8 @@ static rtems_device_driver open_driver_open(
#define CONFIGURE_MAXIMUM_TASKS 2
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_INIT

View File

@@ -25,6 +25,8 @@
#include "initial_filesystem_tar.h"
const char rtems_test_name[] = "TAR 1";
/* forward declarations to avoid warnings */
rtems_task Init(rtems_task_argument argument);
void test_untar_from_memory(void);
@@ -105,13 +107,13 @@ rtems_task Init(
rtems_task_argument ignored
)
{
printf( "\n\n*** TAR01 TEST ***\n" );
TEST_BEGIN();
test_untar_from_memory();
puts( "" );
test_untar_from_file();
printf( "*** END OF TAR01 TEST ***\n" );
TEST_END();
exit( 0 );
}
@@ -124,6 +126,8 @@ rtems_task Init(
#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 5
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_INIT

View File

@@ -25,6 +25,8 @@
#include "initial_filesystem_tar.h"
const char rtems_test_name[] = "TAR 2";
/* forward declarations to avoid warnings */
rtems_task Init(rtems_task_argument argument);
void test_tarfs_load(void);
@@ -55,7 +57,7 @@ void test_tarfs_load(void)
test_cat( "/home/test_file", 0, 0 );
/******************/
puts("*** Skipping symlink -- NOT CURRENTLY SUPPORTED ***" );
TEST_BEGIN();
#if 0
printf( "========= /symlink =========\n" );
test_cat( "/symlink", 0, 0 );
@@ -66,12 +68,12 @@ rtems_task Init(
rtems_task_argument ignored
)
{
printf( "\n\n*** TAR02 TEST ***\n" );
TEST_BEGIN();
test_tarfs_load();
IMFS_dump();
printf( "*** END OF TAR02 TEST ***\n" );
TEST_END();
exit( 0 );
}
@@ -84,6 +86,8 @@ rtems_task Init(
#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 5
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_INIT

View File

@@ -18,6 +18,8 @@
#include <rtems/untar.h>
#include <rtems/error.h>
const char rtems_test_name[] = "TAR 3";
/* forward declarations to avoid warnings */
rtems_task Init(rtems_task_argument argument);
void test_tarfs_error(void);
@@ -45,11 +47,11 @@ rtems_task Init(
rtems_task_argument argument
)
{
puts( "\n\n*** TEST TAR03 ***" );
TEST_BEGIN();
test_tarfs_error();
puts( "*** END OF TEST TAR03 ***" );
TEST_END();
rtems_test_exit(0);
}
@@ -59,6 +61,8 @@ rtems_task Init(
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
#define CONFIGURE_MAXIMUM_TASKS 1
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_USE_MINIIMFS_AS_BASE_FILESYSTEM

View File

@@ -36,6 +36,8 @@
#include <tmacros.h>
const char rtems_test_name[] = "TERMIOS";
/* forward declarations to avoid warnings */
rtems_task Init(rtems_task_argument argument);
void print_32bits(unsigned long bits, unsigned char size, char * names[]);
@@ -683,7 +685,7 @@ out:
if( tcsetattr( fileno( stdin ), TCSADRAIN, &old) < 0 )
perror("do_raw_input(): tcsetattr() failed: %s\n" );
printf ("*** End of Raw input VMIN=%d VTIME=%d ***\n", vmin, vtime);
TEST_BEGIN();
}
@@ -731,7 +733,7 @@ Init (rtems_task_argument ignored)
char c ;
struct termios orig_termios, test_termios;
puts( "\n\n*** TEST TERMIOS INPUT CAPABILITIES ***" );
TEST_BEGIN();
status = rtems_shell_wait_for_input(
STDIN_FILENO,
@@ -793,7 +795,7 @@ Init (rtems_task_argument ignored)
}
}
} else {
puts( "*** END OF TEST TERMIOS INPUT CAPABILITIES ***" );
TEST_END();
rtems_test_exit( 0 );
}
@@ -805,6 +807,8 @@ Init (rtems_task_argument ignored)
#define CONFIGURE_MAXIMUM_TASKS 1
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_MICROSECONDS_PER_TICK 1000

View File

@@ -18,6 +18,8 @@
#include <limits.h>
#include <sys/errno.h>
const char rtems_test_name[] = "TERMIOS 1";
/* rtems_termios_baud_t is a typedefs to int32_t */
#define PRIdrtems_termios_baud_t PRId32
@@ -524,7 +526,7 @@ static rtems_task Init(
struct termios t;
int index = 0;
puts( "\n\n*** TEST TERMIOS 01 ***" );
TEST_BEGIN();
test_termios_baud2index();
test_termios_baud2number();
@@ -666,7 +668,7 @@ static rtems_task Init(
}
puts( "" );
puts( "*** END OF TEST TERMIOS 01 ***" );
TEST_END();
rtems_test_exit(0);
}
@@ -685,6 +687,8 @@ static rtems_task Init(
#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 4
#define CONFIGURE_MAXIMUM_TASKS 1
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_INIT

View File

@@ -16,6 +16,8 @@
#include <errno.h>
#include <unistd.h>
const char rtems_test_name[] = "TERMIOS 2";
/* forward declarations to avoid warnings */
rtems_task Init(rtems_task_argument argument);
@@ -28,7 +30,7 @@ rtems_task Init(
char *term_name_p;
char term_name[32];
puts( "\n\n*** TERMIOS 02 TEST ***" );
TEST_BEGIN();
puts( "tcdrain(12) - EBADF" );
sc = tcdrain(12);
@@ -136,7 +138,7 @@ rtems_task Init(
rtems_test_assert( term_name_p == term_name );
printf( "ctermid ==> %s\n", term_name_p );
puts( "*** END OF TERMIOS 02 TEST ***" );
TEST_END();
exit( 0 );
}
@@ -148,6 +150,8 @@ rtems_task Init(
#define CONFIGURE_MAXIMUM_TASKS 1
#define CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_INIT

View File

@@ -22,6 +22,8 @@
#include <termios.h>
#include <rtems/dumpbuf.h>
const char rtems_test_name[] = "TERMIOS 3";
/* forward declarations to avoid warnings */
rtems_task Init(rtems_task_argument argument);
void write_helper(int fd, const char *c);
@@ -122,7 +124,7 @@ rtems_task Init(
rtems_task_argument argument
)
{
puts( "\n\n*** TEST TERMIOS03 ***" );
TEST_BEGIN();
open_it();
@@ -147,7 +149,7 @@ rtems_task Init(
puts( "" );
close_it();
puts( "*** END OF TEST TERMIOS03 ***" );
TEST_END();
rtems_test_exit(0);
}
@@ -168,6 +170,8 @@ rtems_task Init(
/* we need to be able to open the test device */
#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 4
#define CONFIGURE_MAXIMUM_TASKS 1
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_INIT

View File

@@ -22,6 +22,8 @@
#include <termios.h>
#include <rtems/dumpbuf.h>
const char rtems_test_name[] = "TERMIOS 4";
/* forward declarations to avoid warnings */
void write_helper(int fd, const char *c);
void read_helper(int fd, const char *expected);
@@ -115,7 +117,7 @@ rtems_task Init(
rtems_task_argument argument
)
{
puts( "\n\n*** TEST TERMIOS04 ***" );
TEST_BEGIN();
open_it();
@@ -127,7 +129,7 @@ rtems_task Init(
close_it();
puts( "*** END OF TEST TERMIOS04 ***" );
TEST_END();
rtems_test_exit(0);
}
@@ -149,6 +151,8 @@ rtems_task Init(
#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 4
#define CONFIGURE_MAXIMUM_TASKS 1
#define CONFIGURE_MAXIMUM_TIMERS 2
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_INIT

View File

@@ -22,6 +22,8 @@
#include <termios.h>
#include <rtems/dumpbuf.h>
const char rtems_test_name[] = "TERMIOS 5";
/* forward declarations to avoid warnings */
rtems_task Init(rtems_task_argument argument);
void write_helper(int fd, const char *c);
@@ -118,7 +120,7 @@ rtems_task Init(
rtems_task_argument argument
)
{
puts( "\n\n*** TEST TERMIOS05 ***" );
TEST_BEGIN();
open_it();
@@ -137,7 +139,7 @@ rtems_task Init(
close_it();
puts( "*** END OF TEST TERMIOS05 ***" );
TEST_END();
rtems_test_exit(0);
}
@@ -160,6 +162,8 @@ rtems_task Init(
#define CONFIGURE_MAXIMUM_TASKS 4
#define CONFIGURE_MAXIMUM_TIMERS 2
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_INIT

View File

@@ -23,6 +23,8 @@
#include <rtems/dumpbuf.h>
#include <rtems/termiostypes.h>
const char rtems_test_name[] = "TERMIOS 6";
/* forward declarations to avoid warnings */
rtems_task Init(rtems_task_argument argument);
void open_it(void);
@@ -186,7 +188,7 @@ rtems_task Init(
rtems_task_argument argument
)
{
puts( "\n\n*** TEST TERMIOS06 ***" );
TEST_BEGIN();
pppasyncattach();
open_it();
@@ -197,7 +199,7 @@ rtems_task Init(
read_it();
close_it();
puts( "*** END OF TEST TERMIOS06 ***" );
TEST_END();
rtems_test_exit(0);
}
@@ -215,6 +217,8 @@ rtems_task Init(
#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 4
#define CONFIGURE_MAXIMUM_TASKS 1
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_INIT

View File

@@ -23,6 +23,8 @@
#include <rtems/dumpbuf.h>
#include <rtems/libio.h>
const char rtems_test_name[] = "TERMIOS 7";
/* forward declarations to avoid warnings */
rtems_task Init(rtems_task_argument argument);
void write_helper(int fd, const char *c);
@@ -128,7 +130,7 @@ rtems_task Init(
{
rtems_status_code sc;
puts( "\n\n*** TEST TERMIOS07 ***" );
TEST_BEGIN();
puts( "rtems_termios_bufsize( 64, 64, 64 ) - OK" );
sc = rtems_termios_bufsize ( 64, 64, 64 );
@@ -154,7 +156,7 @@ rtems_task Init(
close_it();
puts( "*** END OF TEST TERMIOS07 ***" );
TEST_END();
rtems_test_exit(0);
}
@@ -176,6 +178,8 @@ rtems_task Init(
#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 4
#define CONFIGURE_MAXIMUM_TASKS 1
#define CONFIGURE_MAXIMUM_TIMERS 2
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_INIT

View File

@@ -23,6 +23,8 @@
#include <rtems/dumpbuf.h>
#include <rtems/termiostypes.h>
const char rtems_test_name[] = "TERMIOS 8";
/* forward declarations to avoid warnings */
rtems_task Init(rtems_task_argument argument);
void open_it(void);
@@ -113,7 +115,7 @@ rtems_task Init(
rtems_task_argument argument
)
{
puts( "\n\n*** TEST TERMIOS08 ***" );
TEST_BEGIN();
open_it();
change_lflag( "non-canonical", ICANON, 0 );
@@ -141,7 +143,7 @@ rtems_task Init(
close_it();
puts( "*** END OF TEST TERMIOS08 ***" );
TEST_END();
rtems_test_exit(0);
}
@@ -159,6 +161,8 @@ rtems_task Init(
#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 4
#define CONFIGURE_MAXIMUM_TASKS 1
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_INIT

View File

@@ -23,6 +23,8 @@
#include <tmacros.h>
#include <time.h>
#include <stdlib.h>
const char rtems_test_name[] = "TZTEST";
/* forward declarations to avoid warnings */
rtems_task Init(rtems_task_argument argument);
@@ -54,7 +56,7 @@ rtems_task Init(
rtems_time_of_day time;
rtems_status_code status;
puts( "\n\n*** TIMEZONE TEST ***" );
TEST_BEGIN();
build_time( &time, 3, 14, 2007, 15, 9, 26, 5 );
status = rtems_clock_set( &time );
@@ -66,7 +68,7 @@ rtems_task Init(
tztester();
puts( "*** END OF TIMEZONE TEST ***" );
TEST_END();
exit(0);
}
@@ -74,6 +76,8 @@ rtems_task Init(
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_MAXIMUM_TASKS 1

View File

@@ -24,6 +24,8 @@
#include "termios_testdriver_intr.h"
#include "tmacros.h"
const char rtems_test_name[] = "UID 1";
#define UID_MESSAGE_COUNT 10
/* forward declarations to avoid warnings */
@@ -101,7 +103,7 @@ rtems_task Init(
)
{
printf( "\n\n*** UID01 TEST ***\n" );
TEST_BEGIN();
open_it();
register_it();
@@ -115,7 +117,7 @@ rtems_task Init(
receive_uid_message();
close_it();
printf( "*** END OF UID01 TEST ***\n" );
TEST_END();
rtems_test_exit( 0 );
}
@@ -146,6 +148,8 @@ rtems_task Init(
sizeof(struct MW_UID_MESSAGE) \
)
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_INIT

View File

@@ -21,6 +21,8 @@
#include <string.h>
#include <utf8proc/utf8proc.h>
const char rtems_test_name[] = "UTF8PROC 1";
static void
test_utf8proc_errmsg ( void )
{
@@ -248,11 +250,11 @@ static void test ( void )
static void Init ( rtems_task_argument arg )
{
puts ( "\n\n*** TEST utf8proc01 ***" );
TEST_BEGIN();
test ( );
puts ( "*** END OF TEST utf8proc01 ***" );
TEST_END();
rtems_test_exit ( 0 );
}
@@ -264,6 +266,8 @@ static void Init ( rtems_task_argument arg )
#define CONFIGURE_MAXIMUM_TASKS 1
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_INIT