diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-12-28 16:43:10 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-12-28 16:43:10 +0000 |
commit | 161f54b4d60ebff1d40359ac781be3dbe95a3404 (patch) | |
tree | bb161cb53e83b31f055022edad656c990ceab5cc /testsuites/psxtests/psx13 | |
parent | 2009-12-28 Aanjhan Ranganathan <aanjhan@gmail.com> (diff) | |
download | rtems-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 'testsuites/psxtests/psx13')
-rw-r--r-- | testsuites/psxtests/psx13/psx13.scn | 1 | ||||
-rw-r--r-- | testsuites/psxtests/psx13/test.c | 21 |
2 files changed, 22 insertions, 0 deletions
diff --git a/testsuites/psxtests/psx13/psx13.scn b/testsuites/psxtests/psx13/psx13.scn index 4a012eceaa..0b738368ab 100644 --- a/testsuites/psxtests/psx13/psx13.scn +++ b/testsuites/psxtests/psx13/psx13.scn @@ -8,6 +8,7 @@ Testing fdatasync()...... Success. Testing umask().......... Success. Testing utime().......... Success. Testing pipe()........... Success. +Testing pipe() with NULL........... Failed!!! Testing fsync().......... Success. Testing pathconf()....... Success. Testing fpathconf()...... Success. 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"); |