diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-12-11 09:39:09 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-12-11 09:39:09 +0100 |
commit | 98e5c954bdb40d0e66d33eedcdd157fcbecbb114 (patch) | |
tree | e23f0c261956540f6a391610306c2c97b4496703 /testsuites/sptests/spfifo01 | |
parent | psxsignal06: Fix bug where mutex not locked and add EPERM error check (diff) | |
download | rtems-98e5c954bdb40d0e66d33eedcdd157fcbecbb114.tar.bz2 |
PR2160: imfs: Use ENOSYS for unsupported nodes
Return an error status with errno set to ENOSYS during node creation for
nodes not available in the current configuration.
Diffstat (limited to 'testsuites/sptests/spfifo01')
-rw-r--r-- | testsuites/sptests/spfifo01/init.c | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/testsuites/sptests/spfifo01/init.c b/testsuites/sptests/spfifo01/init.c index e01204ede1..9128a678e4 100644 --- a/testsuites/sptests/spfifo01/init.c +++ b/testsuites/sptests/spfifo01/init.c @@ -38,22 +38,11 @@ static void test_main(void) "Creating named fifo '" FIFO_PATH "'.\n" "Must result in failure since pipes are disabled in the configuration." ); - status = mkfifo(FIFO_PATH, 0777); - rtems_test_assert(status == 0); - - fd = open(FIFO_PATH, O_RDWR); - rtems_test_assert(fd >= 0); - - n = read(fd, buf, sizeof(buf)); - rtems_test_assert(n == -1); - rtems_test_assert(errno == ENOTSUP); - n = write(fd, buf, sizeof(buf)); - rtems_test_assert(n == -1); - rtems_test_assert(errno == ENOTSUP); - - status = close(fd); - rtems_test_assert(status == 0); + errno = 0; + status = mkfifo(FIFO_PATH, 0777); + rtems_test_assert(status == -1); + rtems_test_assert(errno == ENOSYS); puts("*** END OF FIFO / PIPE OPEN TEST - 1 ***"); } |