summaryrefslogtreecommitdiffstats
path: root/testsuites/psxtests/psxfile01
diff options
context:
space:
mode:
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 );
/*