From patchwork Fri Oct 11 07:36:26 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Reitz X-Patchwork-Id: 282543 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 6F1CD2C00CC for ; Fri, 11 Oct 2013 18:37:19 +1100 (EST) Received: from localhost ([::1]:52851 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VUXHg-0002aK-Qv for incoming@patchwork.ozlabs.org; Fri, 11 Oct 2013 03:37:16 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50017) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VUXH5-0002FB-N1 for qemu-devel@nongnu.org; Fri, 11 Oct 2013 03:36:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VUXGz-0004Jr-JS for qemu-devel@nongnu.org; Fri, 11 Oct 2013 03:36:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:24636) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VUXGz-0004Jn-Ab for qemu-devel@nongnu.org; Fri, 11 Oct 2013 03:36:33 -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 r9B7aWKM008824 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 11 Oct 2013 03:36:32 -0400 Received: from localhost (dhcp-200-247.str.redhat.com [10.33.200.247]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r9B7aUIZ014612 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Fri, 11 Oct 2013 03:36:31 -0400 From: Max Reitz To: qemu-devel@nongnu.org Date: Fri, 11 Oct 2013 09:36:26 +0200 Message-Id: <1381476986-3032-3-git-send-email-mreitz@redhat.com> In-Reply-To: <1381476986-3032-1-git-send-email-mreitz@redhat.com> References: <1381476986-3032-1-git-send-email-mreitz@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Kevin Wolf , Stefan Hajnoczi , Max Reitz Subject: [Qemu-devel] [PATCH v2 2/2] qemu-iotests: Extend test 026 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Extend test case 026 by an aio_write fail test, which should not result in any leaked clusters. Signed-off-by: Max Reitz --- tests/qemu-iotests/026 | 31 +++++++++++++++++++++++++++++++ tests/qemu-iotests/026.out | 8 ++++++++ tests/qemu-iotests/026.out.nocache | 8 ++++++++ 3 files changed, 47 insertions(+) diff --git a/tests/qemu-iotests/026 b/tests/qemu-iotests/026 index ebe29d0..a9dfe36 100755 --- a/tests/qemu-iotests/026 +++ b/tests/qemu-iotests/026 @@ -193,6 +193,37 @@ done done done +echo +echo === Write leak test === +echo +CLUSTER_SIZE=512 + +for event in write_aio; do +for errno in 28; do +for imm in off; do +for once in on; do + +cat > "$TEST_DIR/blkdebug.conf" <&1 | grep -v "refcount=1 reference=0" + +done +done +done +done + # success, all done echo "*** done" rm -f $seq.full diff --git a/tests/qemu-iotests/026.out b/tests/qemu-iotests/026.out index 1504579..c94daca 100644 --- a/tests/qemu-iotests/026.out +++ b/tests/qemu-iotests/026.out @@ -599,4 +599,12 @@ write failed: No space left on device 96 leaked clusters were found on the image. This means waste of disk space, but no harm to data. + +=== Write leak test === + +Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 + +Event: write_aio; errno: 28; imm: off; once: on +write failed: No space left on device +No errors were found on the image. *** done diff --git a/tests/qemu-iotests/026.out.nocache b/tests/qemu-iotests/026.out.nocache index c9d242e..962bb71 100644 --- a/tests/qemu-iotests/026.out.nocache +++ b/tests/qemu-iotests/026.out.nocache @@ -607,4 +607,12 @@ write failed: No space left on device 96 leaked clusters were found on the image. This means waste of disk space, but no harm to data. + +=== Write leak test === + +Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 + +Event: write_aio; errno: 28; imm: off; once: on +write failed: No space left on device +No errors were found on the image. *** done