test/fsync: error out if we submit less than we wanted
This failure is expected on kernels that don't support the DRAIN
primitive.
@@ -95,7 +95,10 @@ static int test_barrier_fsync(struct io_uring *ring)
sqe->flags = IOSQE_IO_DRAIN;
ret = io_uring_submit(ring);
- if (ret <= 0) {
+ if (ret < 5) {
+ printf("Submitted only %d\n", ret);
+ goto err;
+ } else if (ret < 0) {
printf("sqe submit failed\n");
if (ret == EINVAL)
printf("kernel may not support barrier fsync yet\n");
