testsuites: Remove BSP_SMALL_MEMORY

This commit is contained in:
Joel Sherrill
2014-05-05 09:47:30 -05:00
parent 053abcda22
commit 3324383ce0
16 changed files with 18 additions and 153 deletions

View File

@@ -18,11 +18,6 @@
#include "tmacros.h" #include "tmacros.h"
#include <bsp.h>
const char rtems_test_name[] = "FSDOSFSFORMAT 1";
#if !defined(BSP_SMALL_MEMORY)
#include <fcntl.h> #include <fcntl.h>
#include <inttypes.h> #include <inttypes.h>
#include <sys/statvfs.h> #include <sys/statvfs.h>
@@ -31,6 +26,10 @@ const char rtems_test_name[] = "FSDOSFSFORMAT 1";
#include <rtems/dosfs.h> #include <rtems/dosfs.h>
#include <rtems/sparse-disk.h> #include <rtems/sparse-disk.h>
#include <bsp.h>
const char rtems_test_name[] = "FSDOSFSFORMAT 1";
#define MAX_PATH_LENGTH 100 /* Maximum number of characters per path */ #define MAX_PATH_LENGTH 100 /* Maximum number of characters per path */
#define SECTOR_SIZE 512 /* sector size (bytes) */ #define SECTOR_SIZE 512 /* sector size (bytes) */
#define FAT12_MAX_CLN 4085 /* maximum + 1 number of clusters for FAT12 */ #define FAT12_MAX_CLN 4085 /* maximum + 1 number of clusters for FAT12 */
@@ -471,17 +470,12 @@ static void test( void )
rv = unlink( dev_name ); rv = unlink( dev_name );
rtems_test_assert( rv == 0 ); rtems_test_assert( rv == 0 );
} }
#endif
static void Init( rtems_task_argument arg ) static void Init( rtems_task_argument arg )
{ {
TEST_BEGIN(); TEST_BEGIN();
#if defined(BSP_SMALL_MEMORY)
puts( "Test is too large for small memory BSPs" );
#else
test(); test();
#endif
TEST_END(); TEST_END();
rtems_test_exit( 0 ); rtems_test_exit( 0 );

View File

@@ -16,11 +16,9 @@
#include "config.h" #include "config.h"
#endif #endif
#include "tmacros.h" #include "tmacros.h"
const char rtems_test_name[] = "FSDOSFSNAME 1";
#if !defined(BSP_SMALL_MEMORY)
#include <errno.h> #include <errno.h>
#include <fcntl.h> #include <fcntl.h>
#include <dirent.h> #include <dirent.h>
@@ -38,6 +36,8 @@ const char rtems_test_name[] = "FSDOSFSNAME 1";
#include <errno.h> #include <errno.h>
const char rtems_test_name[] = "FSDOSFSNAME 1";
#define PRINT_DISK_IMAGE 0 #define PRINT_DISK_IMAGE 0
#define MOUNT_DIR "/mnt" #define MOUNT_DIR "/mnt"
@@ -1286,26 +1286,17 @@ static void test( void )
test_compatibility(); test_compatibility();
} }
#endif
static void Init( rtems_task_argument arg ) static void Init( rtems_task_argument arg )
{ {
TEST_BEGIN(); TEST_BEGIN();
#if defined(BSP_SMALL_MEMORY)
puts( "Test is too large for small memory BSPs" );
#else
test(); test();
#endif
TEST_END(); TEST_END();
rtems_test_exit( 0 ); rtems_test_exit( 0 );
} }
/*
* Disable the "large" part of the configuration for this test
*/
#if !defined(BSP_SMALL_MEMORY)
rtems_ramdisk_config rtems_ramdisk_configuration [] = { rtems_ramdisk_config rtems_ramdisk_configuration [] = {
{ .block_size = BLOCK_SIZE, .block_num = BLOCK_NUM }, { .block_size = BLOCK_SIZE, .block_num = BLOCK_NUM },
{ .block_size = BLOCK_SIZE, .block_num = BLOCK_NUM, .location = &IMAGE_BIN_LE_SINGLEBYTE[0] }, { .block_size = BLOCK_SIZE, .block_num = BLOCK_NUM, .location = &IMAGE_BIN_LE_SINGLEBYTE[0] },
@@ -1315,11 +1306,14 @@ rtems_ramdisk_config rtems_ramdisk_configuration [] = {
size_t rtems_ramdisk_configuration_size = RTEMS_ARRAY_SIZE(rtems_ramdisk_configuration); size_t rtems_ramdisk_configuration_size = RTEMS_ARRAY_SIZE(rtems_ramdisk_configuration);
#define CONFIGURE_INIT_TASK_STACK_SIZE ( 1024 * 64 ) #define CONFIGURE_INIT_TASK_STACK_SIZE ( 1024 * 64 )
#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
#define CONFIGURE_MAXIMUM_DRIVERS 4 #define CONFIGURE_MAXIMUM_DRIVERS 4
#define CONFIGURE_MAXIMUM_SEMAPHORES (2 * RTEMS_DOSFS_SEMAPHORES_PER_INSTANCE) #define CONFIGURE_MAXIMUM_SEMAPHORES (2 * RTEMS_DOSFS_SEMAPHORES_PER_INSTANCE)
#define CONFIGURE_APPLICATION_EXTRA_DRIVERS RAMDISK_DRIVER_TABLE_ENTRY #define CONFIGURE_APPLICATION_EXTRA_DRIVERS RAMDISK_DRIVER_TABLE_ENTRY
#define CONFIGURE_APPLICATION_NEEDS_LIBBLOCK
#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM #define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
#define CONFIGURE_FILESYSTEM_DOSFS #define CONFIGURE_FILESYSTEM_DOSFS
@@ -1328,18 +1322,10 @@ size_t rtems_ramdisk_configuration_size = RTEMS_ARRAY_SIZE(rtems_ramdisk_configu
* 2 for open directories/files + 4 * 2 for recursive tree compares*/ * 2 for open directories/files + 4 * 2 for recursive tree compares*/
#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS ( 7 + 2 + ( 4 * 2 ) ) #define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS ( 7 + 2 + ( 4 * 2 ) )
#endif
/*
* Even when in BSP_SMALL_MEMORY mode, we need this much to build and
* link the test. Hopefully this reduces the footprint sufficiently.
*/
#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
#define CONFIGURE_APPLICATION_NEEDS_LIBBLOCK
#define CONFIGURE_MAXIMUM_TASKS 1 #define CONFIGURE_MAXIMUM_TASKS 1
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION #define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_INIT #define CONFIGURE_INIT

View File

@@ -18,10 +18,6 @@
#include "tmacros.h" #include "tmacros.h"
const char rtems_test_name[] = "FLASHDISK 1";
#if !BSP_SMALL_MEMORY
#include <sys/stat.h> #include <sys/stat.h>
#include <errno.h> #include <errno.h>
#include <string.h> #include <string.h>
@@ -36,6 +32,8 @@ const char rtems_test_name[] = "FLASHDISK 1";
#include "test-file-system.h" #include "test-file-system.h"
const char rtems_test_name[] = "FLASHDISK 1";
/* forward declarations to avoid warnings */ /* forward declarations to avoid warnings */
static rtems_task Init(rtems_task_argument argument); static rtems_task Init(rtems_task_argument argument);
@@ -360,26 +358,3 @@ uint32_t rtems_flashdisk_configuration_size = FLASHDISK_CONFIG_COUNT;
#define CONFIGURE_INIT #define CONFIGURE_INIT
#include <rtems/confdefs.h> #include <rtems/confdefs.h>
#else /* BSP_SMALL_MEMORY */
static void Init(rtems_task_argument arg)
{
TEST_BEGIN();
puts("NOT ENOUGH MEMORY TO RUN TEST");
rtems_test_exit(0);
}
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
#define CONFIGURE_MAXIMUM_TASKS 1
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_INIT
#include <rtems/confdefs.h>
#endif /* BSP_SMALL_MEMORY */

View File

@@ -16,8 +16,6 @@
#include <bsp.h> #include <bsp.h>
#if !BSP_SMALL_MEMORY
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h> #include <sys/param.h>
#include <sys/stat.h> #include <sys/stat.h>
@@ -835,5 +833,3 @@ void test_file_system_with_handler(
free(fs); free(fs);
} }
#endif /* !BSP_SMALL_MEMORY */

View File

@@ -35,7 +35,6 @@ rtems_task Init(
rtems_task_argument argument rtems_task_argument argument
) )
{ {
#if !BSP_SMALL_MEMORY
int i; int i;
int argc; int argc;
char *argv[MAX_ARGS]; char *argv[MAX_ARGS];
@@ -51,8 +50,5 @@ rtems_task Init(
} }
} }
TEST_END(); TEST_END();
#else
puts( "TARGET MEMORY TOO SMALL TO RUN\n\n");
#endif
rtems_test_exit(0); rtems_test_exit(0);
} }

