diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-12-11 10:23:44 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-12-11 10:23:44 +0100 |
commit | ce8363d3636487339c5c16d914523766812110fa (patch) | |
tree | 87d487243accc391aca67658f384c2a00bc50c0f /testsuites | |
parent | PR2160: imfs: Use ENOSYS for unsupported nodes (diff) | |
download | rtems-ce8363d3636487339c5c16d914523766812110fa.tar.bz2 |
sptests/spfifo01: Add test case for mknod()
Diffstat (limited to 'testsuites')
-rw-r--r-- | testsuites/sptests/spfifo01/init.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/testsuites/sptests/spfifo01/init.c b/testsuites/sptests/spfifo01/init.c index 9128a678e4..9bc42e06f5 100644 --- a/testsuites/sptests/spfifo01/init.c +++ b/testsuites/sptests/spfifo01/init.c @@ -26,10 +26,8 @@ rtems_task Init(rtems_task_argument argument); static void test_main(void) { - int status = -1; - int fd; - char buf [1]; - ssize_t n; + mode_t rwx = S_IRWXU | S_IRWXG | S_IRWXO; + int status; puts("\n\n*** FIFO / PIPE OPEN TEST - 1 ***"); @@ -40,7 +38,12 @@ static void test_main(void) ); errno = 0; - status = mkfifo(FIFO_PATH, 0777); + status = mkfifo(FIFO_PATH, rwx); + rtems_test_assert(status == -1); + rtems_test_assert(errno == ENOSYS); + + errno = 0; + status = mknod(FIFO_PATH, S_IFIFO | rwx, 0); rtems_test_assert(status == -1); rtems_test_assert(errno == ENOSYS); |