summaryrefslogtreecommitdiffstats
path: root/testsuites/psxtests/psx13/test.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2009-12-28 16:43:10 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2009-12-28 16:43:10 +0000
commit161f54b4d60ebff1d40359ac781be3dbe95a3404 (patch)
treebb161cb53e83b31f055022edad656c990ceab5cc /testsuites/psxtests/psx13/test.c
parent2009-12-28 Aanjhan Ranganathan <aanjhan@gmail.com> (diff)
downloadrtems-161f54b4d60ebff1d40359ac781be3dbe95a3404.tar.bz2
2009-12-28 Shrikant Gaikwad <n3oo3n@gmail.com>
* psx13/test.c, psx13/psx13.scn Added new routine PipeTestNull() to cover the trivial NULL case for pipe function.
Diffstat (limited to '')
-rw-r--r--testsuites/psxtests/psx13/test.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/testsuites/psxtests/psx13/test.c b/testsuites/psxtests/psx13/test.c
index e64d029ed5..3a4b9fe809 100644
--- a/testsuites/psxtests/psx13/test.c
+++ b/testsuites/psxtests/psx13/test.c
@@ -45,6 +45,7 @@ int FDataSyncTest(void);
int UMaskTest(void);
int UTimeTest(void);
int PipeTest(void);
+int PipeTestNull(void);
int PathConfTest(void);
int FPathConfTest(void);
int FSyncTest(void);
@@ -457,6 +458,20 @@ int PipeTest (void)
return(retval);
}
+int PipeTestNull (void)
+{
+ int error = 0, retval = FALSE;
+
+ error = pipe(NULL);
+
+ if ((error == -1) && (errno == ENOSYS))
+ retval = TRUE;
+ else
+ retval = FALSE;
+
+ return(retval);
+}
+
/* ---------------------------------------------------------------
* PathConfTest function
*
@@ -654,6 +669,12 @@ int main(
else
printf ("Failed!!!\n");
+ printf ("Testing pipe() with NULL........... ");
+ if (PipeTestNull() == TRUE)
+ printf ("Success.\n");
+ else
+ printf ("Failed!!!\n");
+
printf ("Testing fsync().......... ");
if (FSyncTest() == TRUE)
printf ("Success.\n");