Changeset dd4df85 in rtems


Ignore:
Timestamp:
Jun 8, 2010, 2:06:42 PM (9 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
13dc9c6
Parents:
f94344f
Message:

2010-06-08 Sebastian Huber <Sebastian.Huber@…>

  • spfifo01/init.c, spfifo01/spfifo01.scn: Update for IMFS API changes.
Location:
testsuites/sptests
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • testsuites/sptests/ChangeLog

    rf94344f rdd4df85  
     12010-06-08      Sebastian Huber <Sebastian.Huber@embedded-brains.de>
     2
     3        * spfifo01/init.c, spfifo01/spfifo01.scn: Update for IMFS API changes.
     4
    152010-06-08      Sebastian Huber <Sebastian.Huber@embedded-brains.de>
    26
  • testsuites/sptests/spfifo01/init.c

    rf94344f rdd4df85  
    1010 */
    1111
    12 /* Includes */
    13 #include <bsp.h>
    14 #include <tmacros.h>
     12#include <sys/stat.h>
    1513#include <stdio.h>
    16 #include <sys/types.h>
    17 #include <sys/stat.h>
    18 #include <fcntl.h>
    19 #include <unistd.h>
    20 #include <errno.h>
    2114
    22 #include <rtems.h>
    23 #include <rtems/libio.h>
     15#include "tmacros.h"
    2416
     17#define FIFO_PATH "/fifo01"
    2518
    26 void test_main(void)
     19static void test_main(void)
    2720{
    28 
    2921  int status = -1;
    30   int fd = 0;
    3122
    3223  puts("\n\n*** FIFO / PIPE OPEN TEST - 1 ***");
     24
    3325  puts(
    34 "\n\nConfiguration: Pipes not enabled"
    35        );
     26    "Configuration: Pipes disabled.\n"
     27    "Creating named fifo '" FIFO_PATH "'.\n"
     28    "Must result in failure since pipes are disabled in the configuration."
     29  );
     30  status = mkfifo(FIFO_PATH, 0777);
     31  rtems_test_assert(status == -1);
    3632
    37   puts("\n\nCreating directory /tmp");
    38   status = mkdir("/tmp", 0777);
    39   rtems_test_assert(status == 0);
     33  puts("*** END OF FIFO / PIPE OPEN TEST - 1 ***");
     34}
    4035
    41   puts("\n\nCreating fifo /tmp/fifo");
    42   status = mkfifo("/tmp/fifo01", 0777);
    43   rtems_test_assert(status == 0);
    44 
    45   puts("\n\nAttempt to open the fifo file\n");
    46   puts(
    47        "Must result in failure since \
    48 pipes are not enabled in the configuration"
    49        );
    50 
    51   fd = open("/tmp/fifo01", O_RDONLY);
    52   rtems_test_assert(fd == -1);
    53   rtems_test_assert(errno == EINTR); // Should this
    54                                      // be ENOMEM?
    55   puts("\n\nRemove the entry /tmp/fifo01");
    56   status = unlink("/tmp/fifo01");
    57   rtems_test_assert(status == 0);
    58 
    59   puts("\n\nRemove directory /tmp");
    60   status = rmdir("/tmp");
    61   rtems_test_assert(status == 0);
    62 
    63   puts("\n\n*** END OF FIFO / PIPE OPEN TEST - 1 ***");
    64 }
    65  
    66 
    67 rtems_task Init(
    68   rtems_task_argument not_used
    69 )
     36rtems_task Init(rtems_task_argument not_used)
    7037{
    7138  test_main();
     
    7340}
    7441
     42#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
    7543#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
    76 #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
    7744
    7845#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
    79 #define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 6
    8046
    8147#define CONFIGURE_MAXIMUM_TASKS 1
     
    8652
    8753#include <rtems/confdefs.h>
    88 
    89 /* end of file */
  • testsuites/sptests/spfifo01/spfifo01.scn

    rf94344f rdd4df85  
    1 Could not open '/dev/kqemu' - QEMU acceleration layer not activated: No such file or directory
    2 Initialized console on port COM1 9600-8-N-1
    3 
    4 
    5 
    6 
    71*** FIFO / PIPE OPEN TEST - 1 ***
    8 
    9 
    10 Configuration: Pipes not enabled
    11 
    12 
    13 Creating directory /tmp
    14 
    15 
    16 Creating fifo /tmp/fifo
    17 
    18 
    19 Attempt to open the fifo file
    20 
    21 Must result in failure since pipes are not enabled in the configuration
    22 
    23 
    24 Remove the entry /tmp/fifo01
    25 
    26 
    27 Remove directory /tmp
    28 
    29 
     2Configuration: Pipes disabled.
     3Creating named fifo '/fifo01'.
     4Must result in failure since pipes are disabled in the configuration.
    305*** END OF FIFO / PIPE OPEN TEST - 1 ***
Note: See TracChangeset for help on using the changeset viewer.