View File

@@ -23,7 +23,6 @@
const char rtems_test_name[] = "UTF8PROC 1"; const char rtems_test_name[] = "UTF8PROC 1";
#if !defined(BSP_SMALL_MEMORY)
static void static void
test_utf8proc_errmsg ( void ) test_utf8proc_errmsg ( void )
{ {
@@ -248,17 +247,12 @@ static void test ( void )
test_utf8proc_normalize ( utf8proc_NFKD ); test_utf8proc_normalize ( utf8proc_NFKD );
test_utf8proc_normalize ( utf8proc_NFKC ); test_utf8proc_normalize ( utf8proc_NFKC );
} }
#endif
static void Init ( rtems_task_argument arg ) static void Init ( rtems_task_argument arg )
{ {
TEST_BEGIN(); TEST_BEGIN();
#if defined(BSP_SMALL_MEMORY) test ( );
puts( "Does not run on small memory targets" );
#else
test();
#endif
TEST_END(); TEST_END();

View File

@@ -24,15 +24,12 @@
/* forward declarations to avoid warnings */ /* forward declarations to avoid warnings */
rtems_task Init(rtems_task_argument argument); rtems_task Init(rtems_task_argument argument);
#if !BSP_SMALL_MEMORY static void notification(int fd, int seconds_remaining, void *arg);
static void notification(int fd, int seconds_remaining, void *arg);
#endif
const char rtems_test_name[] = "CAPTURE ENGINE"; const char rtems_test_name[] = "CAPTURE ENGINE";
volatile int can_proceed = 1; volatile int can_proceed = 1;
#if !BSP_SMALL_MEMORY
static void notification(int fd, int seconds_remaining, void *arg) static void notification(int fd, int seconds_remaining, void *arg)
{ {
printf( printf(
@@ -40,15 +37,11 @@ static void notification(int fd, int seconds_remaining, void *arg)
seconds_remaining seconds_remaining
); );
} }
#endif
rtems_task Init( rtems_task Init(
rtems_task_argument ignored rtems_task_argument ignored
) )
{ {
#if BSP_SMALL_MEMORY
printf("NO Capture Engine. MEMORY TOO SMALL");
#else
rtems_status_code status; rtems_status_code status;
rtems_task_priority old_priority; rtems_task_priority old_priority;
rtems_mode old_mode; rtems_mode old_mode;
@@ -84,5 +77,4 @@ rtems_task Init(
exit( 0 ); exit( 0 );
} }
#endif
} }

View File

@@ -26,7 +26,6 @@
#include <rtems.h> #include <rtems.h>
#include <rtems/monitor.h> #include <rtems/monitor.h>
#if !BSP_SMALL_MEMORY
static volatile int capture_CT1a_deleted; static volatile int capture_CT1a_deleted;
static volatile int capture_CT1b_deleted; static volatile int capture_CT1b_deleted;
static volatile int capture_CT1c_deleted; static volatile int capture_CT1c_deleted;
@@ -271,4 +270,3 @@ void setup_tasks_to_watch (void)
cmd++) cmd++)
rtems_monitor_insert_cmd (&capture_cmds[cmd]); rtems_monitor_insert_cmd (&capture_cmds[cmd]);
} }
#endif /* BSP_SMALL_MEMORY */

