[PATCH 2/2] testsuites: Remove BSP_SMALL_MEMORY

Joel Sherrill joel.sherrill at oarcorp.com
Mon May 5 15:41:50 UTC 2014


---
 testsuites/fstests/fsdosfsformat01/init.c          | 14 +++-------
 testsuites/fstests/fsdosfsname01/init.c            | 32 ++++++----------------
 testsuites/libtests/flashdisk01/init.c             | 29 ++------------------
 testsuites/libtests/flashdisk01/test-file-system.c |  4 ---
 testsuites/libtests/monitor02/init.c               |  4 ---
 testsuites/libtests/utf8proc01/init.c              |  8 +-----
 testsuites/samples/capture/init.c                  | 10 +------
 testsuites/samples/capture/test1.c                 |  2 --
 testsuites/samples/fileio/system.h                 |  5 +---
 testsuites/samples/iostream/init.cc                |  8 ------
 testsuites/samples/loopback/init.c                 | 13 ---------
 testsuites/samples/paranoia/init.c                 |  5 ----
 testsuites/samples/paranoia/paranoia.c             |  2 --
 testsuites/samples/pppd/init.c                     |  6 ----
 testsuites/samples/pppd/pppdapp.c                  |  4 ---
 testsuites/sptests/spstkalloc02/init.c             | 25 -----------------
 16 files changed, 18 insertions(+), 153 deletions(-)

diff --git a/testsuites/fstests/fsdosfsformat01/init.c b/testsuites/fstests/fsdosfsformat01/init.c
index cb8a5ea..976dc9c 100644
--- a/testsuites/fstests/fsdosfsformat01/init.c
+++ b/testsuites/fstests/fsdosfsformat01/init.c
@@ -18,11 +18,6 @@
 
 #include "tmacros.h"
 
-#include <bsp.h>
-
-const char rtems_test_name[] = "FSDOSFSFORMAT 1";
-
-#if !defined(BSP_SMALL_MEMORY)
 #include <fcntl.h>
 #include <inttypes.h>
 #include <sys/statvfs.h>
@@ -31,6 +26,10 @@ const char rtems_test_name[] = "FSDOSFSFORMAT 1";
 #include <rtems/dosfs.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 SECTOR_SIZE 512 /* sector size (bytes) */
 #define FAT12_MAX_CLN 4085 /* maximum + 1 number of clusters for FAT12 */
@@ -471,17 +470,12 @@ static void test( void )
   rv = unlink( dev_name );
   rtems_test_assert( rv == 0 );
 }
-#endif
 
 static void Init( rtems_task_argument arg )
 {
   TEST_BEGIN();
 
-#if defined(BSP_SMALL_MEMORY)
-  puts( "Test is too large for small memory BSPs" );
-#else
   test();
-#endif
 
   TEST_END();
   rtems_test_exit( 0 );
diff --git a/testsuites/fstests/fsdosfsname01/init.c b/testsuites/fstests/fsdosfsname01/init.c
index 8943639..d57c653 100644
--- a/testsuites/fstests/fsdosfsname01/init.c
+++ b/testsuites/fstests/fsdosfsname01/init.c
@@ -16,11 +16,9 @@
   #include "config.h"
 #endif
 
-#include "tmacros.h"
 
-const char rtems_test_name[] = "FSDOSFSNAME 1";
+#include "tmacros.h"
 
-#if !defined(BSP_SMALL_MEMORY)
 #include <errno.h>
 #include <fcntl.h>
 #include <dirent.h>
@@ -38,6 +36,8 @@ const char rtems_test_name[] = "FSDOSFSNAME 1";
 
 #include <errno.h>
 
+const char rtems_test_name[] = "FSDOSFSNAME 1";
+
 #define PRINT_DISK_IMAGE 0
 
 #define MOUNT_DIR "/mnt"
@@ -1286,26 +1286,17 @@ static void test( void )
 
   test_compatibility();
 }
