From 81edae464d7f464d74e6223847c8c734544f7cf2 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 31 Mar 2015 09:42:01 +0200 Subject: media01: Add network and SMP support --- testsuite/media01/test_main.c | 47 ++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 44 insertions(+), 3 deletions(-) (limited to 'testsuite/media01/test_main.c') diff --git a/testsuite/media01/test_main.c b/testsuite/media01/test_main.c index 7f585a19..3d7f75ff 100644 --- a/testsuite/media01/test_main.c +++ b/testsuite/media01/test_main.c @@ -34,11 +34,38 @@ #include #include +#include #include #include #define TEST_NAME "LIBBSD MEDIA 1" +struct rtems_ftpd_configuration rtems_ftpd_configuration = { + /* FTPD task priority */ + .priority = 100, + + /* Maximum buffersize for hooks */ + .max_hook_filesize = 0, + + /* Well-known port */ + .port = 21, + + /* List of hooks */ + .hooks = NULL, + + /* Root for FTPD or NULL for "/" */ + .root = NULL, + + /* Max. connections */ + .tasks_count = 4, + + /* Idle timeout in seconds or 0 for no (infinite) timeout */ + .idle = 5 * 60, + + /* Access: 0 - r/w, 1 - read-only, 2 - write-only, 3 - browse-only */ + .access = 0 +}; + static rtems_status_code media_listener(rtems_media_event event, rtems_media_state state, const char *src, const char *dest, void *arg) @@ -83,8 +110,12 @@ media_listener(rtems_media_event event, rtems_media_state state, static void test_main(void) { + int rv; rtems_status_code sc; + rv = rtems_initialize_ftpd(); + assert(rv == 0); + sc = rtems_shell_init("SHLL", 16 * 1024, 1, CONSOLE_DEVICE_NAME, false, true, NULL); assert(sc == RTEMS_SUCCESSFUL); @@ -117,11 +148,15 @@ early_initialization(void) assert(sc == RTEMS_SUCCESSFUL); } -#include +#define DEFAULT_NETWORK_DHCPCD_ENABLE #define CONFIGURE_FILESYSTEM_DOSFS -#include +#define CONFIGURE_SMP_APPLICATION + +#define CONFIGURE_SMP_MAXIMUM_PROCESSORS 32 + +#include #define CONFIGURE_SHELL_COMMANDS_INIT @@ -131,7 +166,12 @@ early_initialization(void) #define CONFIGURE_SHELL_USER_COMMANDS \ &bsp_interrupt_shell_command, \ - &rtems_shell_BSD_Command + &rtems_shell_BSD_Command, \ + &rtems_shell_HOSTNAME_Command, \ + &rtems_shell_PING_Command, \ + &rtems_shell_ROUTE_Command, \ + &rtems_shell_NETSTAT_Command, \ + &rtems_shell_IFCONFIG_Command #define CONFIGURE_SHELL_COMMAND_CPUUSE #define CONFIGURE_SHELL_COMMAND_PERIODUSE @@ -153,6 +193,7 @@ early_initialization(void) #define CONFIGURE_SHELL_COMMAND_MALLOC_INFO #define CONFIGURE_SHELL_COMMAND_FDISK +#define CONFIGURE_SHELL_COMMAND_BLKSTATS #define CONFIGURE_SHELL_COMMAND_BLKSYNC #define CONFIGURE_SHELL_COMMAND_MSDOSFMT #define CONFIGURE_SHELL_COMMAND_DF -- cgit v1.2.3