aboutsummaryrefslogtreecommitdiff
path: root/tests/test-blockjob.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test-blockjob.c')
-rw-r--r--tests/test-blockjob.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/test-blockjob.c b/tests/test-blockjob.c
index b33f899873..68a0819495 100644
--- a/tests/test-blockjob.c
+++ b/tests/test-blockjob.c
@@ -15,6 +15,7 @@
#include "qemu/main-loop.h"
#include "block/blockjob_int.h"
#include "sysemu/block-backend.h"
+#include "qapi/qmp/qdict.h"
static const BlockJobDriver test_block_job_driver = {
.job_driver = {
@@ -71,7 +72,9 @@ static BlockBackend *create_blk(const char *name)
BlockBackend *blk = blk_new(qemu_get_aio_context(), 0, BLK_PERM_ALL);
BlockDriverState *bs;
- bs = bdrv_open("null-co://", NULL, NULL, 0, &error_abort);
+ QDict *opt = qdict_new();
+ qdict_put_str(opt, "file.read-zeroes", "on");
+ bs = bdrv_open("null-co://", NULL, opt, 0, &error_abort);
g_assert_nonnull(bs);
blk_insert_bs(blk, bs, &error_abort);