diff options
author | Andrey Shinkevich <andrey.shinkevich@virtuozzo.com> | 2019-07-29 15:46:00 +0300 |
---|---|---|
committer | Thomas Huth <thuth@redhat.com> | 2019-08-15 19:23:59 +0200 |
commit | ca1ef1e62e581f61c40f8be49d222007739691c4 (patch) | |
tree | a44dd28fac7c1cbdd918227bac161b408983dd74 /tests/virtio-scsi-test.c | |
parent | 375eae1c716bd55936d65ad545ae2ea0c9909b91 (diff) |
tests: Set read-zeroes on for null-co driver
This patch is to reduce the number of Valgrind report messages about
using uninitialized memory with the null-co driver. It helps to filter
real memory issues and is the same work done for the iotests with the
commit ID a6862418fec4072.
Suggested-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>
Message-Id: <1564404360-733987-1-git-send-email-andrey.shinkevich@virtuozzo.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'tests/virtio-scsi-test.c')
-rw-r--r-- | tests/virtio-scsi-test.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/virtio-scsi-test.c b/tests/virtio-scsi-test.c index 1ad9f75d74..ae6698ddb4 100644 --- a/tests/virtio-scsi-test.c +++ b/tests/virtio-scsi-test.c @@ -239,7 +239,8 @@ fail: static void *virtio_scsi_hotplug_setup(GString *cmd_line, void *arg) { g_string_append(cmd_line, - " -drive id=drv1,if=none,file=null-co://,format=raw"); + " -drive id=drv1,if=none,file=null-co://," + "file.read-zeroes=on,format=raw"); return arg; } @@ -247,6 +248,7 @@ static void *virtio_scsi_setup(GString *cmd_line, void *arg) { g_string_append(cmd_line, " -drive file=blkdebug::null-co://," + "file.image.read-zeroes=on," "if=none,id=dr1,format=raw,file.align=4k " "-device scsi-hd,drive=dr1,lun=0,scsi-id=1"); return arg; @@ -256,7 +258,7 @@ static void *virtio_scsi_setup_iothread(GString *cmd_line, void *arg) { g_string_append(cmd_line, " -object iothread,id=thread0" - " -blockdev driver=null-co,node-name=null0" + " -blockdev driver=null-co,read-zeroes=on,node-name=null0" " -device scsi-hd,drive=null0"); return arg; } |