summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@redhat.com>2019-07-24 09:24:50 +0100
committerJens Axboe <axboe@kernel.dk>2019-07-24 09:11:44 -0600
commitc31c7ec4bcd7bb0d7b28897d730431c02b9d4ea1 (patch)
treebaffe189e6dc69fa17adc8fe08ad1d133b328ade /test
parentb42c59d7afc79370cf0140d5b9978b1e8c350408 (diff)
downloadliburing-c31c7ec4bcd7bb0d7b28897d730431c02b9d4ea1.tar.gz
liburing-c31c7ec4bcd7bb0d7b28897d730431c02b9d4ea1.tar.bz2
src/Makefile: keep private headers in <liburing/*.h>
It is not possible to install barrier.h and compat.h into the top-level /usr/include directly since they are likely to conflict with other software. io_uring.h could be confused with the system's kernel header file. Put liburing headers into <liburing/*.h> so there is no chance of conflicts or confusion. Existing applications continue to build successfully since the location of <liburing.h> is unchanged. In-tree examples and tests require modification because src/liburing.h is moved to src/include/liburing.h. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'test')
-rw-r--r--test/Makefile2
-rw-r--r--test/cq-full.c2
-rw-r--r--test/eeed8b54e0df-test.c2
-rw-r--r--test/fsync.c2
-rw-r--r--test/io_uring_enter.c4
-rw-r--r--test/io_uring_register.c2
-rw-r--r--test/io_uring_setup.c2
-rw-r--r--test/link.c2
-rw-r--r--test/nop.c2
-rw-r--r--test/poll-cancel.c2
-rw-r--r--test/poll.c2
-rw-r--r--test/ring-leak.c2
-rw-r--r--test/send_recvmsg.c2
-rw-r--r--test/sq-full.c2
14 files changed, 15 insertions, 15 deletions
diff --git a/test/Makefile b/test/Makefile
index 98f863c..4d056f8 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -1,5 +1,5 @@
CFLAGS ?= -g -O2
-override CFLAGS += -Wall -D_GNU_SOURCE -L../src/
+override CFLAGS += -Wall -D_GNU_SOURCE -L../src/ -I../src/include/
all_targets += poll poll-cancel ring-leak fsync io_uring_setup io_uring_register \
io_uring_enter nop sq-full cq-full 35fa71a030ca-test \
diff --git a/test/cq-full.c b/test/cq-full.c
index 82c5a65..25fa42c 100644
--- a/test/cq-full.c
+++ b/test/cq-full.c
@@ -9,7 +9,7 @@
#include <string.h>
#include <fcntl.h>
-#include "../src/liburing.h"
+#include "liburing.h"
static int queue_n_nops(struct io_uring *ring, int n)
{
diff --git a/test/eeed8b54e0df-test.c b/test/eeed8b54e0df-test.c
index 9083d3e..84237d5 100644
--- a/test/eeed8b54e0df-test.c
+++ b/test/eeed8b54e0df-test.c
@@ -9,7 +9,7 @@
#include <string.h>
#include <fcntl.h>
-#include "../src/liburing.h"
+#include "liburing.h"
#define BLOCK 4096
diff --git a/test/fsync.c b/test/fsync.c
index 44264f4..e6e0898 100644
--- a/test/fsync.c
+++ b/test/fsync.c
@@ -9,7 +9,7 @@
#include <string.h>
#include <fcntl.h>
-#include "../src/liburing.h"
+#include "liburing.h"
static int test_single_fsync(struct io_uring *ring)
{
diff --git a/test/io_uring_enter.c b/test/io_uring_enter.c
index b25afd5..c2030c1 100644
--- a/test/io_uring_enter.c
+++ b/test/io_uring_enter.c
@@ -22,8 +22,8 @@
#include <sys/resource.h>
#include <limits.h>
#include <sys/time.h>
-#include "../src/liburing.h"
-#include "../src/barrier.h"
+#include "liburing.h"
+#include "liburing/barrier.h"
#define IORING_MAX_ENTRIES 4096
diff --git a/test/io_uring_register.c b/test/io_uring_register.c
index 32e5217..59c8a86 100644
--- a/test/io_uring_register.c
+++ b/test/io_uring_register.c
@@ -21,7 +21,7 @@
#include <sys/time.h>
#include <sys/resource.h>
#include <limits.h>
-#include "../src/liburing.h"
+#include "liburing.h"
static int pagesize;
static rlim_t mlock_limit;
diff --git a/test/io_uring_setup.c b/test/io_uring_setup.c
index 09e16e5..2dd3763 100644
--- a/test/io_uring_setup.c
+++ b/test/io_uring_setup.c
@@ -13,7 +13,7 @@
#include <unistd.h>
#include <errno.h>
#include <sys/sysinfo.h>
-#include "../src/liburing.h"
+#include "liburing.h"
/*
* Attempt the call with the given args. Return 0 when expect matches
diff --git a/test/link.c b/test/link.c
index e7ca3e3..603b507 100644
--- a/test/link.c
+++ b/test/link.c
@@ -9,7 +9,7 @@
#include <string.h>
#include <fcntl.h>
-#include "../src/liburing.h"
+#include "liburing.h"
/*
* Test failing head of chain, and dependent getting -ECANCELED
diff --git a/test/nop.c b/test/nop.c
index 8e6bfb0..1373695 100644
--- a/test/nop.c
+++ b/test/nop.c
@@ -9,7 +9,7 @@
#include <string.h>
#include <fcntl.h>
-#include "../src/liburing.h"
+#include "liburing.h"
static int test_single_nop(struct io_uring *ring)
{
diff --git a/test/poll-cancel.c b/test/poll-cancel.c
index 19efc5f..4761569 100644
--- a/test/poll-cancel.c
+++ b/test/poll-cancel.c
@@ -12,7 +12,7 @@
#include <sys/wait.h>
#include <sys/signal.h>
-#include "../src/liburing.h"
+#include "liburing.h"
struct poll_data {
unsigned is_poll;
diff --git a/test/poll.c b/test/poll.c
index d22d9c5..ed424fc 100644
--- a/test/poll.c
+++ b/test/poll.c
@@ -11,7 +11,7 @@
#include <sys/poll.h>
#include <sys/wait.h>
-#include "../src/liburing.h"
+#include "liburing.h"
static void sig_alrm(int sig)
{
diff --git a/test/ring-leak.c b/test/ring-leak.c
index 99466e4..02b06f9 100644
--- a/test/ring-leak.c
+++ b/test/ring-leak.c
@@ -21,7 +21,7 @@
#include <string.h>
#include <linux/fs.h>
-#include "../src/liburing.h"
+#include "liburing.h"
static int __io_uring_register_files(int ring_fd, int fd1, int fd2)
{
diff --git a/test/send_recvmsg.c b/test/send_recvmsg.c
index 9187906..ada6559 100644
--- a/test/send_recvmsg.c
+++ b/test/send_recvmsg.c
@@ -9,7 +9,7 @@
#include <sys/types.h>
#include <sys/socket.h>
-#include "../src/liburing.h"
+#include "liburing.h"
static char str[] = "This is a test of sendmsg and recvmsg over io_uring!";
diff --git a/test/sq-full.c b/test/sq-full.c
index 5bf7f72..3fbe0a5 100644
--- a/test/sq-full.c
+++ b/test/sq-full.c
@@ -9,7 +9,7 @@
#include <string.h>
#include <fcntl.h>
-#include "../src/liburing.h"
+#include "liburing.h"
int main(int argc, char *argv[])
{