Changeset 287febb5 in rtems


Ignore:
Timestamp:
Jun 24, 2010, 7:46:40 PM (9 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, master
Children:
2d1994c9
Parents:
eb8c45d
Message:

2010-06-24 Bharath Suri <bharath.s.jois@…>

  • Makefile.am, configure.ac: Removed some fifo tests.
  • spfifo01/Makefile.am, spfifo01/init.c: Minor changes to avoid excessive new lines in the output.

spfifo02/Makefile.am, spfifo02/init.c, spfifo02/spfifo02.doc,
spfifo02/spfifo02.scn, spfifo03/Makefile.am: Merge from spfifo08.
Also added a few more cases, mostly from spfifo04/init.c.

  • spfifo03/init.c, spfifo03/spfifo03.doc, spfifo03/spfifo03.scn: Previously was spfifo06. Configure parameter for pipes is used now.
  • spfifo04/.cvsignore, spfifo04/Makefile.am, spfifo04/init.c, spfifo04/spfifo04.doc, spfifo04/spfifo04.scn, spfifo08/.cvsignore, spfifo08/Makefile.am, spfifo08/init.c, spfifo08/spfifo08.doc, spfifo08/spfifo08.scn: Removed.
Location:
testsuites/sptests
Files:
10 deleted
13 edited

Legend:

Unmodified
Added
Removed
  • testsuites/sptests/ChangeLog

    reb8c45d r287febb5  
     12010-06-24      Bharath Suri <bharath.s.jois@gmail.com>
     2
     3        * Makefile.am, configure.ac: Removed some fifo tests.
     4        * spfifo01/Makefile.am, spfifo01/init.c: Minor changes to avoid
     5        excessive new lines in the output.
     6
     7        spfifo02/Makefile.am, spfifo02/init.c, spfifo02/spfifo02.doc,
     8        spfifo02/spfifo02.scn, spfifo03/Makefile.am: Merge from spfifo08.
     9        Also added a few more cases, mostly from spfifo04/init.c.
     10        * spfifo03/init.c, spfifo03/spfifo03.doc, spfifo03/spfifo03.scn:
     11        Previously was spfifo06. Configure parameter for pipes is used now.
     12        * spfifo04/.cvsignore, spfifo04/Makefile.am, spfifo04/init.c,
     13        spfifo04/spfifo04.doc, spfifo04/spfifo04.scn, spfifo08/.cvsignore,
     14        spfifo08/Makefile.am, spfifo08/init.c, spfifo08/spfifo08.doc,
     15        spfifo08/spfifo08.scn: Removed.
     16
    1172010-06-22      Joel Sherrill <joel.sherrilL@OARcorp.com>
    218
  • testsuites/sptests/Makefile.am

    reb8c45d r287febb5  
    2121    spfatal08 spfatal09 spfatal10 spfatal11 spfatal12 spfatal13 spfatal14 \
    2222    spfatal15 spfatal16 spfatal17 spfatal18 spfatal19 \
    23     spfifo01 spfifo02 spfifo03 spfifo04 spfifo08 \
     23    spfifo01 spfifo02 spfifo03 \
    2424    spintrcritical01 spintrcritical02 spintrcritical03 spintrcritical04 \
    2525    spintrcritical05 spintrcritical06 spintrcritical07 spintrcritical08 \
  • testsuites/sptests/configure.ac

    reb8c45d r287febb5  
    123123spfifo02/Makefile
    124124spfifo03/Makefile
    125 spfifo04/Makefile
    126 spfifo08/Makefile
    127125spintrcritical01/Makefile
    128126spintrcritical02/Makefile
  • testsuites/sptests/spfifo01/Makefile.am

    reb8c45d r287febb5  
    1515include $(top_srcdir)/../automake/leaf.am
    1616
    17 
    1817AM_CPPFLAGS += -I$(top_srcdir)/../support/include
    1918
  • testsuites/sptests/spfifo01/init.c

    reb8c45d r287febb5  
    2424
    2525  puts(
    26     "Configuration: Pipes disabled.\n"
     26    "\nConfiguration: Pipes disabled.\n"
    2727    "Creating named fifo '" FIFO_PATH "'.\n"
    2828    "Must result in failure since pipes are disabled in the configuration."
  • testsuites/sptests/spfifo02/Makefile.am

    reb8c45d r287febb5  
    66
    77rtems_tests_PROGRAMS = spfifo02
    8 spfifo02_SOURCES = init.c
     8spfifo02_SOURCES = init.c ../../support/src/spin.c
    99
    1010dist_rtems_tests_DATA = spfifo02.scn
     
    1515include $(top_srcdir)/../automake/leaf.am
    1616
    17 
    1817AM_CPPFLAGS += -I$(top_srcdir)/../support/include
    1918
     
    2221
    2322spfifo02$(EXEEXT): $(spfifo02_OBJECTS) $(spfifo02_DEPENDENCIES)
    24         @rm -f spfifo02$(EXEEXT)
     23        @rm -f spfifo08$(EXEEXT)
    2524        $(make-exe)
    2625
  • testsuites/sptests/spfifo02/init.c

    reb8c45d r287febb5  
    11/*
    2  *  COPYRIGHT (c) 2010
    3  *  Bharath Suri<bharath.s.jois@gmail.com>.
     2 *  COPYRIGHT (c) 1989-2010.
     3 *  On-Line Applications Research Corporation (OAR).
    44 *
    55 *  The license and distribution terms for this file may be
     
    1010 */
    1111
    12 /* Includes */
    13 #include <bsp.h>
    1412#include <tmacros.h>
    15 
    16 /* Includes */
    17 #include <stdio.h>
     13#include "test_support.h"
     14
    1815#include <sys/types.h>
    1916#include <sys/stat.h>
     
    2118#include <unistd.h>
    2219#include <errno.h>
    23 
    24 #include <rtems.h>
    25 #include <rtems/libio.h>
    26 
    27 
    28 void test_main(void)
    29 {
    30 
    31   int status = -1;
    32   int fd = 0;
    33 
    34   puts("\n\n*** FIFO / PIPE OPEN TEST - 2 ***");
    35   puts(
    36 "\n\nConfiguration: Pipes configured, \
    37 but number of barriers configured = 0"
    38        );
    39 
    40   puts("\n\nCreating directory /tmp");
    41   status = mkdir("/tmp", 0777);
     20#include <rtems/score/heap.h>
     21
     22#define MAXIMUM 10
     23#define NUM_OPEN_REQ 26
     24
     25rtems_id Barriers[MAXIMUM];
     26int BarrierCount;
     27
     28rtems_id Semaphores[MAXIMUM];
     29int SemaphoreCount;
     30
     31extern Heap_Control  *RTEMS_Malloc_Heap;
     32
     33void create_all_barriers(void)
     34{
     35  rtems_status_code status;
     36  int               i;
     37
     38  BarrierCount = 0;
     39
     40  memset( Barriers, 0, sizeof(Barriers) );
     41  for ( i=0 ; i<MAXIMUM ; i++ ) {
     42    status = rtems_barrier_create(
     43      rtems_build_name( 'B', 'A', 'R', 0x30+i ),
     44      RTEMS_BARRIER_MANUAL_RELEASE,
     45      0,
     46      &Barriers[i]
     47    );
     48    if ( status == RTEMS_TOO_MANY ) {
     49      printf( "%d Barriers created\n", BarrierCount+1 );
     50      return;
     51    }
     52
     53    directive_failed( status, "barrier create" );
     54    BarrierCount++;
     55  }
     56}
     57
     58void create_all_semaphores(void)
     59{
     60  rtems_status_code status;
     61  int               i;
     62
     63  SemaphoreCount = 0;
     64
     65  for ( i=0 ; i<MAXIMUM ; i++ ) {
     66    status = rtems_semaphore_create(
     67      rtems_build_name( 'S', 'E', 'M', 0x30+i ),
     68      0,
     69      RTEMS_DEFAULT_ATTRIBUTES,
     70      0,
     71      &Semaphores[i]
     72    );
     73    if ( status == RTEMS_TOO_MANY ) {
     74      printf( "%d Semaphores created\n", SemaphoreCount+1 );
     75      return;
     76    }
     77
     78    directive_failed( status, "semaphore create" );
     79    SemaphoreCount++;
     80  }
     81}
     82
     83void delete_barrier(void)
     84{
     85  rtems_status_code status;
     86 
     87  BarrierCount--;
     88  printf( "Deleting barrier id=0x%08x\n",
     89    (unsigned int)Barriers[BarrierCount] );
     90  status = rtems_barrier_delete( Barriers[BarrierCount] );
     91  directive_failed( status, "barrier delete" );
     92}
     93
     94void delete_semaphore(void)
     95{
     96  rtems_status_code status;
     97 
     98  SemaphoreCount--;
     99  printf( "Deleting semaphore id=0x%08x\n",
     100    (unsigned int) Semaphores[SemaphoreCount] );
     101  status = rtems_semaphore_delete( Semaphores[SemaphoreCount] );
     102  directive_failed( status, "semaphore delete" );
     103}
     104
     105void create_fifo(void)
     106{
     107  int status;
     108
     109  status = mkfifo("/fifo01", 0777);
    42110  rtems_test_assert(status == 0);
    43 
    44   puts("\n\nCreating fifo /tmp/fifo");
    45   status = mkfifo("/tmp/fifo01", 0777);
    46   rtems_test_assert(status == 0);
    47 
    48   puts("\n\nAttempt to open the fifo file\n");
    49   puts(
    50 "Must result in failure since \n\
    51 number of barriers = 0 => not all resources\n\
    52 were acquired"
    53        );
    54 
    55   fd = open("/tmp/fifo01", O_RDONLY);
    56   rtems_test_assert(fd == -1);
    57   rtems_test_assert(errno == EINTR); // Should this
    58                                      // be ENOMEM?
    59   puts("\n\nRemove the entry /tmp/fifo01");
    60   status = unlink("/tmp/fifo01");
    61   rtems_test_assert(status == 0);
    62 
    63   puts("\n\nRemove directory /tmp");
    64   status = rmdir("/tmp");
    65   rtems_test_assert(status == 0);
    66 
    67   puts("\n\n*** END OF FIFO / PIPE OPEN TEST - 2 ***");
    68 }
     111}
     112
     113void open_fifo(int expected, int flags)
     114{
     115  int fd;
     116
     117  fd = open("/fifo01", flags);
     118  printf( "status=%d errno=%d/(%s)\n", fd, errno, strerror(errno) );
     119  if ( expected ) {
     120    rtems_test_assert(fd == -1);
     121    rtems_test_assert(errno == expected);
     122  } else {
     123    rtems_test_assert(fd != -1);
     124    close( fd );
     125  }
     126}
     127
     128rtems_task Init(
     129  rtems_task_argument argument
     130)
     131{
     132  void *alloc_ptr = (void *)0;
     133  int num_opens = 0;
     134  int index = 0;
     135  Heap_Information_block Info;
     136
     137  puts( "\n\n*** TEST FIFO 08 ***" );
     138
     139  puts( "Creating all barriers" );
     140  create_all_barriers();
     141
     142  puts( "Creating all semaphores" );
     143  create_all_semaphores();
     144
     145  puts( "Creating FIFO" );
     146  create_fifo();
    69147 
    70 rtems_task Init(
    71   rtems_task_argument not_used
    72 )
    73 {
    74   test_main();
     148  puts( "Opening FIFO.. expect ENFILE (semaphore @ open could not be created)" );
     149  open_fifo(ENFILE, O_RDWR);
     150
     151  delete_semaphore();
     152  puts( "Opening FIFO.. expect ENOMEM (semaphore for pipe could not be created)" );
     153  open_fifo(ENOMEM, O_RDWR);
     154
     155  delete_semaphore();
     156
     157  _Heap_Get_information(RTEMS_Malloc_Heap, &Info);
     158  alloc_ptr = malloc(Info.Free.largest-4);
     159  puts("Opening FIFO.. expect ENOMEM since no memory is available");
     160  open_fifo(ENOMEM, O_RDWR);
     161
     162  free(alloc_ptr);
     163  puts( "Opening FIFO.. expect ENOMEM (barrier-1 for pipe could not be created)" );
     164  open_fifo(ENOMEM, O_RDWR);
     165
     166  delete_barrier();
     167  puts( "Opening FIFO.. expect ENOMEM (barrier-2 for pipe could not be created" );
     168  open_fifo(ENOMEM, O_RDWR);
     169
     170  delete_barrier();
     171  puts( "Opening FIFO.. expect ENOMEM (semaphore-1 for pipe could not be created" );
     172  open_fifo(ENOMEM, O_RDWR);
     173
     174  delete_semaphore();
     175  puts( "Opening FIFO in RDWR mode. Expect OK" );
     176  open_fifo(0, O_RDWR);
     177  ++num_opens;
     178
     179  puts( "Opening FIFO in non blocking RDONLY mode. Expect OK");
     180  open_fifo(0, O_RDONLY | O_NONBLOCK);
     181  ++num_opens;
     182
     183  puts( "Opening FIFO in non blocking WRONLY mode. Expect ENXIO");
     184  open_fifo(ENXIO, O_WRONLY | O_NONBLOCK);
     185  ++num_opens;
     186
     187  puts("\nMultiple opens\n");
     188  for(index = 0; index < NUM_OPEN_REQ - num_opens; ++index) {
     189
     190    open_fifo(0, O_RDONLY | O_NONBLOCK);
     191    printf("%d... ", index+1);
     192  }
     193
     194  puts( "*** END OF TEST FIFO 08 ***" );
     195
    75196  rtems_test_exit(0);
    76197}
     198
     199/* configuration information */
    77200
    78201#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
    79202#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
    80203
     204#define CONFIGURE_MAXIMUM_TASKS             1
     205#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
     206
    81207#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
    82 #define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 6
    83 
    84 #define CONFIGURE_PIPES_ENABLED
    85 #define CONFIGURE_MAXIMUM_PIPES 1
    86 #define CONFIGURE_MAXIMUM_TASKS 1
    87 
    88 #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
     208#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 5
     209#define CONFIGURE_FIFOS_ENABLED
     210#define CONFIGURE_MAXIMUM_FIFOS 1
     211
    89212#define CONFIGURE_INIT
    90213
    91214#include <rtems/confdefs.h>
    92 
    93215/* end of file */
  • testsuites/sptests/spfifo02/spfifo02.scn

    reb8c45d r287febb5  
    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 
    7 *** FIFO / PIPE OPEN TEST - 2 ***
    8 
    9 
    10 Configuration: Pipes configured, but number of barriers configured = 0
    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
    22 number of barriers = 0 => not all resources
    23 were acquired
    24 
    25 
    26 Remove the entry /tmp/fifo01
    27 
    28 
    29 Remove directory /tmp
    30 
    31 
    32 *** END OF FIFO / PIPE OPEN TEST - 2 ***
     1XXX fill in with test output
  • testsuites/sptests/spfifo03/Makefile.am

    reb8c45d r287febb5  
    1515include $(top_srcdir)/../automake/leaf.am
    1616
    17 
    1817AM_CPPFLAGS += -I$(top_srcdir)/../support/include
    1918
  • testsuites/sptests/spfifo03/init.c

    reb8c45d r287febb5  
    1 /*
    2  *  COPYRIGHT (c) 2010
    3  *  Bharath Suri<bharath.s.jois@gmail.com>.
     1/*  Init
     2 *
     3 *  This routine is the initialization task for this test program.
     4 *  It is a user initialization task and has the responsibility
     5 *  of invoking the test routine
     6 *
     7 *  Input parameters:
     8 *    not_used
     9 *
     10 *  Output parameters:  NONE
     11 *
     12 *  COPYRIGHT (c) 1989-1999.
     13 *  On-Line Applications Research Corporation (OAR).
    414 *
    515 *  The license and distribution terms for this file may be
     
    2333#include <rtems/libio.h>
    2434
    25 
    26 void test_main(void)
     35#define SEND_RCV_BUFSIZ 12
     36rtems_id Barrier;
     37
     38rtems_task read_task(rtems_task_argument not_used)
    2739{
    28 
     40  int fd = 0;
     41  int status = -1;
     42
     43  char recvBuf_r1[SEND_RCV_BUFSIZ] = {0};
     44  char recvBuf_r2[SEND_RCV_BUFSIZ] = {0};
     45
     46  puts("\nRead task activated, waiting till writer opens");
     47
     48  status = rtems_barrier_wait( Barrier, RTEMS_NO_TIMEOUT );
     49  rtems_test_assert( status == RTEMS_SUCCESSFUL );
     50
     51  sleep(1);
     52
     53  puts("\nNow, reader opening file(1)"); 
     54  fd = open("/tmp/fifo01", O_RDONLY);
     55  if(fd <= 0) {
     56    printf("Error opening file: (%d) :: %s", errno, strerror(errno));
     57    rtems_test_assert(0);
     58  }
     59
     60  status = read(fd, recvBuf_r1, sizeof(recvBuf_r1)-1);
     61  rtems_test_assert(status == sizeof(recvBuf_r1)-1);
     62
     63  printf("\n@ receiver (being a unblocked reader): Got %s", recvBuf_r1);
     64
     65  status = close(fd);
     66  rtems_test_assert(status == 0);
     67
     68  status = rtems_barrier_wait( Barrier, RTEMS_NO_TIMEOUT );
     69  rtems_test_assert( status == RTEMS_SUCCESSFUL );
     70 
     71  puts("\nReader opening file(2)");
     72  fd = open("/tmp/fifo01", O_RDONLY);
     73  if(fd <= 0) {
     74    printf("Error opening file: (%d) :: %s", errno, strerror(errno));
     75    rtems_test_assert(0);
     76  }
     77
     78  status = read(fd, recvBuf_r2, sizeof(recvBuf_r2)-1);
     79  rtems_test_assert(status == sizeof(recvBuf_r2)-1);
     80
     81  printf("\n@ receiver (being a blocked reader): Got %s", recvBuf_r2);
     82
     83  status = close(fd);
     84  rtems_test_assert(status == 0);
     85 
     86 
     87  puts("\nReader done!");
     88  status = rtems_barrier_wait( Barrier, RTEMS_NO_TIMEOUT );
     89  rtems_test_assert( status == RTEMS_SUCCESSFUL );
     90  rtems_task_delete( RTEMS_SELF );
     91}
     92
     93
     94void test_main(void) //Also acts as the write task
     95{
     96
     97  rtems_id readTaskID;
     98
     99  rtems_name readTaskName;
     100
     101  char sendBuf_r1[SEND_RCV_BUFSIZ] = {0};
     102  char sendBuf_r2[SEND_RCV_BUFSIZ] = {0};
    29103  int status = -1;
    30104  int fd = 0;
    31105
    32   puts("\n\n*** FIFO / PIPE OPEN TEST - 3 ***");
    33   puts(
    34 "\n\nConfiguration: Pipes configured, \
    35 but number of barriers configured = 1\n\
    36 Required number of barriers = 2"
    37        );
    38 
    39   puts("\n\nCreating directory /tmp");
     106
     107  strcpy( sendBuf_r1, "SendBuffer1" );
     108  strcpy( sendBuf_r2, "SendBuffer2" );
     109
     110  memset( &Barrier, 0, sizeof(Barrier) );
     111  status = rtems_barrier_create (
     112    rtems_build_name ( 'B', 'A', 'R', 't' ),
     113    RTEMS_BARRIER_AUTOMATIC_RELEASE,
     114    2,
     115    &Barrier
     116    );
     117
     118  rtems_test_assert( status == RTEMS_SUCCESSFUL );
     119
     120  puts("\n\n*** FIFO / PIPE OPEN TEST - 6 ***");
     121
     122  puts("\nCreating a task name and a task");
     123  readTaskName = rtems_build_name('T','A','r',' ');
     124
     125  status = rtems_task_create(
     126                             readTaskName,
     127                             1,
     128                             RTEMS_MINIMUM_STACK_SIZE * 2,
     129                             RTEMS_INTERRUPT_LEVEL(31),
     130                             RTEMS_DEFAULT_ATTRIBUTES,
     131                             &readTaskID
     132                             );
     133 
     134  rtems_test_assert( status == RTEMS_SUCCESSFUL );
     135
     136  puts("\ncreating directory /tmp");
    40137  status = mkdir("/tmp", 0777);
    41138  rtems_test_assert(status == 0);
    42139
    43   puts("\n\nCreating fifo /tmp/fifo");
     140  puts("\ncreating fifo file /tmp/fifo01");
    44141  status = mkfifo("/tmp/fifo01", 0777);
    45142  rtems_test_assert(status == 0);
    46143
    47   puts("\n\nAttempt to open the fifo file\n");
    48   puts(
    49 "Must result in failure since \n\
    50 number of barriers = 1 => not all resources\n\
    51 were acquired"
    52        );
    53 
    54   fd = open("/tmp/fifo01", O_RDONLY);
    55   rtems_test_assert(fd == -1);
    56   rtems_test_assert(errno == EINTR); // Should this
    57                                      // be ENOMEM?
    58   puts("\n\nRemove the entry /tmp/fifo01");
     144  puts("\nStarting the read task");
     145  status = rtems_task_start(readTaskID, read_task, 0);
     146  rtems_test_assert(status == 0);
     147
     148  status = rtems_barrier_wait( Barrier, RTEMS_NO_TIMEOUT );
     149  rtems_test_assert( status == RTEMS_SUCCESSFUL );
     150
     151  puts("\nWriter opening file(1)");
     152  fd = open("/tmp/fifo01", O_WRONLY);
     153  if(fd <= 0) {
     154    printf("Error opening file: (%d) :: %s", errno, strerror(errno));
     155    rtems_test_assert(0);
     156  }
     157
     158 
     159  printf("\n@ sender: %s", sendBuf_r1);
     160  status = write(fd, sendBuf_r1, sizeof(sendBuf_r1)-1);
     161  rtems_test_assert(status == sizeof(sendBuf_r1)-1);
     162
     163  status = close(fd);
     164  rtems_test_assert(status == 0);
     165 
     166  status = rtems_barrier_wait( Barrier, RTEMS_NO_TIMEOUT );
     167  rtems_test_assert( status == RTEMS_SUCCESSFUL );
     168
     169  sleep(1);
     170
     171  // Reader would have blocked by now
     172  puts("\nWriter opening file(2)");
     173  fd = open("/tmp/fifo01", O_WRONLY);
     174  if(fd <= 0) {
     175    printf("Error opening file: (%d) :: %s", errno, strerror(errno));
     176    rtems_test_assert(0);
     177  }
     178
     179  printf("\n@ sender: %s", sendBuf_r2);
     180  status = write(fd, sendBuf_r2, sizeof(sendBuf_r2)-1);
     181  rtems_test_assert(status == sizeof(sendBuf_r2)-1);
     182
     183  status = close(fd);
     184  rtems_test_assert(status == 0);
     185
     186  status = rtems_barrier_wait( Barrier, RTEMS_NO_TIMEOUT );
     187  rtems_test_assert( status == RTEMS_SUCCESSFUL );
     188
     189  puts( "Removing the fifo" );
    59190  status = unlink("/tmp/fifo01");
    60191  rtems_test_assert(status == 0);
    61 
    62   puts("\n\nRemove directory /tmp");
     192 
     193  puts( "Removing /tmp" );
    63194  status = rmdir("/tmp");
    64195  rtems_test_assert(status == 0);
    65 
    66   puts("\n\n*** END OF FIFO / PIPE OPEN TEST - 3 ***");
     196 
     197  puts("\n*** END OF FIFO / PIPE OPEN TEST - 6 ***");
    67198}
    68199
     
    81212#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 6
    82213
    83 #define CONFIGURE_MAXIMUM_TASKS 1
     214#define CONFIGURE_MAXIMUM_TASKS 3
    84215
    85216#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
    86 #define CONFIGURE_PIPES_ENABLED
    87 #define CONFIGURE_MAXIMUM_PIPES 1
     217
     218#define CONFIGURE_MAXIMUM_BARRIERS 1
     219
    88220#define CONFIGURE_INIT
    89 
     221#define CONFIGURE_FIFOS_ENABLED
     222#define CONFIGURE_MAXIMUM_FIFOS 1
     223
     224
     225#define CONFIGURE_INIT
    90226#include <rtems/confdefs.h>
    91227
  • testsuites/sptests/spfifo03/spfifo03.scn

    reb8c45d r287febb5  
    1 Could not open '/dev/kqemu' - QEMU acceleration layer not activated: No such file or directory
    21Initialized console on port COM1 9600-8-N-1
    32
     
    54
    65
    7 *** FIFO / PIPE OPEN TEST - 3 ***
     6*** FIFO / PIPE OPEN TEST - 6 ***
    87
    98
    10 Configuration: Pipes configured, but number of barriers configured = 1
    11 Required number of barriers = 2
     9Creating a task name and a task
    1210
    1311
    14 Creating directory /tmp
     12creating directory /tmp
    1513
    1614
    17 Creating fifo /tmp/fifo
     15creating fifo file /tmp/fifo01
    1816
    1917
    20 Attempt to open the fifo file
    21 
    22 Must result in failure since
    23 number of barriers = 1 => not all resources
    24 were acquired
     18Starting the read task
    2519
    2620
    27 Remove the entry /tmp/fifo01
     21Writer opening file(1)
    2822
    2923
    30 Remove directory /tmp
     24Read task activated, sleeping to block the writer
    3125
    3226
    33 *** END OF FIFO / PIPE OPEN TEST - 3 ***
     27Now, reader opening file(1)
     28
     29
     30@ sender:
     31
     32@ receiver (being a unblocked reader): Got
     33
     34Reader opening file(2)
     35
     36
     37Writer opening file(2)
     38
     39
     40@ sender: SendBuffer2
     41
     42*** END OF FIFO / PIPE OPEN TEST - 6 ***
Note: See TracChangeset for help on using the changeset viewer.