2011-07-22 Joel Sherrill <joel.sherrill@oarcorp.com>

PR 1839/filesystem
	* psxfchx01/init.c, psxfchx01/psxfchx01.scn, psxfile01/psxfile01.scn,
	psxfile01/test.c: Update test to reflect new status codes.
This commit is contained in:
Joel Sherrill
2011-07-22 20:23:21 +00:00
parent 98f64b0f5d
commit 50e4a1b16e
5 changed files with 25 additions and 19 deletions

View File

@@ -1,3 +1,9 @@
2011-07-22 Joel Sherrill <joel.sherrill@oarcorp.com>
PR 1839/filesystem
* psxfchx01/init.c, psxfchx01/psxfchx01.scn, psxfile01/psxfile01.scn,
psxfile01/test.c: Update test to reflect new status codes.
2011-07-21 Ralf Corsépius <ralf.corsepius@rtems.org>
* psxhdrs/Makefile.am: Remove -Wno-unused-but-set-variable

View File

@@ -50,10 +50,10 @@ rtems_task Init(
fd = open( "/newfile", O_WRONLY | O_CREAT, S_IWUSR );
rtems_test_assert( fd != -1 );
puts( "Init - fchdir on the file descriptor - expect EINVAL" );
puts( "Init - fchdir on the file descriptor - expect ENOTDIR" );
status = fchdir( fd );
rtems_test_assert( status == -1 );
rtems_test_assert( errno == EINVAL );
rtems_test_assert( errno == ENOTDIR );
puts( "Init - closing /newfile -- OK" );
status = close( fd );

View File

@@ -3,7 +3,7 @@ Init - fchdir tests
Init - Attempt fchdir with bad file descriptor - expect EBADF
Init - Attempt fchdir with bad file descriptor - expect EBADF
Init - opening /newfile in write-mode -- OK
Init - fchdir on the file descriptor - expect EINVAL
Init - fchdir on the file descriptor - expect ENOTDIR
Init - closing /newfile -- OK
Init - removing /newfile -- OK
Init - opening /newfile in read-mode -- OK

View File

@@ -14,7 +14,7 @@ stat of /dev/console
....atime = Fri Jan 1 00:00:00 1988
....mtime = Fri Jan 1 00:00:00 1988
....ctime = Fri Jan 1 00:00:00 1988
....st_blksize 0
....st_blksize 80
....st_blocks 0
mkdir /dev/tty
@@ -55,10 +55,10 @@ Unlink /tmp/bha using the reentrant version -- OK
mknod with bad type - expect EINVAL
open /tmp/bha in write only mode -- OK
attempt fcntl on opened file -- OK
attempt to read from /tmp/bha - expect EINVAL
attempt to read from /tmp/bha - expect EBADF
closing and unlinking /tmp/bha
open /tmp/bha in read only mode -- OK
attempt to read from /tmp/bha - expect EINVAL
attempt to read from /tmp/bha - expect EBADF
closing and unlinking /tmp/bha
attempt to read from an unopened filedes - expect EBADF
attempt to write to an unopened filedes - expect EBADF
@@ -93,7 +93,7 @@ stat( /tmp/joel ) returned
....atime = Sat Dec 31 09:00:00 1988
....mtime = Sat Dec 31 09:00:00 1988
....ctime = Sat Dec 31 09:00:00 1988
....st_blksize 0
....st_blksize 80
....st_blocks 0
unlink /tmp/joel
unlink /tmp/joel
@@ -126,7 +126,7 @@ stat( /tmp/joel ) returned
....atime = Sat Dec 31 09:00:00 1988
....mtime = Sat Dec 31 09:00:00 1988
....ctime = Sat Dec 31 09:00:00 1988
....st_blksize 0
....st_blksize 80
....st_blocks 0
stat of /tmp/j
stat(/tmp/j) returned -1 (errno=2)
@@ -139,7 +139,7 @@ stat(/tmp/j) returned -1 (errno=2)
....atime = Fri Jan 1 00:00:00 1988
....mtime = Fri Jan 1 00:00:00 1988
....ctime = Fri Jan 1 00:00:00 1988
....st_blksize 0
....st_blksize 80
....st_blocks 0
fopen of /tmp/j
fprintf to /tmp/j
@@ -157,7 +157,7 @@ fprintf to /tmp/j
....atime = Sat Dec 31 09:00:00 1988
....mtime = Sat Dec 31 09:00:00 1988
....ctime = Sat Dec 31 09:00:00 1988
....st_blksize 0
....st_blksize 80
....st_blocks 0
This is call 1 to fprintf
This is call 2 to fprintf
@@ -173,14 +173,14 @@ This is call 5 to fprintf
....atime = Sat Dec 31 09:00:01 1988
....mtime = Sat Dec 31 09:00:00 1988
....ctime = Sat Dec 31 09:00:00 1988
....st_blksize 0
....st_blksize 80
....st_blocks 0
*************** Dump of Entire IMFS ***************
/
....dev/
........console (device 0, 0)
........tty/
............S3 (device 128, 255)
............S3 (device 255, 128)
........test_console (device 0, 0)
....etc/
........passwd (file 0)
@@ -203,14 +203,14 @@ truncate /tmp/j to length of 40
....atime = Sat Dec 31 09:00:02 1988
....mtime = Sat Dec 31 09:00:00 1988
....ctime = Sat Dec 31 09:00:00 1988
....st_blksize 0
....st_blksize 80
....st_blocks 0
*************** Dump of Entire IMFS ***************
/
....dev/
........console (device 0, 0)
........tty/
............S3 (device 128, 255)
............S3 (device 255, 128)
........test_console (device 0, 0)
....etc/
........passwd (file 0)
@@ -231,7 +231,7 @@ truncate /tmp to length of 0 should fail with EISDIR
....dev/
........console (device 0, 0)
........tty/
............S3 (device 128, 255)
............S3 (device 255, 128)
........test_console (device 0, 0)
....etc/
........passwd (file 0)

View File

@@ -384,10 +384,10 @@ int main(
status = fcntl( fd, F_SETFD, 0 );
rtems_test_assert( status == 0 );
puts( "attempt to read from /tmp/bha - expect EINVAL" );
puts( "attempt to read from /tmp/bha - expect EBADF" );
status = read( fd, buffer, 10 );
rtems_test_assert( status == -1 );
rtems_test_assert( errno == EINVAL );
rtems_test_assert( errno == EBADF );
puts( "closing and unlinking /tmp/bha" );
status = close( fd );
@@ -398,10 +398,10 @@ int main(
fd = open( "/tmp/bha", O_CREAT | O_RDONLY, S_IRWXU|S_IRWXG|S_IRWXO );
rtems_test_assert( fd != -1 );
puts( "attempt to read from /tmp/bha - expect EINVAL" );
puts( "attempt to read from /tmp/bha - expect EBADF" );
status = write( fd, buffer, 10 );
rtems_test_assert( status == -1 );
rtems_test_assert( errno == EINVAL );
rtems_test_assert( errno == EBADF );
puts( "closing and unlinking /tmp/bha" );
status = close( fd );