[rtems commit] sptests/spfifo01: Add test case for mknod()
Sebastian Huber
sebh at rtems.org
Wed Dec 11 09:17:16 UTC 2013
Module: rtems
Branch: master
Commit: ce8363d3636487339c5c16d914523766812110fa
Changeset: http://git.rtems.org/rtems/commit/?id=ce8363d3636487339c5c16d914523766812110fa
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Wed Dec 11 10:23:44 2013 +0100
sptests/spfifo01: Add test case for mknod()
---
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 9128a67..9bc42e0 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);
More information about the vc
mailing list