summaryrefslogtreecommitdiffstats
path: root/testsuite/cdev01/test_main.c
diff options
context:
space:
mode:
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);