Received: from eggs.gnu.org ([2001:4830:134:3::10]:60187) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XZ39H-0002Pf-T1 for qemu-devel@nongnu.org; Tue, 30 Sep 2014 15:31:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XZ39C-0002cH-EB for qemu-devel@nongnu.org; Tue, 30 Sep 2014 15:31:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60405) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XZ39C-0002c6-33 for qemu-devel@nongnu.org; Tue, 30 Sep 2014 15:31:42 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s8UJVfmK029616 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Tue, 30 Sep 2014 15:31:41 -0400 From: Max Reitz Date: Tue, 30 Sep 2014 21:31:29 +0200 Message-Id: <1412105489-7681-4-git-send-email-mreitz@redhat.com> In-Reply-To: <1412105489-7681-1-git-send-email-mreitz@redhat.com> References: <1412105489-7681-1-git-send-email-mreitz@redhat.com> Subject: [Qemu-devel] [PATCH 3/3] iotests: qemu-img info output for corrupt image List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , Jeff Cody , Stefan Hajnoczi , Max Reitz The "corrupt" entry in the format-specific information section should be "true". Signed-off-by: Max Reitz --- tests/qemu-iotests/060 | 3 +++ tests/qemu-iotests/060.out | 9 +++++++++ 2 files changed, 12 insertions(+) diff --git a/tests/qemu-iotests/060 b/tests/qemu-iotests/060 index 2355567..9772d36 100755 --- a/tests/qemu-iotests/060 +++ b/tests/qemu-iotests/060 @@ -76,6 +76,9 @@ $QEMU_IO -c "$OPEN_RW" -c "write -P 0x2a 0 512" | _filter_qemu_io # The corrupt bit must now be set $PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features +# This information should be available through qemu-img info +$QEMU_IMG info "$TEST_IMG" | _filter_testdir + # Try to open the image R/W (which should fail) $QEMU_IO -c "$OPEN_RW" -c "read 0 512" 2>&1 | _filter_qemu_io \ | _filter_testdir \ diff --git a/tests/qemu-iotests/060.out b/tests/qemu-iotests/060.out index 4f0c6d0..cd679f9 100644 --- a/tests/qemu-iotests/060.out +++ b/tests/qemu-iotests/060.out @@ -11,6 +11,15 @@ incompatible_features 0x0 qcow2: Marking image as corrupt: Preventing invalid write on metadata (overlaps with active L1 table); further corruption events will be suppressed write failed: Input/output error incompatible_features 0x2 +image: TEST_DIR/t.qcow2 +file format: qcow2 +virtual size: 64M (67108864 bytes) +disk size: 196K +cluster_size: 65536 +Format specific information: + compat: 1.1 + lazy refcounts: false + corrupt: true qemu-io: can't open device TEST_DIR/t.IMGFMT: IMGFMT: Image is corrupt; cannot be opened read/write read 512/512 bytes at offset 0 512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -- 2.1.1