From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51722) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dGRom-0000T5-Cn for qemu-devel@nongnu.org; Thu, 01 Jun 2017 11:15:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dGRok-0004o4-Ek for qemu-devel@nongnu.org; Thu, 01 Jun 2017 11:15:20 -0400 Received: from mail-db5eur01on0122.outbound.protection.outlook.com ([104.47.2.122]:10425 helo=EUR01-DB5-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dGRok-0004n4-5r for qemu-devel@nongnu.org; Thu, 01 Jun 2017 11:15:18 -0400 From: Anton Nefedov Date: Thu, 1 Jun 2017 18:14:33 +0300 Message-ID: <1496330073-51338-16-git-send-email-anton.nefedov@virtuozzo.com> In-Reply-To: <1496330073-51338-1-git-send-email-anton.nefedov@virtuozzo.com> References: <1496330073-51338-1-git-send-email-anton.nefedov@virtuozzo.com> MIME-Version: 1.0 Content-Type: text/plain Subject: [Qemu-devel] [PATCH v2 15/15] iotest 046: test simultaneous cluster write error case List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: den@virtuozzo.com, kwolf@redhat.com, mreitz@redhat.com, eblake@redhat.com, Anton Nefedov Signed-off-by: Anton Nefedov --- tests/qemu-iotests/046 | 38 +++++++++++++++++++++++++++++++++++++- tests/qemu-iotests/046.out | 23 +++++++++++++++++++++++ 2 files changed, 60 insertions(+), 1 deletion(-) diff --git a/tests/qemu-iotests/046 b/tests/qemu-iotests/046 index f2ebecf..c210b55 100755 --- a/tests/qemu-iotests/046 +++ b/tests/qemu-iotests/046 @@ -29,7 +29,8 @@ status=1 # failure is the default! _cleanup() { - _cleanup_test_img + _cleanup_test_img + rm "$TEST_DIR/blkdebug.conf" } trap "_cleanup; exit \$status" 0 1 2 3 15 @@ -188,6 +189,37 @@ overlay_io | $QEMU_IO blkdebug::"$TEST_IMG" | _filter_qemu_io |\ sed -e 's/bytes at offset [0-9]*/bytes at offset XXX/g' echo +echo "== Concurrency error case ==" + +# 1. 1st request allocated the cluster, stop before it writes and updates L2 +# 2. 2nd request starts at the same cluster must complete write and start +# waiting for the 1st to update L2 +# 3. Resume the 1st request to make it fail (injected error) +# 4. 2nd request must wake and fail as well +# 1 cluster will end up leaked +cat > "$TEST_DIR/blkdebug.conf" <