From 161f54b4d60ebff1d40359ac781be3dbe95a3404 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Mon, 28 Dec 2009 16:43:10 +0000 Subject: 2009-12-28 Shrikant Gaikwad * psx13/test.c, psx13/psx13.scn Added new routine PipeTestNull() to cover the trivial NULL case for pipe function. --- testsuites/psxtests/psx13/test.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'testsuites/psxtests/psx13/test.c') 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"); -- cgit v1.2.3