View File

@@ -29,11 +29,8 @@ rtems_task Init(
#include <bsp.h> /* for device driver prototypes */ #include <bsp.h> /* for device driver prototypes */
#define FILEIO_BUILD 1 #define FILEIO_BUILD 1
#if BSP_SMALL_MEMORY
#undef FILEIO_BUILD
#endif
#if defined(RTEMS_BSP_HAS_IDE_DRIVER) && !BSP_SMALL_MEMORY #if defined(RTEMS_BSP_HAS_IDE_DRIVER)
#include <libchip/ata.h> /* for ata driver prototype */ #include <libchip/ata.h> /* for ata driver prototype */
#include <libchip/ide_ctrl.h> /* for general ide driver prototype */ #include <libchip/ide_ctrl.h> /* for general ide driver prototype */
#endif #endif

View File

@@ -21,11 +21,7 @@
#define CONFIGURE_INIT #define CONFIGURE_INIT
#include "system.h" #include "system.h"
#if BSP_SMALL_MEMORY
#include <stdio.h>
#else
#include <iostream> #include <iostream>
#endif
#include <stdlib.h> #include <stdlib.h>
@@ -35,14 +31,10 @@ rtems_task Init(
rtems_task_argument ignored rtems_task_argument ignored
) )
{ {
#if BSP_SMALL_MEMORY
printf ("NO STDC++. MEMORY TOO SMALL");
#else
std::cout << std::endl << std::endl std::cout << std::endl << std::endl
<< "*** BEGIN OF " << rtems_test_name << " TEST ***" << std::endl; << "*** BEGIN OF " << rtems_test_name << " TEST ***" << std::endl;
std::cout << "Hello World" << std::endl; std::cout << "Hello World" << std::endl;
std::cout << "*** END OF " << rtems_test_name << " TEST ***" << std::endl; std::cout << "*** END OF " << rtems_test_name << " TEST ***" << std::endl;
#endif
exit( 0 ); exit( 0 );
} }