-#endif
 
 static void Init( rtems_task_argument arg )
 {
   TEST_BEGIN();
 
-#if defined(BSP_SMALL_MEMORY)
-  puts( "Test is too large for small memory BSPs" );
-#else
   test();
-#endif
 
   TEST_END();
   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 [] = {
   { .block_size = BLOCK_SIZE, .block_num = BLOCK_NUM },
   { .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);
 
 #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_SEMAPHORES (2 * RTEMS_DOSFS_SEMAPHORES_PER_INSTANCE)
-
 #define CONFIGURE_APPLICATION_EXTRA_DRIVERS RAMDISK_DRIVER_TABLE_ENTRY
 
+#define CONFIGURE_APPLICATION_NEEDS_LIBBLOCK
+
 #define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
 
 #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*/
 #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_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
+
 #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
 
 #define CONFIGURE_INIT
diff --git a/testsuites/libtests/flashdisk01/init.c b/testsuites/libtests/flashdisk01/init.c
index a5053d3..f37f526 100644
--- a/testsuites/libtests/flashdisk01/init.c
+++ b/testsuites/libtests/flashdisk01/init.c
@@ -18,10 +18,6 @@
 
 #include "tmacros.h"
 
-const char rtems_test_name[] = "FLASHDISK 1";
-
-#if !BSP_SMALL_MEMORY
-
 #include <sys/stat.h>
 #include <errno.h>
 #include <string.h>
@@ -36,6 +32,8 @@ const char rtems_test_name[] = "FLASHDISK 1";
 
 #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);
 
@@ -360,26 +358,3 @@ uint32_t rtems_flashdisk_configuration_size = FLASHDISK_CONFIG_COUNT;
 #define CONFIGURE_INIT
 
 #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 */
diff --git a/testsuites/libtests/flashdisk01/test-file-system.c b/testsuites/libtests/flashdisk01/test-file-system.c
index 415927c..2062020 100644
--- a/testsuites/libtests/flashdisk01/test-file-system.c
+++ b/testsuites/libtests/flashdisk01/test-file-system.c
@@ -16,8 +16,6 @@
 
 #include <bsp.h>
 
-#if !BSP_SMALL_MEMORY
-
 #include <sys/types.h>
 #include <sys/param.h>
 #include <sys/stat.h>
@@ -835,5 +833,3 @@ void test_file_system_with_handler(
 
   free(fs);
 }
-
-#endif /* !BSP_SMALL_MEMORY */
diff --git a/testsuites/libtests/monitor02/init.c b/testsuites/libtests/monitor02/init.c
index 9ea6207..22818cc 100644
--- a/testsuites/libtests/monitor02/init.c
+++ b/testsuites/libtests/monitor02/init.c
@@ -35,7 +35,6 @@ rtems_task Init(
   rtems_task_argument argument
 )
 {
-#if !BSP_SMALL_MEMORY
   int                i;
   int                argc;
   char               *argv[MAX_ARGS];
@@ -51,8 +50,5 @@ rtems_task Init(
     }
   }
   TEST_END();
-#else
-  puts( "TARGET MEMORY TOO SMALL TO RUN\n\n");
-#endif
   rtems_test_exit(0);
 }
diff --git a/testsuites/libtests/utf8proc01/init.c b/testsuites/libtests/utf8proc01/init.c
index 06948fe..fd27451 100644
--- a/testsuites/libtests/utf8proc01/init.c
+++ b/testsuites/libtests/utf8proc01/init.c
@@ -23,7 +23,6 @@
 
 const char rtems_test_name[] = "UTF8PROC 1";
 
-#if !defined(BSP_SMALL_MEMORY)
 static void
 test_utf8proc_errmsg ( void )
 {
@@ -248,17 +247,12 @@ static void test ( void )
   test_utf8proc_normalize      ( utf8proc_NFKD );
   test_utf8proc_normalize      ( utf8proc_NFKC );
 }
-#endif
 
 static void Init ( rtems_task_argument arg )
 {
   TEST_BEGIN();
 
-#if defined(BSP_SMALL_MEMORY)
-  puts( "Does not run on small memory targets" );
-#else
-  test();
-#endif
+  test ( );
 
   TEST_END();
 
diff --git a/testsuites/samples/capture/init.c b/testsuites/samples/capture/init.c
index 956cc1a..a10ccc5 100644
--- a/testsuites/samples/capture/init.c
+++ b/testsuites/samples/capture/init.c
@@ -24,15 +24,12 @@
 
 /* forward declarations to avoid warnings */
 rtems_task Init(rtems_task_argument argument);
-#if !BSP_SMALL_MEMORY
-  static void notification(int fd, int seconds_remaining, void *arg);
-#endif
+static void notification(int fd, int seconds_remaining, void *arg);
 
 const char rtems_test_name[] = "CAPTURE ENGINE";
 
 volatile int can_proceed = 1;
 
-#if !BSP_SMALL_MEMORY
 static void notification(int fd, int seconds_remaining, void *arg)
 {
   printf(
@@ -40,15 +37,11 @@ static void notification(int fd, int seconds_remaining, void *arg)
     seconds_remaining
   );
 }
-#endif
 
 rtems_task Init(
   rtems_task_argument ignored
 )
 {
-#if BSP_SMALL_MEMORY
-  printf("NO Capture Engine. MEMORY TOO SMALL");
-#else
   rtems_status_code   status;
   rtems_task_priority old_priority;
   rtems_mode          old_mode;
@@ -84,5 +77,4 @@ rtems_task Init(
 
     exit( 0 );
   }
-#endif
 }
diff --git a/testsuites/samples/capture/test1.c b/testsuites/samples/capture/test1.c
index 7bc0ab7..eeb85b5 100644
--- a/testsuites/samples/capture/test1.c
+++ b/testsuites/samples/capture/test1.c
@@ -26,7 +26,6 @@
 #include <rtems.h>
 #include <rtems/monitor.h>
 
-#if !BSP_SMALL_MEMORY
 static volatile int capture_CT1a_deleted;
 static volatile int capture_CT1b_deleted;
 static volatile int capture_CT1c_deleted;
@@ -271,4 +270,3 @@ void setup_tasks_to_watch (void)
        cmd++)
       rtems_monitor_insert_cmd (&capture_cmds[cmd]);
 }
