Message ID | 20250303124324.3563605-3-ming.lei@redhat.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | selftests: ublk: bug fixes & consolidation | expand |
Context | Check | Description |
---|---|---|
shin/vmtest-for-next-PR | success | PR summary |
shin/vmtest-for-next-VM_Test-0 | success | Logs for build-kernel |
On Mon, Mar 03, 2025 at 08:43:12PM +0800, Ming Lei wrote: > Fixes the following build failure: > > ublk//file_backed.c: In function `backing_file_tgt_init´: > ublk//file_backed.c:28:42: error: `O_DIRECT´ undeclared (first use in this function); did you mean `O_DIRECTORY´? > 28 | fd = open(file, O_RDWR | O_DIRECT); > | ^~~~~~~~ > | O_DIRECTORY > > when trying to reuse this same utility for liburing test. Looks good, Reviewed-by: Keith Busch <kbusch@kernel.org>
diff --git a/tools/testing/selftests/ublk/kublk.h b/tools/testing/selftests/ublk/kublk.h index 8e43aebf7dfc..8f48eb8568ab 100644 --- a/tools/testing/selftests/ublk/kublk.h +++ b/tools/testing/selftests/ublk/kublk.h @@ -12,6 +12,7 @@ #include <getopt.h> #include <limits.h> #include <poll.h> +#include <fcntl.h> #include <sys/syscall.h> #include <sys/mman.h> #include <sys/ioctl.h>
Fixes the following build failure: ublk//file_backed.c: In function ‘backing_file_tgt_init’: ublk//file_backed.c:28:42: error: ‘O_DIRECT’ undeclared (first use in this function); did you mean ‘O_DIRECTORY’? 28 | fd = open(file, O_RDWR | O_DIRECT); | ^~~~~~~~ | O_DIRECTORY when trying to reuse this same utility for liburing test. Signed-off-by: Ming Lei <ming.lei@redhat.com> --- tools/testing/selftests/ublk/kublk.h | 1 + 1 file changed, 1 insertion(+)