summaryrefslogtreecommitdiffstats
path: root/testsuite/loopback01
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2013-10-09 22:52:54 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-10-10 09:08:23 +0200
commite599318e912d8836c59d8b5202e3e31a6b8dcae9 (patch)
tree1172b8b830a1c3236e45c834c2b80e01325ea144 /testsuite/loopback01
parentMove files to match FreeBSD layout (diff)
downloadrtems-libbsd-e599318e912d8836c59d8b5202e3e31a6b8dcae9.tar.bz2
Update files to match FreeBSD layout
Add compatibility with Newlib header files. Some FreeBSD header files are mapped by the translation script: o rtems/bsd/sys/_types.h o rtems/bsd/sys/errno.h o rtems/bsd/sys/lock.h o rtems/bsd/sys/param.h o rtems/bsd/sys/resource.h o rtems/bsd/sys/time.h o rtems/bsd/sys/timespec.h o rtems/bsd/sys/types.h o rtems/bsd/sys/unistd.h It is now possible to include <sys/socket.h> directly for example. Generate one Makefile which builds everything including tests.
Diffstat (limited to 'testsuite/loopback01')
-rw-r--r--testsuite/loopback01/.gitignore1
-rw-r--r--testsuite/loopback01/Makefile34
-rw-r--r--testsuite/loopback01/test_main.c20
3 files changed, 5 insertions, 50 deletions
diff --git a/testsuite/loopback01/.gitignore b/testsuite/loopback01/.gitignore
deleted file mode 100644
index 27bb1279..00000000
--- a/testsuite/loopback01/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-init.c
diff --git a/testsuite/loopback01/Makefile b/testsuite/loopback01/Makefile
deleted file mode 100644
index 7998aba6..00000000
--- a/testsuite/loopback01/Makefile
+++ /dev/null
@@ -1,34 +0,0 @@
-#
-# $Id$
-#
-
-include ../../config.inc
-
-PGM=${ARCH}/loopback01.exe
-
-# optional managers required
-MANAGERS=all
-
-# C source names
-C_FILES = init.c test_main.c
-C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-
-AM_CPPFLAGS += -I $(INSTALL_BASE)/include
-AM_CPPFLAGS += -I ../init01
-LINK_LIBS += $(INSTALL_BASE)/libbsdc.a
-LINK_LIBS += $(INSTALL_BASE)/libbsd.a ${REL_ARGS}
-
-include $(RTEMS_MAKEFILE_PATH)/Makefile.inc
-include $(RTEMS_CUSTOM)
-include $(PROJECT_ROOT)/make/leaf.cfg
-
-OBJS= $(C_O_FILES)
-CLEAN_ADDITIONS += init.c
-
-all: init.c ${ARCH} $(PGM)
-
-init.c: ../init01/init.c
- cp ../init01/init.c .
-
-$(PGM): $(OBJS)
- -$(make-exe)
diff --git a/testsuite/loopback01/test_main.c b/testsuite/loopback01/test_main.c
index b21fc87e..6f58f329 100644
--- a/testsuite/loopback01/test_main.c
+++ b/testsuite/loopback01/test_main.c
@@ -9,19 +9,7 @@
#include <sys/socket.h>
#include <netinet/in.h>
-void print_test_name(void)
-{
- printf( "\n\n*** LIBFREEBSD LOOPBACK SOCKET01 TEST ***\n" );
-}
-
-
-/* XXX remaining init configuration to evaluate */
-#define CONFIGURE_INIT_TASK_STACK_SIZE (10*1024)
-#define CONFIGURE_INIT_TASK_PRIORITY 50
-#define CONFIGURE_INIT_TASK_INITIAL_MODES (RTEMS_PREEMPT | \
- RTEMS_NO_TIMESLICE | \
- RTEMS_NO_ASR | \
- RTEMS_INTERRUPT_LEVEL(0))
+#define TEST_NAME "LIBBSD LOOPBACK 1"
#include <rtems/error.h>
#include <stdio.h>
@@ -224,7 +212,7 @@ static rtems_task clientTask(rtems_task_argument arg)
/*
* RTEMS Startup Task
*/
-void test_main(void)
+static void test_main(void)
{
rtems_status_code sc;
rtems_task_priority old;
@@ -270,6 +258,8 @@ void test_main(void)
spawnTask(clientTask, 120, 6);
rtems_task_wake_after(500);
- puts( "*** END OF LOOPBACK TEST ***" );
+ puts( "*** END OF " TEST_NAME " TEST ***" );
exit( 0 );
}
+
+#include <rtems/bsd/test/default-init.h>