-#endif /* BSP_SMALL_MEMORY */
diff --git a/testsuites/samples/fileio/system.h b/testsuites/samples/fileio/system.h
index 568e7d6..8e3fa9e 100644
--- a/testsuites/samples/fileio/system.h
+++ b/testsuites/samples/fileio/system.h
@@ -29,11 +29,8 @@ rtems_task Init(
 #include <bsp.h> /* for device driver prototypes */
 
 #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/ide_ctrl.h> /* for general ide driver prototype */
 #endif
diff --git a/testsuites/samples/iostream/init.cc b/testsuites/samples/iostream/init.cc
index 610e73f..d987750 100644
--- a/testsuites/samples/iostream/init.cc
+++ b/testsuites/samples/iostream/init.cc
@@ -21,11 +21,7 @@
 #define CONFIGURE_INIT
 #include "system.h"
 
-#if BSP_SMALL_MEMORY
-#include <stdio.h>
-#else
 #include <iostream>
-#endif
 
 #include <stdlib.h>
 
@@ -35,14 +31,10 @@ rtems_task Init(
   rtems_task_argument ignored
 )
 {
-#if BSP_SMALL_MEMORY
-  printf ("NO STDC++. MEMORY TOO SMALL");
-#else
   std::cout << std::endl << std::endl
     << "*** BEGIN OF " << rtems_test_name << " TEST ***" << std::endl;
   std::cout << "Hello World" << std::endl;
   std::cout << "*** END OF " << rtems_test_name << " TEST ***" << std::endl;
-#endif
   exit( 0 );
 }
 
diff --git a/testsuites/samples/loopback/init.c b/testsuites/samples/loopback/init.c
index aed42e6..8819561 100644
--- a/testsuites/samples/loopback/init.c
+++ b/testsuites/samples/loopback/init.c
@@ -41,8 +41,6 @@ rtems_task Init(rtems_task_argument argument);
 
 #include <rtems/confdefs.h>
 
-#if !BSP_SMALL_MEMORY
-
 #include <rtems/rtems_bsdnet.h>
 #include <rtems/error.h>
 #include <stdio.h>
@@ -286,14 +284,3 @@ Init (rtems_task_argument ignored)
     rtems_test_end();
     exit( 0 );
 }
