summaryrefslogtreecommitdiffstats
path: root/testsuite/cdev01/test_main.c
diff options
context:
space:
mode:
authorVijay Kumar Banerjee <vijaykumar9597@gmail.com>2019-07-18 14:26:26 +0530
committerChristian Mauderer <oss@c-mauderer.de>2019-07-27 13:49:07 +0200
commitb68ca55c964cac5a6940e27f2880ee740cb1618a (patch)
treeb2611e6b76b74b788be08eddf90baf830b8b0e17 /testsuite/cdev01/test_main.c
parentEPOCH(9): Add epoch_drain_callbacks() (diff)
downloadrtems-libbsd-b68ca55c964cac5a6940e27f2880ee740cb1618a.tar.bz2
Add mmap
Diffstat (limited to 'testsuite/cdev01/test_main.c')
-rw-r--r--testsuite/cdev01/test_main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/testsuite/cdev01/test_main.c b/testsuite/cdev01/test_main.c
index cbff9133..23aefa86 100644
--- a/testsuite/cdev01/test_main.c
+++ b/testsuite/cdev01/test_main.c
@@ -35,6 +35,7 @@
#include <sys/time.h>
#include <sys/uio.h>
#include <sys/ioctl.h>
+#include <sys/mman.h>
#include <assert.h>
#include <errno.h>
@@ -125,6 +126,9 @@ static void test_cdev(const char *path)
assert(rv == -1);
assert(errno == TEST_KQ_ERRNO);
+ rv = mmap(NULL, 1, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
+ assert(rv == 0);
+
rv = close(fd);
assert(rv == 0);