change log for rtems (2010-06-08)
rtems-vc at rtems.org
rtems-vc at rtems.org
Tue Jun 8 14:11:24 UTC 2010
*jennifer*:
2010-06-08 Jennifer Averett <Jennifer.Averett at OARcorp.com
* spfifo01/.cvsignore, spfifo02/.cvsignore, spfifo03/.cvsignore,
spfifo04/.cvsignore: New files.
A 1.1 testsuites/sptests/spfifo01/.cvsignore
A 1.1 testsuites/sptests/spfifo02/.cvsignore
A 1.1 testsuites/sptests/spfifo03/.cvsignore
A 1.1 testsuites/sptests/spfifo04/.cvsignore
diff -u /dev/null rtems/testsuites/sptests/spfifo01/.cvsignore:1.1
--- /dev/null Tue Jun 8 09:11:21 2010
+++ rtems/testsuites/sptests/spfifo01/.cvsignore Tue Jun 8 08:13:28 2010
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
diff -u /dev/null rtems/testsuites/sptests/spfifo02/.cvsignore:1.1
--- /dev/null Tue Jun 8 09:11:21 2010
+++ rtems/testsuites/sptests/spfifo02/.cvsignore Tue Jun 8 08:13:28 2010
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
diff -u /dev/null rtems/testsuites/sptests/spfifo03/.cvsignore:1.1
--- /dev/null Tue Jun 8 09:11:21 2010
+++ rtems/testsuites/sptests/spfifo03/.cvsignore Tue Jun 8 08:13:28 2010
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
diff -u /dev/null rtems/testsuites/sptests/spfifo04/.cvsignore:1.1
--- /dev/null Tue Jun 8 09:11:21 2010
+++ rtems/testsuites/sptests/spfifo04/.cvsignore Tue Jun 8 08:13:28 2010
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
*jennifer*:
2010-06-08 Jennifer Averett <Jennifer.Averett at OARcorp.com>
* spfifo01/Makefile.am, spfifo02/Makefile.am, spfifo03/Makefile.am,
spfifo04/Makefile.am: Merged fifo main and test files into the
standard init file. Fixed copyright information.
* spfifo01/init.c, spfifo02/init.c, spfifo03/init.c, spfifo04/init.c:
New files.
* spfifo01/main.c, spfifo01/test.c, spfifo02/main.c, spfifo02/test.c,
spfifo03/main.c, spfifo03/test.c, spfifo04/main.c, spfifo04/test.c:
Removed.
M 1.2 testsuites/sptests/spfifo01/Makefile.am
A 1.1 testsuites/sptests/spfifo01/init.c
R 1.1 testsuites/sptests/spfifo01/main.c
R 1.1 testsuites/sptests/spfifo01/test.c
M 1.2 testsuites/sptests/spfifo02/Makefile.am
A 1.1 testsuites/sptests/spfifo02/init.c
R 1.1 testsuites/sptests/spfifo02/main.c
R 1.1 testsuites/sptests/spfifo02/test.c
M 1.2 testsuites/sptests/spfifo03/Makefile.am
A 1.1 testsuites/sptests/spfifo03/init.c
R 1.1 testsuites/sptests/spfifo03/main.c
R 1.1 testsuites/sptests/spfifo03/test.c
M 1.2 testsuites/sptests/spfifo04/Makefile.am
A 1.1 testsuites/sptests/spfifo04/init.c
R 1.1 testsuites/sptests/spfifo04/main.c
R 1.1 testsuites/sptests/spfifo04/test.c
diff -u rtems/testsuites/sptests/spfifo01/Makefile.am:1.1 rtems/testsuites/sptests/spfifo01/Makefile.am:1.2
--- rtems/testsuites/sptests/spfifo01/Makefile.am:1.1 Mon Jun 7 14:41:36 2010
+++ rtems/testsuites/sptests/spfifo01/Makefile.am Tue Jun 8 08:59:17 2010
@@ -5,7 +5,7 @@
MANAGERS = all
rtems_tests_PROGRAMS = spfifo01
-spfifo01_SOURCES = main.c test.c
+spfifo01_SOURCES = init.c
dist_rtems_tests_DATA = spfifo01.scn
dist_rtems_tests_DATA += spfifo01.doc
diff -u /dev/null rtems/testsuites/sptests/spfifo01/init.c:1.1
--- /dev/null Tue Jun 8 09:11:22 2010
+++ rtems/testsuites/sptests/spfifo01/init.c Tue Jun 8 08:59:17 2010
@@ -0,0 +1,89 @@
+/*
+ * COPYRIGHT (c) 1989-2010.
+ * On-Line Applications Research Corporation (OAR).
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ *
+ * $Id$
+ */
+
+/* Includes */
+#include <bsp.h>
+#include <tmacros.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <errno.h>
+
+#include <rtems.h>
+#include <rtems/libio.h>
+
+
+void test_main(void)
+{
+
+ int status = -1;
+ int fd = 0;
+
+ puts("\n\n*** FIFO / PIPE OPEN TEST - 1 ***");
+ puts(
+"\n\nConfiguration: Pipes not enabled"
+ );
+
+ puts("\n\nCreating directory /tmp");
+ status = mkdir("/tmp", 0777);
+ rtems_test_assert(status == 0);
+
+ puts("\n\nCreating fifo /tmp/fifo");
+ status = mkfifo("/tmp/fifo01", 0777);
+ rtems_test_assert(status == 0);
+
+ puts("\n\nAttempt to open the fifo file\n");
+ puts(
+ "Must result in failure since \
+pipes are not enabled in the configuration"
+ );
+
+ fd = open("/tmp/fifo01", O_RDONLY);
+ rtems_test_assert(fd == -1);
+ rtems_test_assert(errno == EINTR); // Should this
+ // be ENOMEM?
+ puts("\n\nRemove the entry /tmp/fifo01");
+ status = unlink("/tmp/fifo01");
+ rtems_test_assert(status == 0);
+
+ puts("\n\nRemove directory /tmp");
+ status = rmdir("/tmp");
+ rtems_test_assert(status == 0);
+
+ puts("\n\n*** END OF FIFO / PIPE OPEN TEST - 1 ***");
+}
+
+
+rtems_task Init(
+ rtems_task_argument not_used
+)
+{
+ test_main();
+ rtems_test_exit(0);
+}
+
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+
+#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
+#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 6
+
+#define CONFIGURE_MAXIMUM_TASKS 1
+
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+
+#define CONFIGURE_INIT
+
+#include <rtems/confdefs.h>
+
+/* end of file */
diff -u rtems/testsuites/sptests/spfifo02/Makefile.am:1.1 rtems/testsuites/sptests/spfifo02/Makefile.am:1.2
--- rtems/testsuites/sptests/spfifo02/Makefile.am:1.1 Mon Jun 7 14:09:27 2010
+++ rtems/testsuites/sptests/spfifo02/Makefile.am Tue Jun 8 08:59:17 2010
@@ -5,7 +5,7 @@
MANAGERS = all
rtems_tests_PROGRAMS = spfifo02
-spfifo02_SOURCES = main.c test.c
+spfifo02_SOURCES = init.c
dist_rtems_tests_DATA = spfifo02.scn
dist_rtems_tests_DATA += spfifo02.doc
diff -u /dev/null rtems/testsuites/sptests/spfifo02/init.c:1.1
--- /dev/null Tue Jun 8 09:11:22 2010
+++ rtems/testsuites/sptests/spfifo02/init.c Tue Jun 8 08:59:17 2010
@@ -0,0 +1,92 @@
+/*
+ * COPYRIGHT (c) 1989-2010.
+ * On-Line Applications Research Corporation (OAR).
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ *
+ * $Id$
+ */
+
+/* Includes */
+#include <bsp.h>
+#include <tmacros.h>
+
+/* Includes */
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <errno.h>
+
+#include <rtems.h>
+#include <rtems/libio.h>
+
+
+void test_main(void)
+{
+
+ int status = -1;
+ int fd = 0;
+
+ puts("\n\n*** FIFO / PIPE OPEN TEST - 2 ***");
+ puts(
+"\n\nConfiguration: Pipes configured, \
+but number of barriers configured = 0"
+ );
+
+ puts("\n\nCreating directory /tmp");
+ status = mkdir("/tmp", 0777);
+ rtems_test_assert(status == 0);
+
+ puts("\n\nCreating fifo /tmp/fifo");
+ status = mkfifo("/tmp/fifo01", 0777);
+ rtems_test_assert(status == 0);
+
+ puts("\n\nAttempt to open the fifo file\n");
+ puts(
+"Must result in failure since \n\
+number of barriers = 0 => not all resources\n\
+were acquired"
+ );
+
+ fd = open("/tmp/fifo01", O_RDONLY);
+ rtems_test_assert(fd == -1);
+ rtems_test_assert(errno == EINTR); // Should this
+ // be ENOMEM?
+ puts("\n\nRemove the entry /tmp/fifo01");
+ status = unlink("/tmp/fifo01");
+ rtems_test_assert(status == 0);
+
+ puts("\n\nRemove directory /tmp");
+ status = rmdir("/tmp");
+ rtems_test_assert(status == 0);
+
+ puts("\n\n*** END OF FIFO / PIPE OPEN TEST - 2 ***");
+}
+
+rtems_task Init(
+ rtems_task_argument not_used
+)
+{
+ test_main();
+ rtems_test_exit(0);
+}
+
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+
+#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
+#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 6
+
+#define CONFIGURE_MAXIMUM_TASKS 1
+
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+#define CONFIGURE_PIPES_ENABLED
+#define CONFIGURE_INIT
+
+#include <rtems/confdefs.h>
+
+/* end of file */
diff -u rtems/testsuites/sptests/spfifo03/Makefile.am:1.1 rtems/testsuites/sptests/spfifo03/Makefile.am:1.2
--- rtems/testsuites/sptests/spfifo03/Makefile.am:1.1 Mon Jun 7 14:09:27 2010
+++ rtems/testsuites/sptests/spfifo03/Makefile.am Tue Jun 8 08:59:17 2010
@@ -5,7 +5,7 @@
MANAGERS = all
rtems_tests_PROGRAMS = spfifo03
-spfifo03_SOURCES = main.c test.c
+spfifo03_SOURCES = init.c
dist_rtems_tests_DATA = spfifo03.scn
dist_rtems_tests_DATA += spfifo03.doc
diff -u /dev/null rtems/testsuites/sptests/spfifo03/init.c:1.1
--- /dev/null Tue Jun 8 09:11:22 2010
+++ rtems/testsuites/sptests/spfifo03/init.c Tue Jun 8 08:59:17 2010
@@ -0,0 +1,92 @@
+/*
+ * COPYRIGHT (c) 1989-2010.
+ * On-Line Applications Research Corporation (OAR).
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ *
+ * $Id$
+ */
+
+/* Includes */
+#include <bsp.h>
+#include <tmacros.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <errno.h>
+
+#include <rtems.h>
+#include <rtems/libio.h>
+
+
+void test_main(void)
+{
+
+ int status = -1;
+ int fd = 0;
+
+ puts("\n\n*** FIFO / PIPE OPEN TEST - 3 ***");
+ puts(
+"\n\nConfiguration: Pipes configured, \
+but number of barriers configured = 1\n\
+Required number of barriers = 2"
+ );
+
+ puts("\n\nCreating directory /tmp");
+ status = mkdir("/tmp", 0777);
+ rtems_test_assert(status == 0);
+
+ puts("\n\nCreating fifo /tmp/fifo");
+ status = mkfifo("/tmp/fifo01", 0777);
+ rtems_test_assert(status == 0);
+
+ puts("\n\nAttempt to open the fifo file\n");
+ puts(
+"Must result in failure since \n\
+number of barriers = 1 => not all resources\n\
+were acquired"
+ );
+
+ fd = open("/tmp/fifo01", O_RDONLY);
+ rtems_test_assert(fd == -1);
+ rtems_test_assert(errno == EINTR); // Should this
+ // be ENOMEM?
+ puts("\n\nRemove the entry /tmp/fifo01");
+ status = unlink("/tmp/fifo01");
+ rtems_test_assert(status == 0);
+
+ puts("\n\nRemove directory /tmp");
+ status = rmdir("/tmp");
+ rtems_test_assert(status == 0);
+
+ puts("\n\n*** END OF FIFO / PIPE OPEN TEST - 3 ***");
+}
+
+rtems_task Init(
+ rtems_task_argument not_used
+)
+{
+ test_main();
+ rtems_test_exit(0);
+}
+
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+
+#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
+#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 6
+
+#define CONFIGURE_MAXIMUM_TASKS 1
+
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+#define CONFIGURE_PIPES_ENABLED
+#define CONFIGURE_INIT
+#define CONFIGURE_MAXIMUM_BARRIERS 1
+
+#include <rtems/confdefs.h>
+
+/* end of file */
diff -u rtems/testsuites/sptests/spfifo04/Makefile.am:1.1 rtems/testsuites/sptests/spfifo04/Makefile.am:1.2
--- rtems/testsuites/sptests/spfifo04/Makefile.am:1.1 Mon Jun 7 14:09:28 2010
+++ rtems/testsuites/sptests/spfifo04/Makefile.am Tue Jun 8 08:59:17 2010
@@ -5,7 +5,7 @@
MANAGERS = all
rtems_tests_PROGRAMS = spfifo04
-spfifo04_SOURCES = main.c test.c
+spfifo04_SOURCES = init.c
dist_rtems_tests_DATA = spfifo04.scn
dist_rtems_tests_DATA += spfifo04.doc
diff -u /dev/null rtems/testsuites/sptests/spfifo04/init.c:1.1
--- /dev/null Tue Jun 8 09:11:22 2010
+++ rtems/testsuites/sptests/spfifo04/init.c Tue Jun 8 08:59:17 2010
@@ -0,0 +1,133 @@
+/*
+ * COPYRIGHT (c) 1989-2010.
+ * On-Line Applications Research Corporation (OAR).
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ *
+ * $Id$
+ */
+
+/* Includes */
+#include <bsp.h>
+#include <tmacros.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <errno.h>
+
+#include <rtems.h>
+#include <rtems/libio.h>
+
+#define NUM_OPEN_REQ 26
+
+void test_main(void)
+{
+
+ int status = -1;
+ int fd = 0;
+ int index = 0;
+ int num_opens = 0;
+
+ puts("\n\n*** FIFO / PIPE OPEN TEST - 4 ***");
+ puts(
+"\n\nConfiguration: Pipes configured, \
+but number of barriers configured = 2\n"
+ );
+
+ puts("\n\nCreating directory /tmp");
+ status = mkdir("/tmp", 0777);
+ rtems_test_assert(status == 0);
+
+ puts("\n\nCreating fifo /tmp/fifo");
+ status = mkfifo("/tmp/fifo01", 0777);
+ rtems_test_assert(status == 0);
+
+ puts("\n\nAttempt to open the fifo file in RDWR mode\n");
+ puts("Should be successful and non-negative\
+file descriptor expected");
+
+ fd = open("/tmp/fifo01", O_RDWR);
+ rtems_test_assert(fd > 0);
+ ++num_opens;
+
+ puts("\n\nClosing the fifo file");
+ status = close(fd);
+ rtems_test_assert(status == 0);
+
+ puts("\n\nAttempt to open the fifo file in \
+RDONLY and NONBLOCK mode\n");
+ puts("Should be successful and non-negative\
+file descriptor expected");
+
+ fd = open("/tmp/fifo01", O_RDONLY | O_NONBLOCK);
+ rtems_test_assert(fd > 0);
+ ++num_opens;
+
+ puts("\n\nClosing the fifo file");
+ status = close(fd);
+ rtems_test_assert(status == 0);
+
+ puts("\n\nAttempt to open the fifo file in \
+WRONLY and NONBLOCK mode\n");
+ puts("Should return with an error ENXIO");
+
+ fd = open("/tmp/fifo01", O_WRONLY | O_NONBLOCK);
+ rtems_test_assert(fd == -1);
+ rtems_test_assert(errno == ENXIO);
+ ++num_opens;
+
+ // Number of attempts to open fifo till now = 3
+ // Number of attempts to move the static char
+ // from 'a' -> 'z' = 26
+ // => Number of opens required = 23
+ puts("\n\nMultiple opens\n");
+ for(index = 0; index < NUM_OPEN_REQ - num_opens; ++index) {
+
+ fd = open("/tmp/fifo01", O_RDONLY | O_NONBLOCK);
+ rtems_test_assert(fd > 0);
+
+ status = close(fd);
+ rtems_test_assert(status == 0);
+
+ printf("%d... ", index+1);
+ }
+
+ puts("\n\nRemove the entry /tmp/fifo01");
+ status = unlink("/tmp/fifo01");
+ rtems_test_assert(status == 0);
+
+ puts("\n\nRemove directory /tmp");
+ status = rmdir("/tmp");
+ rtems_test_assert(status == 0);
+
+ puts("\n\n*** END OF FIFO / PIPE OPEN TEST - 4 ***");
+}
+
+rtems_task Init(
+ rtems_task_argument not_used
+)
+{
+ test_main();
+ rtems_test_exit(0);
+}
+
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+
+#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
+#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 6
+
+#define CONFIGURE_MAXIMUM_TASKS 1
+
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+#define CONFIGURE_PIPES_ENABLED
+#define CONFIGURE_INIT
+#define CONFIGURE_MAXIMUM_BARRIERS 2
+
+#include <rtems/confdefs.h>
+
+/* end of file */
*sh*:
2010-06-08 Sebastian Huber <Sebastian.Huber at embedded-brains.de>
* psxfile01/test.c: Update for IMFS API changes.
M 1.265 testsuites/psxtests/ChangeLog
M 1.24 testsuites/psxtests/psxfile01/test.c
diff -u rtems/testsuites/psxtests/ChangeLog:1.264 rtems/testsuites/psxtests/ChangeLog:1.265
--- rtems/testsuites/psxtests/ChangeLog:1.264 Tue Jun 1 19:50:37 2010
+++ rtems/testsuites/psxtests/ChangeLog Tue Jun 8 08:12:56 2010
@@ -1,3 +1,7 @@
+2010-06-08 Sebastian Huber <Sebastian.Huber at embedded-brains.de>
+
+ * psxfile01/test.c: Update for IMFS API changes.
+
2010-06-02 Chris Johns <chrisj at rtems.org>
* psxfile01/test.c, psxmount/test.c, psxreaddir/test.c,
diff -u rtems/testsuites/psxtests/psxfile01/test.c:1.23 rtems/testsuites/psxtests/psxfile01/test.c:1.24
--- rtems/testsuites/psxtests/psxfile01/test.c:1.23 Tue Jun 1 19:50:37 2010
+++ rtems/testsuites/psxtests/psxfile01/test.c Tue Jun 8 08:12:56 2010
@@ -127,7 +127,8 @@
mt_entry,
&IMFS_ops_no_evalformake,
&IMFS_memfile_handlers,
- &IMFS_directory_handlers
+ &IMFS_directory_handlers,
+ &IMFS_fifo_handlers
);
}
@@ -140,7 +141,8 @@
mt_entry,
&IMFS_ops_no_rename,
&IMFS_memfile_handlers,
- &IMFS_directory_handlers
+ &IMFS_directory_handlers,
+ &IMFS_fifo_handlers
);
}
*sh*:
2010-06-08 Sebastian Huber <Sebastian.Huber at embedded-brains.de>
* spmkdir/.cvsignore, spmkdir/Makefile.am, spmkdir/init.c,
spmkdir/spmkdir.doc, spmkdir/spmkdir.scn: New files.
M 1.369 testsuites/sptests/ChangeLog
A 1.1 testsuites/sptests/spmkdir/.cvsignore
A 1.1 testsuites/sptests/spmkdir/Makefile.am
A 1.1 testsuites/sptests/spmkdir/init.c
A 1.1 testsuites/sptests/spmkdir/spmkdir.doc
A 1.1 testsuites/sptests/spmkdir/spmkdir.scn
diff -u rtems/testsuites/sptests/ChangeLog:1.368 rtems/testsuites/sptests/ChangeLog:1.369
--- rtems/testsuites/sptests/ChangeLog:1.368 Mon Jun 7 19:31:52 2010
+++ rtems/testsuites/sptests/ChangeLog Tue Jun 8 08:22:58 2010
@@ -1,3 +1,8 @@
+2010-06-08 Sebastian Huber <Sebastian.Huber at embedded-brains.de>
+
+ * spmkdir/.cvsignore, spmkdir/Makefile.am, spmkdir/init.c,
+ spmkdir/spmkdir.doc, spmkdir/spmkdir.scn: New files.
+
2010-06-07 Bharath Suri <bharath.s.jois at gmail.com>
* spfifo01/main.c: New file.
diff -u /dev/null rtems/testsuites/sptests/spmkdir/.cvsignore:1.1
--- /dev/null Tue Jun 8 09:11:23 2010
+++ rtems/testsuites/sptests/spmkdir/.cvsignore Tue Jun 8 08:22:58 2010
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
diff -u /dev/null rtems/testsuites/sptests/spmkdir/Makefile.am:1.1
--- /dev/null Tue Jun 8 09:11:23 2010
+++ rtems/testsuites/sptests/spmkdir/Makefile.am Tue Jun 8 08:22:58 2010
@@ -0,0 +1,28 @@
+##
+## $Id$
+##
+
+MANAGERS = all
+
+rtems_tests_PROGRAMS = spmkdir
+spmkdir_SOURCES = init.c
+
+dist_rtems_tests_DATA = spmkdir.scn
+dist_rtems_tests_DATA += spmkdir.doc
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP at .cfg
+include $(top_srcdir)/../automake/compile.am
+include $(top_srcdir)/../automake/leaf.am
+
+spmkdir_LDADD = $(MANAGERS_NOT_WANTED:%=$(PROJECT_LIB)/no-%.rel)
+
+AM_CPPFLAGS += -I$(top_srcdir)/../support/include
+
+LINK_OBJS = $(spmkdir_OBJECTS) $(spmkdir_LDADD)
+LINK_LIBS = $(spmkdir_LDLIBS)
+
+spmkdir$(EXEEXT): $(spmkdir_OBJECTS) $(spmkdir_DEPENDENCIES)
+ @rm -f spmkdir$(EXEEXT)
+ $(make-exe)
+
+include $(top_srcdir)/../automake/local.am
diff -u /dev/null rtems/testsuites/sptests/spmkdir/init.c:1.1
--- /dev/null Tue Jun 8 09:11:23 2010
+++ rtems/testsuites/sptests/spmkdir/init.c Tue Jun 8 08:22:58 2010
@@ -0,0 +1,96 @@
+/**
+ * @file
+ *
+ * @ingroup tests
+ *
+ * @brief rtems_mkdir() test.
+ */
+
+/*
+ * Copyright (c) 2010
+ * embedded brains GmbH
+ * Obere Lagerstr. 30
+ * D-82178 Puchheim
+ * Germany
+ * <rtems at embedded-brains.de>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ *
+ * $Id$
+ */
+
+#include <sys/stat.h>
+#include <errno.h>
+#include <fcntl.h>
+
+#include <rtems/libio.h>
+
+#include "tmacros.h"
+
+static void test_mkdir(const char *path, mode_t omode, int expected_rv)
+{
+ struct stat st;
+ int rv = 0;
+ mode_t current_umask = umask(0);
+ mode_t dirmode = S_IFDIR | (omode & ~current_umask);
+
+ umask(current_umask);
+
+ rv = rtems_mkdir(path, omode);
+ rtems_test_assert(rv == expected_rv);
+
+ if (rv == 0) {
+ rv = stat(path, &st);
+ rtems_test_assert(rv == 0 && st.st_mode == dirmode);
+ }
+}
+
+static rtems_task Init(rtems_task_argument argument)
+{
+ mode_t omode = S_IRWXU | S_IRWXG | S_IRWXO;
+ int rv = 0;
+
+ puts("\n\n*** TEST SPMKDIR ***");
+
+ test_mkdir("a", omode, 0);
+ test_mkdir("a/b", omode, 0);
+ test_mkdir("a/b/c/d/e/f/g/h/i", omode, 0);
+ test_mkdir("a/b/c", omode, 0);
+ test_mkdir("a/b/c/1", 0, 0);
+ test_mkdir("a/b/c/2", S_IRWXU, 0);
+ test_mkdir("a/b/c/3", S_IRWXG, 0);
+ test_mkdir("a/b/c/4", S_IRWXO, 0);
+ test_mkdir("a/b", omode, 0);
+ test_mkdir("a", omode, 0);
+
+ rv = open ("b", O_CREAT | O_RDONLY, omode);
+ rtems_test_assert(rv >= 0);
+
+ rv = close(rv);
+ rtems_test_assert(rv == 0);
+
+ test_mkdir("b", omode, -1);
+ rtems_test_assert(errno == EEXIST);
+
+ puts("*** END OF TEST SPMKDIR ***");
+
+ exit(0);
+}
+
+#define CONFIGURE_INIT
+
+#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+
+#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
+
+#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 4
+
+#define CONFIGURE_MAXIMUM_TASKS 1
+#define CONFIGURE_MAXIMUM_DRIVERS 1
+
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+
+#include <rtems/confdefs.h>
diff -u /dev/null rtems/testsuites/sptests/spmkdir/spmkdir.doc:1.1
--- /dev/null Tue Jun 8 09:11:23 2010
+++ rtems/testsuites/sptests/spmkdir/spmkdir.doc Tue Jun 8 08:22:58 2010
@@ -0,0 +1,7 @@
+# $Id$
+
+This file describes the directives and concepts tested by this test set.
+
+test set name: spmkdir
+
+directives: rtems_mkdir
diff -u /dev/null rtems/testsuites/sptests/spmkdir/spmkdir.scn:1.1
--- /dev/null Tue Jun 8 09:11:23 2010
+++ rtems/testsuites/sptests/spmkdir/spmkdir.scn Tue Jun 8 08:22:58 2010
@@ -0,0 +1,2 @@
+*** TEST SPMKDIR ***
+*** END OF TEST SPMKDIR ***
*sh*:
2010-06-08 Sebastian Huber <Sebastian.Huber at embedded-brains.de>
* spmkdir/.cvsignore, spmkdir/Makefile.am, spmkdir/init.c,
spmkdir/spmkdir.doc, spmkdir/spmkdir.scn: New files.
* Makefile.am, configure.ac: Reflect changes above.
M 1.370 testsuites/sptests/ChangeLog
M 1.85 testsuites/sptests/Makefile.am
M 1.90 testsuites/sptests/configure.ac
diff -u rtems/testsuites/sptests/ChangeLog:1.369 rtems/testsuites/sptests/ChangeLog:1.370
--- rtems/testsuites/sptests/ChangeLog:1.369 Tue Jun 8 08:22:58 2010
+++ rtems/testsuites/sptests/ChangeLog Tue Jun 8 08:24:10 2010
@@ -2,6 +2,7 @@
* spmkdir/.cvsignore, spmkdir/Makefile.am, spmkdir/init.c,
spmkdir/spmkdir.doc, spmkdir/spmkdir.scn: New files.
+ * Makefile.am, configure.ac: Reflect changes above.
2010-06-07 Bharath Suri <bharath.s.jois at gmail.com>
diff -u rtems/testsuites/sptests/Makefile.am:1.84 rtems/testsuites/sptests/Makefile.am:1.85
--- rtems/testsuites/sptests/Makefile.am:1.84 Mon Jun 7 14:09:27 2010
+++ rtems/testsuites/sptests/Makefile.am Tue Jun 8 08:24:10 2010
@@ -23,7 +23,7 @@
spintrcritical05 spintrcritical06 spintrcritical07 spintrcritical08 \
spintrcritical09 spintrcritical10 spintrcritical11 spintrcritical12 \
spintrcritical13 spintrcritical14 spintrcritical15 spintrcritical16 \
- spintrcritical17
+ spintrcritical17 spmkdir
DIST_SUBDIRS = $(SUBDIRS) spfatal_support spintrcritical_support
EXTRA_DIST = spfatal_support/init.c spfatal_support/system.h
diff -u rtems/testsuites/sptests/configure.ac:1.89 rtems/testsuites/sptests/configure.ac:1.90
--- rtems/testsuites/sptests/configure.ac:1.89 Mon Jun 7 14:09:27 2010
+++ rtems/testsuites/sptests/configure.ac Tue Jun 8 08:24:10 2010
@@ -132,6 +132,7 @@
spintrcritical15/Makefile
spintrcritical16/Makefile
spintrcritical17/Makefile
+spmkdir/Makefile
spnotepad01/Makefile
spobjgetnext/Makefile
spprintk/Makefile
*sh*:
2010-06-08 Sebastian Huber <Sebastian.Huber at embedded-brains.de>
* spfifo01/init.c, spfifo01/spfifo01.scn: Update for IMFS API changes.
M 1.371 testsuites/sptests/ChangeLog
M 1.2 testsuites/sptests/spfifo01/init.c
M 1.2 testsuites/sptests/spfifo01/spfifo01.scn
diff -u rtems/testsuites/sptests/ChangeLog:1.370 rtems/testsuites/sptests/ChangeLog:1.371
--- rtems/testsuites/sptests/ChangeLog:1.370 Tue Jun 8 08:24:10 2010
+++ rtems/testsuites/sptests/ChangeLog Tue Jun 8 09:06:42 2010
@@ -1,5 +1,9 @@
2010-06-08 Sebastian Huber <Sebastian.Huber at embedded-brains.de>
+ * spfifo01/init.c, spfifo01/spfifo01.scn: Update for IMFS API changes.
+
+2010-06-08 Sebastian Huber <Sebastian.Huber at embedded-brains.de>
+
* spmkdir/.cvsignore, spmkdir/Makefile.am, spmkdir/init.c,
spmkdir/spmkdir.doc, spmkdir/spmkdir.scn: New files.
* Makefile.am, configure.ac: Reflect changes above.
diff -u rtems/testsuites/sptests/spfifo01/init.c:1.1 rtems/testsuites/sptests/spfifo01/init.c:1.2
--- rtems/testsuites/sptests/spfifo01/init.c:1.1 Tue Jun 8 08:59:17 2010
+++ rtems/testsuites/sptests/spfifo01/init.c Tue Jun 8 09:06:42 2010
@@ -9,74 +9,40 @@
* $Id$
*/
-/* Includes */
-#include <bsp.h>
-#include <tmacros.h>
-#include <stdio.h>
-#include <sys/types.h>
#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <errno.h>
+#include <stdio.h>
-#include <rtems.h>
-#include <rtems/libio.h>
+#include "tmacros.h"
+#define FIFO_PATH "/fifo01"
-void test_main(void)
+static void test_main(void)
{
-
int status = -1;
- int fd = 0;
puts("\n\n*** FIFO / PIPE OPEN TEST - 1 ***");
- puts(
-"\n\nConfiguration: Pipes not enabled"
- );
-
- puts("\n\nCreating directory /tmp");
- status = mkdir("/tmp", 0777);
- rtems_test_assert(status == 0);
-
- puts("\n\nCreating fifo /tmp/fifo");
- status = mkfifo("/tmp/fifo01", 0777);
- rtems_test_assert(status == 0);
- puts("\n\nAttempt to open the fifo file\n");
puts(
- "Must result in failure since \
-pipes are not enabled in the configuration"
- );
-
- fd = open("/tmp/fifo01", O_RDONLY);
- rtems_test_assert(fd == -1);
- rtems_test_assert(errno == EINTR); // Should this
- // be ENOMEM?
- puts("\n\nRemove the entry /tmp/fifo01");
- status = unlink("/tmp/fifo01");
- rtems_test_assert(status == 0);
-
- puts("\n\nRemove directory /tmp");
- status = rmdir("/tmp");
- rtems_test_assert(status == 0);
+ "Configuration: Pipes disabled.\n"
+ "Creating named fifo '" FIFO_PATH "'.\n"
+ "Must result in failure since pipes are disabled in the configuration."
+ );
+ status = mkfifo(FIFO_PATH, 0777);
+ rtems_test_assert(status == -1);
- puts("\n\n*** END OF FIFO / PIPE OPEN TEST - 1 ***");
+ puts("*** END OF FIFO / PIPE OPEN TEST - 1 ***");
}
-
-rtems_task Init(
- rtems_task_argument not_used
-)
+rtems_task Init(rtems_task_argument not_used)
{
test_main();
rtems_test_exit(0);
}
+#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
-#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 6
#define CONFIGURE_MAXIMUM_TASKS 1
@@ -85,5 +51,3 @@
#define CONFIGURE_INIT
#include <rtems/confdefs.h>
-
-/* end of file */
diff -u rtems/testsuites/sptests/spfifo01/spfifo01.scn:1.1 rtems/testsuites/sptests/spfifo01/spfifo01.scn:1.2
--- rtems/testsuites/sptests/spfifo01/spfifo01.scn:1.1 Mon Jun 7 14:09:27 2010
+++ rtems/testsuites/sptests/spfifo01/spfifo01.scn Tue Jun 8 09:06:42 2010
@@ -1,29 +1,5 @@
-Could not open '/dev/kqemu' - QEMU acceleration layer not activated: No such file or directory
-Initialized console on port COM1 9600-8-N-1
-
-
-
-*** FIFO / PIPE OPEN TEST - 1 ***
-
-
-Configuration: Pipes not enabled
-
-
-Creating directory /tmp
-
-
-Creating fifo /tmp/fifo
-
-
-Attempt to open the fifo file
-
-Must result in failure since pipes are not enabled in the configuration
-
-
-Remove the entry /tmp/fifo01
-
-
-Remove directory /tmp
-
-
-*** END OF FIFO / PIPE OPEN TEST - 1 ***
+*** FIFO / PIPE OPEN TEST - 1 ***
+Configuration: Pipes disabled.
+Creating named fifo '/fifo01'.
+Must result in failure since pipes are disabled in the configuration.
+*** END OF FIFO / PIPE OPEN TEST - 1 ***
--
Generated by Deluxe Loginfo [http://www.codewiz.org/projects/index.html#loginfo] 2.122 by Bernardo Innocenti <bernie at develer.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/vc/attachments/20100608/be371c02/attachment-0001.html>
More information about the vc
mailing list