Commit ca1ef1e6 authored by Andrey Shinkevich's avatar Andrey Shinkevich Committed by Thomas Huth
Browse files

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 a6862418.

Suggested-by: default avatarKevin Wolf <kwolf@redhat.com>
Signed-off-by: default avatarAndrey Shinkevich <andrey.shinkevich@virtuozzo.com>
Message-Id: <1564404360-733987-1-git-send-email-andrey.shinkevich@virtuozzo.com>
Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
parent 375eae1c
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -121,7 +121,8 @@ static void test_drive_del_device_del(void)
    QTestState *qts;

    /* Start with a drive used by a device that unplugs instantaneously */
    qts = qtest_initf("-drive if=none,id=drive0,file=null-co://,format=raw"
    qts = qtest_initf("-drive if=none,id=drive0,file=null-co://,"
                      "file.read-zeroes=on,format=raw"
                      " -device virtio-scsi-%s"
                      " -device scsi-hd,drive=drive0,id=dev0",
                      qvirtio_get_dev_type());
+2 −1
Original line number Diff line number Diff line
@@ -95,7 +95,8 @@ static void virtio_scsi_register_nodes(void)
    };

    QOSGraphEdgeOptions opts = {
        .before_cmd_line = "-drive id=drv0,if=none,file=null-co://,format=raw",
        .before_cmd_line = "-drive id=drv0,if=none,file=null-co://,"
                           "file.read-zeroes=on,format=raw",
        .after_cmd_line = "-device scsi-hd,bus=vs0.0,drive=drv0",
    };

+2 −1
Original line number Diff line number Diff line
@@ -75,7 +75,8 @@ static void megasas_register_nodes(void)
{
    QOSGraphEdgeOptions opts = {
        .extra_device_opts = "addr=04.0,id=scsi0",
        .before_cmd_line = "-drive id=drv0,if=none,file=null-co://,format=raw",
        .before_cmd_line = "-drive id=drv0,if=none,file=null-co://,"
                           "file.read-zeroes=on,format=raw",
        .after_cmd_line = "-device scsi-hd,bus=scsi0.0,drive=drv0",
    };

+2 −1
Original line number Diff line number Diff line
@@ -70,7 +70,8 @@ static void nvme_register_nodes(void)
{
    QOSGraphEdgeOptions opts = {
        .extra_device_opts = "addr=04.0,drive=drv0,serial=foo",
        .before_cmd_line = "-drive id=drv0,if=none,file=null-co://,format=raw",
        .before_cmd_line = "-drive id=drv0,if=none,file=null-co://,"
                           "file.read-zeroes=on,format=raw",
    };

    add_qpci_address(&opts, &(QPCIAddress) { .devfn = QPCI_DEVFN(4, 0) });
+1 −1
Original line number Diff line number Diff line
@@ -187,7 +187,7 @@ static void send_cmd_that_blocks(QTestState *s, const char *id)
                   " 'arguments': {"
                   " 'driver': 'blkdebug', 'node-name': %s,"
                   " 'config': %s,"
                   " 'image': { 'driver': 'null-co' } } }",
                   " 'image': { 'driver': 'null-co', 'read-zeroes': true } } }",
                   id, id, fifo_name);
}

Loading