-#else
-#include <stdio.h>
-/*
- * RTEMS Startup Task
- */
-rtems_task
-Init (rtems_task_argument ignored)
-{
-  printf("NO NETWORKING. MEMORY TOO SMALL");
-}
-#endif
diff --git a/testsuites/samples/paranoia/init.c b/testsuites/samples/paranoia/init.c
index 576f518..3718af4 100644
--- a/testsuites/samples/paranoia/init.c
+++ b/testsuites/samples/paranoia/init.c
@@ -31,10 +31,6 @@ rtems_task Init(
    *  is required by this CPU.
    */
 
-#if BSP_SMALL_MEMORY
-  printf("NO Paranoia Test. MEMORY TOO SMALL");
-#else
-
 #if (defined (m68040))
   M68KFPSPInstallExceptionHandlers ();
 #endif
@@ -42,6 +38,5 @@ rtems_task Init(
   rtems_test_begin();
   paranoia(1, args);
   rtems_test_end();
-#endif /* BSP_SMALL_MEMORY */
   exit( 0 );
 }
diff --git a/testsuites/samples/paranoia/paranoia.c b/testsuites/samples/paranoia/paranoia.c
index 4000631..0c20753 100644
--- a/testsuites/samples/paranoia/paranoia.c
+++ b/testsuites/samples/paranoia/paranoia.c
@@ -3,7 +3,6 @@
 #endif
 
 #include <bsp.h>
-#if !BSP_SMALL_MEMORY
 /*
  *      A C version of Kahan's Floating Point Test "Paranoia"
  *
@@ -2308,4 +2307,3 @@ History ()
 
     msglist (hist);
 }
-#endif /* BSP_SMALL_MEMORY */
diff --git a/testsuites/samples/pppd/init.c b/testsuites/samples/pppd/init.c
index f2f17f0..938eec5 100644
--- a/testsuites/samples/pppd/init.c
+++ b/testsuites/samples/pppd/init.c
@@ -18,25 +18,19 @@
 #define CONFIGURE_INIT
 #include "system.h"
 
-#if !BSP_SMALL_MEMORY
 #include <rtems/rtems_bsdnet.h>
 #include <rtems/rtemspppd.h>
 #include "netconfig.h"
-#endif
 
 const char rtems_test_name[] = "PPPD";
 
 rtems_task Init(rtems_task_argument argument)
 {
-#if BSP_SMALL_MEMORY
-  printf("NO NETWORKING. MEMORY TOO SMALL");
-#else
   rtems_test_begin();
 
   /* initialize network */
   rtems_bsdnet_initialize_network();
   rtems_pppd_initialize();
   pppdapp_initialize();
-#endif
   rtems_task_delete(RTEMS_SELF);
 }
diff --git a/testsuites/samples/pppd/pppdapp.c b/testsuites/samples/pppd/pppdapp.c
index 529912a..0eb789d 100644
--- a/testsuites/samples/pppd/pppdapp.c
+++ b/testsuites/samples/pppd/pppdapp.c
@@ -5,8 +5,6 @@
 
 #include <bsp.h>
 
-#if !BSP_SMALL_MEMORY
-
 #include <stdio.h>
 #include <rtems/rtemspppd.h>
 #include "system.h"
@@ -152,5 +150,3 @@ int pppdapp_initialize(void)
 
   return ( iReturn );
 }
-
-#endif
diff --git a/testsuites/sptests/spstkalloc02/init.c b/testsuites/sptests/spstkalloc02/init.c
index 7fb5fd2..a01bc5c 100644
--- a/testsuites/sptests/spstkalloc02/init.c
+++ b/testsuites/sptests/spstkalloc02/init.c
@@ -28,8 +28,6 @@
 
 const char rtems_test_name[] = "SPSTKALLOC 2";
 
-#if !BSP_SMALL_MEMORY
-
 #include <stdio.h>
 #include <inttypes.h>
 
@@ -164,26 +162,3 @@ static void task_stack_free(void *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 */
-- 
1.8.3.1




More information about the devel mailing list