Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests: ublk: add one dependency header

Add one dependency helper which can include new uapi definition which
isn't synced from kernel.

This way also helps a lot for downstream test deployment.

Signed-off-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20250320013743.4167489-2-ming.lei@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Ming Lei and committed by
Jens Axboe
8764c1a7 cf9536e5

+19
+1
tools/testing/selftests/ublk/kublk.h
··· 21 21 #include <sys/eventfd.h> 22 22 #include <liburing.h> 23 23 #include <linux/ublk_cmd.h> 24 + #include "ublk_dep.h" 24 25 25 26 #define __maybe_unused __attribute__((unused)) 26 27 #define MAX_BACK_FILES 4
+18
tools/testing/selftests/ublk/ublk_dep.h
··· 1 + #ifndef UBLK_DEP_H 2 + #define UBLK_DEP_H 3 + 4 + #ifndef UBLK_U_IO_REGISTER_IO_BUF 5 + #define UBLK_U_IO_REGISTER_IO_BUF \ 6 + _IOWR('u', 0x23, struct ublksrv_io_cmd) 7 + #define UBLK_U_IO_UNREGISTER_IO_BUF \ 8 + _IOWR('u', 0x24, struct ublksrv_io_cmd) 9 + #endif 10 + 11 + #ifndef UBLK_F_USER_RECOVERY_FAIL_IO 12 + #define UBLK_F_USER_RECOVERY_FAIL_IO (1ULL << 9) 13 + #endif 14 + 15 + #ifndef UBLK_F_ZONED 16 + #define UBLK_F_ZONED (1ULL << 8) 17 + #endif 18 + #endif