summaryrefslogtreecommitdiffstats
path: root/testsuites/psxtests/psxfile01
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2010-07-15 13:59:25 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2010-07-15 13:59:25 +0000
commit947015fbf3fe206ac59dbe90a16f1de8db7f112c (patch)
tree74d49c89d77bdab182bd84a6059000d3cde0cce1 /testsuites/psxtests/psxfile01
parent2010-07-15 Bharath Suri <bharath.s.jois@gmail.com> (diff)
downloadrtems-947015fbf3fe206ac59dbe90a16f1de8db7f112c.tar.bz2
2010-07-15 Bharath Suri <bharath.s.jois@gmail.com>
PR 1617/testing * psxfile01/test.c, psxfile01/psxfile01.scn: Added new cases to exercise_link_r and _unlink_r * psxstat/test.c, psxstat/psxstat.scn: Added new cases to exercise _lstat_r and _stat_r. * psxtime/test.c, psxtime/psxtime.scn: Added new cases to exercise _gettimeofday.
Diffstat (limited to 'testsuites/psxtests/psxfile01')
-rw-r--r--testsuites/psxtests/psxfile01/psxfile01.scn3
-rw-r--r--testsuites/psxtests/psxfile01/test.c9
2 files changed, 10 insertions, 2 deletions
diff --git a/testsuites/psxtests/psxfile01/psxfile01.scn b/testsuites/psxtests/psxfile01/psxfile01.scn
index f4bbe70c59..8d56722a87 100644
--- a/testsuites/psxtests/psxfile01/psxfile01.scn
+++ b/testsuites/psxtests/psxfile01/psxfile01.scn
@@ -1,4 +1,3 @@
-
*** FILE TEST 1 ***
*************** Dump of Entire IMFS ***************
/
@@ -49,6 +48,8 @@ Attempt to recreate /tmp/tom
create /tmp/john
tcdrain /tmp/john
Attempt to create a file, open in read-only mode and truncate it
+Exercise the reentrant version _link_r -- Expect EFAULT
+Unlink /tmp/bha using the reentrant version -- OK
mknod /tmp/joel
(0)the first write!!!
diff --git a/testsuites/psxtests/psxfile01/test.c b/testsuites/psxtests/psxfile01/test.c
index bcecbcea37..e376b8fe05 100644
--- a/testsuites/psxtests/psxfile01/test.c
+++ b/testsuites/psxtests/psxfile01/test.c
@@ -30,6 +30,7 @@
#include <errno.h>
#include <string.h>
#include <ctype.h>
+#include <reent.h>
#include <rtems/imfs.h>
#include <rtems.h>
@@ -338,7 +339,13 @@ int main(
rtems_test_assert( fd == -1 );
rtems_test_assert( errno == EINVAL );
- status = unlink( "/tmp/bha" );
+ puts( "Exercise the reentrant version _link_r -- Expect EFAULT" );
+ status = _link_r( NULL, NULL, NULL );
+ rtems_test_assert( status == -1 );
+ rtems_test_assert( errno == EFAULT );
+
+ puts( "Unlink /tmp/bha using the reentrant version -- OK" );
+ status = _unlink_r( NULL, "/tmp/bha" );
rtems_test_assert( status == 0 );
/*