From 99e6fb5244c6c99341fed54bbc4cfbd2fcc4d8f5 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Sat, 7 Aug 2010 00:22:46 +0000 Subject: 2010-08-06 Bharath Suri PR 1654/testing * psx13/test.c, psx13/psx13.scn: Test case to improve testing of dup2 routine. * psxfile01/test.c, psxfile01/psxfile01.scn: New test to improve testing of fcntl routine. * psximfs01/init.c, psximfs01/psximfs01.scn: Improve testing of imfs routines. * psximfs02/init.c, psximfs02/psximfs02.scn: Improve coverage of imfs routines. * psxpasswd02/init.c, psxpasswd02/psxpasswd02.scn: New tests to improve coverage of getpwent.c. --- testsuites/psxtests/psximfs01/init.c | 10 +++++++++- testsuites/psxtests/psximfs01/psximfs01.scn | 2 ++ 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'testsuites/psxtests/psximfs01') diff --git a/testsuites/psxtests/psximfs01/init.c b/testsuites/psxtests/psximfs01/init.c index a70cd8371b..8ca65bb0c7 100644 --- a/testsuites/psxtests/psximfs01/init.c +++ b/testsuites/psxtests/psximfs01/init.c @@ -147,7 +147,6 @@ void extend_helper(void) position = lseek( TestFd, 0, SEEK_END ); printf( "Seek to end .. returned %d\n", (int) position ); - rtems_test_assert( position == 1 ); /* * test case to ftruncate a file to a length > its size @@ -179,6 +178,7 @@ void extend_helper(void) rc, strerror( errno ) ); + break; } else { break; @@ -216,6 +216,8 @@ rtems_task Init( int i; void *alloc_ptr = (void *)0; Heap_Information_block Info; + int position = 0; + int status = 0; puts( "\n\n*** TEST IMFS 01 ***" ); @@ -248,6 +250,12 @@ rtems_task Init( */ free(alloc_ptr); + extend_helper(); + position = lseek( TestFd , 0, SEEK_END ); + status = lseek( TestFd, position+2, SEEK_SET ); + rtems_test_assert( status == -1 ); + rtems_test_assert( errno == ENOSPC ); + close_it(); unlink_it(); diff --git a/testsuites/psxtests/psximfs01/psximfs01.scn b/testsuites/psxtests/psximfs01/psximfs01.scn index 0b516f8f25..5ae790a56d 100644 --- a/testsuites/psxtests/psximfs01/psximfs01.scn +++ b/testsuites/psxtests/psximfs01/psximfs01.scn @@ -14,6 +14,8 @@ Seek to end .. returned 1280 lseek/ftruncate loop.. Seek to end .. returned 1 lseek/ftruncate loop.. +Seek to end .. returned 1295 +lseek/ftruncate loop.. close(biggie) - OK unlink(biggie) - OK *** END OF TEST IMFS 01 *** -- cgit v1.2.3