selftests: ublk: fix build failure
authorMing Lei <ming.lei@redhat.com>
Mon, 3 Mar 2025 12:43:12 +0000 (20:43 +0800)
committerJens Axboe <axboe@kernel.dk>
Mon, 10 Mar 2025 15:17:13 +0000 (09:17 -0600)
commit9d80f48c5e08b2e003e506c6e5326a35a652ea2f
treec1ec87d4cc30704ed226b5d86699c8246105d0ad
parent9894e0eaae980df1ed3f2e86a487fe4c8ef1ab46
selftests: ublk: fix build failure

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>
Reviewed-by: Keith Busch <kbusch@kernel.org>
Link: https://lore.kernel.org/r/20250303124324.3563605-3-ming.lei@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
tools/testing/selftests/ublk/kublk.h