View File

@@ -41,8 +41,6 @@ rtems_task Init(rtems_task_argument argument);
#include <rtems/confdefs.h> #include <rtems/confdefs.h>
#if !BSP_SMALL_MEMORY
#include <rtems/rtems_bsdnet.h> #include <rtems/rtems_bsdnet.h>
#include <rtems/error.h> #include <rtems/error.h>
#include <stdio.h> #include <stdio.h>
@@ -286,14 +284,3 @@ Init (rtems_task_argument ignored)
rtems_test_end(); rtems_test_end();
exit( 0 ); exit( 0 );
} }
#else
#include <stdio.h>
/*
* RTEMS Startup Task
*/
rtems_task
Init (rtems_task_argument ignored)
{
printf("NO NETWORKING. MEMORY TOO SMALL");
}
#endif

View File

@@ -31,10 +31,6 @@ rtems_task Init(
* is required by this CPU. * is required by this CPU.
*/ */
#if BSP_SMALL_MEMORY
printf("NO Paranoia Test. MEMORY TOO SMALL");
#else
#if (defined (m68040)) #if (defined (m68040))
M68KFPSPInstallExceptionHandlers (); M68KFPSPInstallExceptionHandlers ();
#endif #endif
@@ -42,6 +38,5 @@ rtems_task Init(
rtems_test_begin(); rtems_test_begin();
paranoia(1, args); paranoia(1, args);
rtems_test_end(); rtems_test_end();
#endif /* BSP_SMALL_MEMORY */
exit( 0 ); exit( 0 );
} }

View File

@@ -3,7 +3,6 @@
#endif #endif
#include <bsp.h> #include <bsp.h>
#if !BSP_SMALL_MEMORY
/* /*
* A C version of Kahan's Floating Point Test "Paranoia" * A C version of Kahan's Floating Point Test "Paranoia"
* *
@@ -2308,4 +2307,3 @@ History ()
msglist (hist); msglist (hist);
} }
#endif /* BSP_SMALL_MEMORY */

View File

@@ -18,25 +18,19 @@
#define CONFIGURE_INIT #define CONFIGURE_INIT
#include "system.h" #include "system.h"
#if !BSP_SMALL_MEMORY
#include <rtems/rtems_bsdnet.h> #include <rtems/rtems_bsdnet.h>
#include <rtems/rtemspppd.h> #include <rtems/rtemspppd.h>
#include "netconfig.h" #include "netconfig.h"
#endif
const char rtems_test_name[] = "PPPD"; const char rtems_test_name[] = "PPPD";
rtems_task Init(rtems_task_argument argument) rtems_task Init(rtems_task_argument argument)
{ {
#if BSP_SMALL_MEMORY
printf("NO NETWORKING. MEMORY TOO SMALL");
#else
rtems_test_begin(); rtems_test_begin();
/* initialize network */ /* initialize network */
rtems_bsdnet_initialize_network(); rtems_bsdnet_initialize_network();
rtems_pppd_initialize(); rtems_pppd_initialize();
pppdapp_initialize(); pppdapp_initialize();
#endif
rtems_task_delete(RTEMS_SELF); rtems_task_delete(RTEMS_SELF);
} }

View File

@@ -5,8 +5,6 @@
#include <bsp.h> #include <bsp.h>
#if !BSP_SMALL_MEMORY
#include <stdio.h> #include <stdio.h>
#include <rtems/rtemspppd.h> #include <rtems/rtemspppd.h>
#include "system.h" #include "system.h"
@@ -152,5 +150,3 @@ int pppdapp_initialize(void)
return ( iReturn ); return ( iReturn );
} }
#endif

View File

@@ -28,8 +28,6 @@
const char rtems_test_name[] = "SPSTKALLOC 2"; const char rtems_test_name[] = "SPSTKALLOC 2";
#if !BSP_SMALL_MEMORY
#include <stdio.h> #include <stdio.h>
#include <inttypes.h> #include <inttypes.h>
@@ -164,26 +162,3 @@ static void task_stack_free(void *addr)
{ {
_Heap_Free(&task_stack_heap, addr); _Heap_Free(&task_stack_heap, addr);
} }
#else /* BSP_SMALL_MEMORY */
static void Init(rtems_task_argument arg)
{
TEST_BEGIN();
puts("NOT ENOUGH MEMORY TO RUN TEST");
rtems_test_exit(0);
}
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
#define CONFIGURE_MAXIMUM_TASKS 1
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_INIT
#include <rtems/confdefs.h>
#endif /* BSP_SMALL_MEMORY */