diff options
| author | Uday Shankar <ushankar@purestorage.com> | 2025-04-29 16:41:05 -0600 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2025-05-05 16:54:52 -0600 |
| commit | e371b9d3368ccb6b55fe9747be12c3107b2817b3 (patch) | |
| tree | 1100ee154e8d3e9b626588c41733020dd1d12a35 | |
| parent | 254827a32118ddb171680dc2143c777cc68f2cbc (diff) | |
selftests: ublk: kublk: fix include path
Building kublk currently fails (with a "could not find linux/ublk_cmd.h"
error message) if kernel headers are not installed in a system-global
location (i.e. somewhere in the compiler's default include search path).
This failure is unnecessary, as make kselftest installs kernel headers
in the build tree - kublk's build just isn't looking for them properly.
There is an include path in kublk's CFLAGS which is probably intended to
find the kernel headers installed in the build tree; fix it so that it
can actually find them.
This introduces some macro redefinition issues between glibc-provided
headers and kernel headers; fix those by eliminating one include in
kublk.
Signed-off-by: Uday Shankar <ushankar@purestorage.com>
Reviewed-by: Caleb Sander Mateos <csander@purestorage.com>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20250429-ublk_selftests-v2-3-e970b6d9e4f4@purestorage.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
| -rw-r--r-- | tools/testing/selftests/ublk/Makefile | 2 | ||||
| -rw-r--r-- | tools/testing/selftests/ublk/kublk.h | 1 |
2 files changed, 1 insertions, 2 deletions
diff --git a/tools/testing/selftests/ublk/Makefile b/tools/testing/selftests/ublk/Makefile index d8eb137abacd..e2e7b1e52a06 100644 --- a/tools/testing/selftests/ublk/Makefile +++ b/tools/testing/selftests/ublk/Makefile @@ -1,6 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 -CFLAGS += -O3 -Wl,-no-as-needed -Wall -I $(top_srcdir) +CFLAGS += -O3 -Wl,-no-as-needed -Wall -I $(top_srcdir)/usr/include ifneq ($(WERROR),0) CFLAGS += -Werror endif diff --git a/tools/testing/selftests/ublk/kublk.h b/tools/testing/selftests/ublk/kublk.h index 44ee1e4ac55b..81fb5864ab72 100644 --- a/tools/testing/selftests/ublk/kublk.h +++ b/tools/testing/selftests/ublk/kublk.h @@ -19,7 +19,6 @@ #include <sys/inotify.h> #include <sys/wait.h> #include <sys/eventfd.h> -#include <sys/uio.h> #include <sys/ipc.h> #include <sys/shm.h> #include <linux/io_uring.h> |
