forked from Imagelibrary/rtems
spfifo02: Clean up output
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2012.
|
||||
* COPYRIGHT (c) 1989-2014.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -124,7 +124,7 @@ void open_fifo(int expected, int flags)
|
||||
int fd;
|
||||
|
||||
fd = open("/fifo01", flags);
|
||||
printf( "status=%d errno=%d/(%s)\n", fd, errno, strerror(errno) );
|
||||
printf( "expect status=%d errno=%d/(%s)\n", fd, errno, strerror(errno) );
|
||||
if ( expected ) {
|
||||
rtems_test_assert(fd == -1);
|
||||
rtems_test_assert(errno == expected);
|
||||
@@ -142,7 +142,7 @@ rtems_task Init(
|
||||
int num_opens = 0;
|
||||
int index = 0;
|
||||
|
||||
puts( "\n\n*** TEST FIFO 08 ***" );
|
||||
puts( "\n\n*** TEST FIFO 02 ***" );
|
||||
|
||||
puts( "Creating all barriers" );
|
||||
create_all_barriers();
|
||||
@@ -188,11 +188,13 @@ rtems_task Init(
|
||||
++num_opens;
|
||||
|
||||
puts("\nMultiple opens\n");
|
||||
for(index = 0; index < NUM_OPEN_REQ - num_opens; ++index) {
|
||||
index = 0;
|
||||
do {
|
||||
|
||||
open_fifo(0, O_RDONLY | O_NONBLOCK);
|
||||
printf("%d... ", index+1);
|
||||
}
|
||||
open_fifo(0, O_RDONLY | O_NONBLOCK);
|
||||
++index;
|
||||
} while ( index < NUM_OPEN_REQ - num_opens );
|
||||
|
||||
puts( "*** END OF TEST FIFO 08 ***" );
|
||||
|
||||
|
||||
@@ -1 +1,53 @@
|
||||
XXX fill in with test output
|
||||
*** TEST FIFO 02 ***
|
||||
Creating all barriers
|
||||
3 Barriers created
|
||||
Creating all semaphores
|
||||
4 Semaphores created
|
||||
Creating FIFO
|
||||
Opening FIFO.. expect ENOMEM (semaphore for pipe could not be created)
|
||||
expect status=-1 errno=12/(Not enough space)
|
||||
Deleting semaphore id=0x1a010008
|
||||
Opening FIFO.. expect ENOMEM since no memory is available
|
||||
expect status=-1 errno=12/(Not enough space)
|
||||
Opening FIFO.. expect ENOMEM (barrier-1 for pipe could not be created)
|
||||
expect status=-1 errno=12/(Not enough space)
|
||||
Deleting barrier id=0x52010002
|
||||
Opening FIFO.. expect ENOMEM (barrier-2 for pipe could not be created
|
||||
expect status=-1 errno=12/(Not enough space)
|
||||
Deleting barrier id=0x52010001
|
||||
Opening FIFO.. expect ENOMEM (semaphore-1 for pipe could not be created
|
||||
expect status=-1 errno=12/(Not enough space)
|
||||
Deleting semaphore id=0x1a010007
|
||||
Opening FIFO in RDWR mode. Expect OK
|
||||
expect status=3 errno=12/(Not enough space)
|
||||
Opening FIFO in non blocking RDONLY mode. Expect OK
|
||||
expect status=3 errno=12/(Not enough space)
|
||||
Opening FIFO in non blocking WRONLY mode. Expect ENXIO
|
||||
expect status=-1 errno=6/(No such device or address)
|
||||
|
||||
Multiple opens
|
||||
|
||||
1... expect status=3 errno=6/(No such device or address)
|
||||
2... expect status=3 errno=6/(No such device or address)
|
||||
3... expect status=3 errno=6/(No such device or address)
|
||||
4... expect status=3 errno=6/(No such device or address)
|
||||
5... expect status=3 errno=6/(No such device or address)
|
||||
6... expect status=3 errno=6/(No such device or address)
|
||||
7... expect status=3 errno=6/(No such device or address)
|
||||
8... expect status=3 errno=6/(No such device or address)
|
||||
9... expect status=3 errno=6/(No such device or address)
|
||||
10... expect status=3 errno=6/(No such device or address)
|
||||
11... expect status=3 errno=6/(No such device or address)
|
||||
12... expect status=3 errno=6/(No such device or address)
|
||||
13... expect status=3 errno=6/(No such device or address)
|
||||
14... expect status=3 errno=6/(No such device or address)
|
||||
15... expect status=3 errno=6/(No such device or address)
|
||||
16... expect status=3 errno=6/(No such device or address)
|
||||
17... expect status=3 errno=6/(No such device or address)
|
||||
18... expect status=3 errno=6/(No such device or address)
|
||||
19... expect status=3 errno=6/(No such device or address)
|
||||
20... expect status=3 errno=6/(No such device or address)
|
||||
21... expect status=3 errno=6/(No such device or address)
|
||||
22... expect status=3 errno=6/(No such device or address)
|
||||
23... expect status=3 errno=6/(No such device or address)
|
||||
*** END OF TEST FIFO 08 ***
|
||||
|
||||
Reference in New Issue
Block a user