From patchwork Thu Jul 13 11:41:34 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Wolf X-Patchwork-Id: 9838287 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 371C1602D8 for ; Thu, 13 Jul 2017 11:46:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 26EE628668 for ; Thu, 13 Jul 2017 11:46:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1B598286D9; Thu, 13 Jul 2017 11:46:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9760928668 for ; Thu, 13 Jul 2017 11:45:58 +0000 (UTC) Received: from localhost ([::1]:58974 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVcZB-0005xV-Qa for patchwork-qemu-devel@patchwork.kernel.org; Thu, 13 Jul 2017 07:45:57 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50365) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVcVb-000308-Ot for qemu-devel@nongnu.org; Thu, 13 Jul 2017 07:42:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dVcVY-0002wT-UX for qemu-devel@nongnu.org; Thu, 13 Jul 2017 07:42:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58016) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dVcVR-0002q4-Kj; Thu, 13 Jul 2017 07:42:05 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8459CC00862C; Thu, 13 Jul 2017 11:42:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 8459CC00862C Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kwolf@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 8459CC00862C Received: from noname.redhat.com (ovpn-117-143.ams2.redhat.com [10.36.117.143]) by smtp.corp.redhat.com (Postfix) with ESMTP id 696D16060E; Thu, 13 Jul 2017 11:42:02 +0000 (UTC) From: Kevin Wolf To: qemu-block@nongnu.org Date: Thu, 13 Jul 2017 13:41:34 +0200 Message-Id: <1499946095-8224-9-git-send-email-kwolf@redhat.com> In-Reply-To: <1499946095-8224-1-git-send-email-kwolf@redhat.com> References: <1499946095-8224-1-git-send-email-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Thu, 13 Jul 2017 11:42:04 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v2 8/9] qemu-iotests: Test 'info block' X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, qemu-devel@nongnu.org, armbru@redhat.com, mreitz@redhat.com, pbonzini@redhat.com, jsnow@redhat.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP This test makes sure that all block devices show up on 'info block', with all of the expected information, in different configurations. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake --- tests/qemu-iotests/186 | 147 ++++++++++++++ tests/qemu-iotests/186.out | 489 +++++++++++++++++++++++++++++++++++++++++++++ tests/qemu-iotests/group | 1 + 3 files changed, 637 insertions(+) create mode 100755 tests/qemu-iotests/186 create mode 100644 tests/qemu-iotests/186.out diff --git a/tests/qemu-iotests/186 b/tests/qemu-iotests/186 new file mode 100755 index 0000000..ab83ee4 --- /dev/null +++ b/tests/qemu-iotests/186 @@ -0,0 +1,147 @@ +#!/bin/bash +# +# Test 'info block' with all kinds of configurations +# +# Copyright (C) 2017 Red Hat, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +# creator +owner=kwolf@redhat.com + +seq=`basename $0` +echo "QA output created by $seq" + +here=`pwd` +status=1 # failure is the default! + +_cleanup() +{ + _cleanup_test_img +} +trap "_cleanup; exit \$status" 0 1 2 3 15 + +# get standard environment, filters and checks +. ./common.rc +. ./common.filter + +_supported_fmt qcow2 +_supported_proto file +_supported_os Linux + +if [ "$QEMU_DEFAULT_MACHINE" != "pc" ]; then + _notrun "Requires a PC machine" +fi + +function do_run_qemu() +{ + echo Testing: "$@" + + ( + if ! test -t 0; then + while read cmd; do + echo $cmd + done + fi + echo quit + ) | $QEMU -S -nodefaults -display none -device virtio-scsi-pci -monitor stdio "$@" + echo +} + +function check_info_block() +{ + echo "info block" | + QEMU_OPTIONS="" do_run_qemu "$@" | _filter_win32 | _filter_hmp | + _filter_qemu | _filter_generated_node_ids +} + + +size=64M +_make_test_img $size + +removable="floppy ide-cd scsi-cd" +fixed="ide-hd scsi-hd virtio-blk-pci" + +echo +echo "=== Empty drives ===" +echo + +for dev in $removable; do + check_info_block -device $dev + check_info_block -device $dev,id=qdev_id +done + +echo +echo "=== -blockdev/-device= ===" +echo + +for dev in $fixed $removable; do + check_info_block -blockdev driver=null-co,node-name=null -device $dev,drive=null + check_info_block -blockdev driver=null-co,node-name=null -device $dev,drive=null,id=qdev_id +done + +echo +echo "=== -drive if=none/-device= ===" +echo + +# This creates two BlockBackends that will show up in 'info block'! +# A monitor-owned one from -drive, and anonymous one from -device +for dev in $fixed $removable; do + check_info_block -drive if=none,driver=null-co,node-name=null -device $dev,drive=null,id=qdev_id +done + +echo +echo "=== -drive if=none/-device= (with medium) ===" +echo + +for dev in $fixed $removable; do + check_info_block -drive if=none,driver=null-co,node-name=null -device $dev,drive=none0 + check_info_block -drive if=none,driver=null-co,node-name=null -device $dev,drive=none0,id=qdev_id +done + +echo +echo "=== -drive if=none/-device= (without medium) ===" +echo + +check_info_block -drive if=none + +for dev in $removable; do + check_info_block -drive if=none -device $dev,drive=none0 + check_info_block -drive if=none -device $dev,drive=none0,id=qdev_id +done + +echo +echo "=== -drive if=... ===" +echo + +check_info_block -drive if=floppy +check_info_block -drive if=floppy,driver=null-co + +check_info_block -drive if=ide,driver=null-co +check_info_block -drive if=ide,media=cdrom +check_info_block -drive if=ide,driver=null-co,media=cdrom + +check_info_block -drive if=scsi,driver=null-co +check_info_block -drive if=scsi,media=cdrom +check_info_block -drive if=scsi,driver=null-co,media=cdrom + +check_info_block -drive if=virtio,driver=null-co + +check_info_block -drive if=pflash,driver=null-co,size=1M + +# success, all done +echo "*** done" +rm -f $seq.full +status=0 diff --git a/tests/qemu-iotests/186.out b/tests/qemu-iotests/186.out new file mode 100644 index 0000000..3cf19be --- /dev/null +++ b/tests/qemu-iotests/186.out @@ -0,0 +1,489 @@ +QA output created by 186 +Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 + +=== Empty drives === + +Testing: -device floppy +QEMU X.Y.Z monitor - type 'help' for more information +(qemu) info block +/machine/peripheral-anon/device[1]: [not inserted] + Attached to: /machine/peripheral-anon/device[1] + Removable device: not locked, tray closed +(qemu) quit + +Testing: -device floppy,id=qdev_id +QEMU X.Y.Z monitor - type 'help' for more information +(qemu) info block +qdev_id: [not inserted] + Attached to: qdev_id + Removable device: not locked, tray closed +(qemu) quit + +Testing: -device ide-cd +QEMU X.Y.Z monitor - type 'help' for more information +(qemu) info block +/machine/peripheral-anon/device[1]: [not inserted] + Attached to: /machine/peripheral-anon/device[1] + Removable device: not locked, tray closed +(qemu) quit + +Testing: -device ide-cd,id=qdev_id +QEMU X.Y.Z monitor - type 'help' for more information +(qemu) info block +qdev_id: [not inserted] + Attached to: qdev_id + Removable device: not locked, tray closed +(qemu) quit + +Testing: -device scsi-cd +QEMU X.Y.Z monitor - type 'help' for more information +(qemu) info block +/machine/peripheral-anon/device[1]: [not inserted] + Attached to: /machine/peripheral-anon/device[1] + Removable device: not locked, tray closed +(qemu) quit + +Testing: -device scsi-cd,id=qdev_id +QEMU X.Y.Z monitor - type 'help' for more information +(qemu) info block +qdev_id: [not inserted] + Attached to: qdev_id + Removable device: not locked, tray closed +(qemu) quit + + +=== -blockdev/-device= === + +Testing: -blockdev driver=null-co,node-name=null -device ide-hd,drive=null +QEMU X.Y.Z monitor - type 'help' for more information +(qemu) info block +null: null-co:// (null-co) + Attached to: /machine/peripheral-anon/device[1] + Cache mode: writeback +(qemu) quit + +Testing: -blockdev driver=null-co,node-name=null -device ide-hd,drive=null,id=qdev_id +QEMU X.Y.Z monitor - type 'help' for more information +(qemu) info block +null: null-co:// (null-co) + Attached to: qdev_id + Cache mode: writeback +(qemu) quit + +Testing: -blockdev driver=null-co,node-name=null -device scsi-hd,drive=null +QEMU X.Y.Z monitor - type 'help' for more information +(qemu) info block +null: null-co:// (null-co) + Attached to: /machine/peripheral-anon/device[1] + Cache mode: writeback +(qemu) quit + +Testing: -blockdev driver=null-co,node-name=null -device scsi-hd,drive=null,id=qdev_id +QEMU X.Y.Z monitor - type 'help' for more information +(qemu) info block +null: null-co:// (null-co) + Attached to: qdev_id + Cache mode: writeback +(qemu) quit + +Testing: -blockdev driver=null-co,node-name=null -device virtio-blk-pci,drive=null +QEMU X.Y.Z monitor - type 'help' for more information +(qemu) info block +null: null-co:// (null-co) + Attached to: /machine/peripheral-anon/device[1]/virtio-backend + Cache mode: writeback +(qemu) quit + +Testing: -blockdev driver=null-co,node-name=null -device virtio-blk-pci,drive=null,id=qdev_id +QEMU X.Y.Z monitor - type 'help' for more information +(qemu) info block +null: null-co:// (null-co) + Attached to: /machine/peripheral/qdev_id/virtio-backend + Cache mode: writeback +(qemu) quit + +Testing: -blockdev driver=null-co,node-name=null -device floppy,drive=null +QEMU X.Y.Z monitor - type 'help' for more information +(qemu) info block +null: null-co:// (null-co) + Attached to: /machine/peripheral-anon/device[1] + Removable device: not locked, tray closed + Cache mode: writeback +(qemu) quit + +Testing: -blockdev driver=null-co,node-name=null -device floppy,drive=null,id=qdev_id +QEMU X.Y.Z monitor - type 'help' for more information +(qemu) info block +null: null-co:// (null-co) + Attached to: qdev_id + Removable device: not locked, tray closed + Cache mode: writeback +(qemu) quit + +Testing: -blockdev driver=null-co,node-name=null -device ide-cd,drive=null +QEMU X.Y.Z monitor - type 'help' for more information +(qemu) info block +null: null-co:// (null-co) + Attached to: /machine/peripheral-anon/device[1] + Removable device: not locked, tray closed + Cache mode: writeback +(qemu) quit + +Testing: -blockdev driver=null-co,node-name=null -device ide-cd,drive=null,id=qdev_id +QEMU X.Y.Z monitor - type 'help' for more information +(qemu) info block +null: null-co:// (null-co) + Attached to: qdev_id + Removable device: not locked, tray closed + Cache mode: writeback +(qemu) quit + +Testing: -blockdev driver=null-co,node-name=null -device scsi-cd,drive=null +QEMU X.Y.Z monitor - type 'help' for more information +(qemu) info block +null: null-co:// (null-co) + Attached to: /machine/peripheral-anon/device[1] + Removable device: not locked, tray closed + Cache mode: writeback +(qemu) quit + +Testing: -blockdev driver=null-co,node-name=null -device scsi-cd,drive=null,id=qdev_id +QEMU X.Y.Z monitor - type 'help' for more information +(qemu) info block +null: null-co:// (null-co) + Attached to: qdev_id + Removable device: not locked, tray closed + Cache mode: writeback +(qemu) quit + + +=== -drive if=none/-device= === + +Testing: -drive if=none,driver=null-co,node-name=null -device ide-hd,drive=null,id=qdev_id +QEMU X.Y.Z monitor - type 'help' for more information +(qemu) info block +none0 (null): null-co:// (null-co) + Removable device: not locked, tray closed + Cache mode: writeback + +null: null-co:// (null-co) + Attached to: qdev_id + Cache mode: writeback +(qemu) quit + +Testing: -drive if=none,driver=null-co,node-name=null -device scsi-hd,drive=null,id=qdev_id +QEMU X.Y.Z monitor - type 'help' for more information +(qemu) info block +none0 (null): null-co:// (null-co) + Removable device: not locked, tray closed + Cache mode: writeback + +null: null-co:// (null-co) + Attached to: qdev_id + Cache mode: writeback +(qemu) quit + +Testing: -drive if=none,driver=null-co,node-name=null -device virtio-blk-pci,drive=null,id=qdev_id +QEMU X.Y.Z monitor - type 'help' for more information +(qemu) info block +none0 (null): null-co:// (null-co) + Removable device: not locked, tray closed + Cache mode: writeback + +null: null-co:// (null-co) + Attached to: /machine/peripheral/qdev_id/virtio-backend + Cache mode: writeback +(qemu) quit + +Testing: -drive if=none,driver=null-co,node-name=null -device floppy,drive=null,id=qdev_id +QEMU X.Y.Z monitor - type 'help' for more information +(qemu) info block +none0 (null): null-co:// (null-co) + Removable device: not locked, tray closed + Cache mode: writeback + +null: null-co:// (null-co) + Attached to: qdev_id + Removable device: not locked, tray closed + Cache mode: writeback +(qemu) quit + +Testing: -drive if=none,driver=null-co,node-name=null -device ide-cd,drive=null,id=qdev_id +QEMU X.Y.Z monitor - type 'help' for more information +(qemu) info block +none0 (null): null-co:// (null-co) + Removable device: not locked, tray closed + Cache mode: writeback + +null: null-co:// (null-co) + Attached to: qdev_id + Removable device: not locked, tray closed + Cache mode: writeback +(qemu) quit + +Testing: -drive if=none,driver=null-co,node-name=null -device scsi-cd,drive=null,id=qdev_id +QEMU X.Y.Z monitor - type 'help' for more information +(qemu) info block +none0 (null): null-co:// (null-co) + Removable device: not locked, tray closed + Cache mode: writeback + +null: null-co:// (null-co) + Attached to: qdev_id + Removable device: not locked, tray closed + Cache mode: writeback +(qemu) quit + + +=== -drive if=none/-device= (with medium) === + +Testing: -drive if=none,driver=null-co,node-name=null -device ide-hd,drive=none0 +QEMU X.Y.Z monitor - type 'help' for more information +(qemu) info block +none0 (null): null-co:// (null-co) + Attached to: /machine/peripheral-anon/device[1] + Cache mode: writeback +(qemu) quit + +Testing: -drive if=none,driver=null-co,node-name=null -device ide-hd,drive=none0,id=qdev_id +QEMU X.Y.Z monitor - type 'help' for more information +(qemu) info block +none0 (null): null-co:// (null-co) + Attached to: qdev_id + Cache mode: writeback +(qemu) quit + +Testing: -drive if=none,driver=null-co,node-name=null -device scsi-hd,drive=none0 +QEMU X.Y.Z monitor - type 'help' for more information +(qemu) info block +none0 (null): null-co:// (null-co) + Attached to: /machine/peripheral-anon/device[1] + Cache mode: writeback +(qemu) quit + +Testing: -drive if=none,driver=null-co,node-name=null -device scsi-hd,drive=none0,id=qdev_id +QEMU X.Y.Z monitor - type 'help' for more information +(qemu) info block +none0 (null): null-co:// (null-co) + Attached to: qdev_id + Cache mode: writeback +(qemu) quit + +Testing: -drive if=none,driver=null-co,node-name=null -device virtio-blk-pci,drive=none0 +QEMU X.Y.Z monitor - type 'help' for more information +(qemu) info block +none0 (null): null-co:// (null-co) + Attached to: /machine/peripheral-anon/device[1]/virtio-backend + Cache mode: writeback +(qemu) quit + +Testing: -drive if=none,driver=null-co,node-name=null -device virtio-blk-pci,drive=none0,id=qdev_id +QEMU X.Y.Z monitor - type 'help' for more information +(qemu) info block +none0 (null): null-co:// (null-co) + Attached to: /machine/peripheral/qdev_id/virtio-backend + Cache mode: writeback +(qemu) quit + +Testing: -drive if=none,driver=null-co,node-name=null -device floppy,drive=none0 +QEMU X.Y.Z monitor - type 'help' for more information +(qemu) info block +none0 (null): null-co:// (null-co) + Attached to: /machine/peripheral-anon/device[1] + Removable device: not locked, tray closed + Cache mode: writeback +(qemu) quit + +Testing: -drive if=none,driver=null-co,node-name=null -device floppy,drive=none0,id=qdev_id +QEMU X.Y.Z monitor - type 'help' for more information +(qemu) info block +none0 (null): null-co:// (null-co) + Attached to: qdev_id + Removable device: not locked, tray closed + Cache mode: writeback +(qemu) quit + +Testing: -drive if=none,driver=null-co,node-name=null -device ide-cd,drive=none0 +QEMU X.Y.Z monitor - type 'help' for more information +(qemu) info block +none0 (null): null-co:// (null-co) + Attached to: /machine/peripheral-anon/device[1] + Removable device: not locked, tray closed + Cache mode: writeback +(qemu) quit + +Testing: -drive if=none,driver=null-co,node-name=null -device ide-cd,drive=none0,id=qdev_id +QEMU X.Y.Z monitor - type 'help' for more information +(qemu) info block +none0 (null): null-co:// (null-co) + Attached to: qdev_id + Removable device: not locked, tray closed + Cache mode: writeback +(qemu) quit + +Testing: -drive if=none,driver=null-co,node-name=null -device scsi-cd,drive=none0 +QEMU X.Y.Z monitor - type 'help' for more information +(qemu) info block +none0 (null): null-co:// (null-co) + Attached to: /machine/peripheral-anon/device[1] + Removable device: not locked, tray closed + Cache mode: writeback +(qemu) quit + +Testing: -drive if=none,driver=null-co,node-name=null -device scsi-cd,drive=none0,id=qdev_id +QEMU X.Y.Z monitor - type 'help' for more information +(qemu) info block +none0 (null): null-co:// (null-co) + Attached to: qdev_id + Removable device: not locked, tray closed + Cache mode: writeback +(qemu) quit + + +=== -drive if=none/-device= (without medium) === + +Testing: -drive if=none +QEMU X.Y.Z monitor - type 'help' for more information +(qemu) info block +none0: [not inserted] + Removable device: not locked, tray closed +(qemu) quit + +Testing: -drive if=none -device floppy,drive=none0 +QEMU X.Y.Z monitor - type 'help' for more information +(qemu) info block +none0: [not inserted] + Attached to: /machine/peripheral-anon/device[1] + Removable device: not locked, tray closed +(qemu) quit + +Testing: -drive if=none -device floppy,drive=none0,id=qdev_id +QEMU X.Y.Z monitor - type 'help' for more information +(qemu) info block +none0: [not inserted] + Attached to: qdev_id + Removable device: not locked, tray closed +(qemu) quit + +Testing: -drive if=none -device ide-cd,drive=none0 +QEMU X.Y.Z monitor - type 'help' for more information +(qemu) info block +none0: [not inserted] + Attached to: /machine/peripheral-anon/device[1] + Removable device: not locked, tray closed +(qemu) quit + +Testing: -drive if=none -device ide-cd,drive=none0,id=qdev_id +QEMU X.Y.Z monitor - type 'help' for more information +(qemu) info block +none0: [not inserted] + Attached to: qdev_id + Removable device: not locked, tray closed +(qemu) quit + +Testing: -drive if=none -device scsi-cd,drive=none0 +QEMU X.Y.Z monitor - type 'help' for more information +(qemu) info block +none0: [not inserted] + Attached to: /machine/peripheral-anon/device[1] + Removable device: not locked, tray closed +(qemu) quit + +Testing: -drive if=none -device scsi-cd,drive=none0,id=qdev_id +QEMU X.Y.Z monitor - type 'help' for more information +(qemu) info block +none0: [not inserted] + Attached to: qdev_id + Removable device: not locked, tray closed +(qemu) quit + + +=== -drive if=... === + +Testing: -drive if=floppy +QEMU X.Y.Z monitor - type 'help' for more information +(qemu) info block +floppy0: [not inserted] + Attached to: /machine/unattached/device[17] + Removable device: not locked, tray closed +(qemu) quit + +Testing: -drive if=floppy,driver=null-co +QEMU X.Y.Z monitor - type 'help' for more information +(qemu) info block +floppy0 (NODE_NAME): null-co:// (null-co) + Attached to: /machine/unattached/device[17] + Removable device: not locked, tray closed + Cache mode: writeback +(qemu) quit + +Testing: -drive if=ide,driver=null-co +QEMU X.Y.Z monitor - type 'help' for more information +(qemu) info block +ide0-hd0 (NODE_NAME): null-co:// (null-co) + Attached to: /machine/unattached/device[18] + Cache mode: writeback +(qemu) quit + +Testing: -drive if=ide,media=cdrom +QEMU X.Y.Z monitor - type 'help' for more information +(qemu) info block +ide0-cd0: [not inserted] + Attached to: /machine/unattached/device[18] + Removable device: not locked, tray closed +(qemu) quit + +Testing: -drive if=ide,driver=null-co,media=cdrom +QEMU X.Y.Z monitor - type 'help' for more information +(qemu) info block +ide0-cd0 (NODE_NAME): null-co:// (null-co, read-only) + Attached to: /machine/unattached/device[18] + Removable device: not locked, tray closed + Cache mode: writeback +(qemu) quit + +qemu: -drive if=scsi,driver=null-co: warning: bus=0,unit=0 is deprecated with this machine type +Testing: -drive if=scsi,driver=null-co +QEMU X.Y.Z monitor - type 'help' for more information +(qemu) info block +scsi0-hd0 (NODE_NAME): null-co:// (null-co) + Attached to: /machine/unattached/device[27]/scsi.0/legacy[0] + Cache mode: writeback +(qemu) quit + +qemu: -drive if=scsi,media=cdrom: warning: bus=0,unit=0 is deprecated with this machine type +Testing: -drive if=scsi,media=cdrom +QEMU X.Y.Z monitor - type 'help' for more information +(qemu) info block +scsi0-cd0: [not inserted] + Attached to: /machine/unattached/device[27]/scsi.0/legacy[0] + Removable device: not locked, tray closed +(qemu) quit + +qemu: -drive if=scsi,driver=null-co,media=cdrom: warning: bus=0,unit=0 is deprecated with this machine type +Testing: -drive if=scsi,driver=null-co,media=cdrom +QEMU X.Y.Z monitor - type 'help' for more information +(qemu) info block +scsi0-cd0 (NODE_NAME): null-co:// (null-co, read-only) + Attached to: /machine/unattached/device[27]/scsi.0/legacy[0] + Removable device: not locked, tray closed + Cache mode: writeback +(qemu) quit + +Testing: -drive if=virtio,driver=null-co +QEMU X.Y.Z monitor - type 'help' for more information +(qemu) info block +virtio0 (NODE_NAME): null-co:// (null-co) + Attached to: /machine/peripheral-anon/device[1]/virtio-backend + Cache mode: writeback +(qemu) quit + +Testing: -drive if=pflash,driver=null-co,size=1M +QEMU X.Y.Z monitor - type 'help' for more information +(qemu) info block +pflash0 (NODE_NAME): json:{"driver": "null-co", "size": "1M"} (null-co) + Attached to: /machine/unattached/device[2] + Cache mode: writeback +(qemu) quit + +*** done diff --git a/tests/qemu-iotests/group b/tests/qemu-iotests/group index 318ae74..a6c7e1f 100644 --- a/tests/qemu-iotests/group +++ b/tests/qemu-iotests/group @@ -176,3 +176,4 @@ 182 rw auto quick 183 rw auto migration 185 rw auto +186 rw auto