From patchwork Fri May 19 09:34:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Nefedov X-Patchwork-Id: 9736799 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 9C0866034C for ; Fri, 19 May 2017 09:41:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9DE05286BE for ; Fri, 19 May 2017 09:41:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 92CC2288F4; Fri, 19 May 2017 09:41:59 +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.8 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID 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 C7719286BE for ; Fri, 19 May 2017 09:41:58 +0000 (UTC) Received: from localhost ([::1]:57496 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dBeQ1-0002kf-Ik for patchwork-qemu-devel@patchwork.kernel.org; Fri, 19 May 2017 05:41:57 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48352) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dBeJm-0006v2-Qk for qemu-devel@nongnu.org; Fri, 19 May 2017 05:35:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dBeJj-0006pk-Gi for qemu-devel@nongnu.org; Fri, 19 May 2017 05:35:30 -0400 Received: from mail-db5eur01on0106.outbound.protection.outlook.com ([104.47.2.106]:27443 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 1dBeJj-0006pK-5q for qemu-devel@nongnu.org; Fri, 19 May 2017 05:35:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=2Ykqb5I4zUzCtBr/p19hhi9EwRzHwGeKM5ugNlACbCs=; b=DQcE4edWlhVNZX30WML6cvzm8pGu74pTj4+1oZc1jDWKO0smEXTCP7m8AWSom1m4xGlQhEBMBS6acoZ4Ji4HA2m0tyzMskb+JApmge2iqGK718hOG+FH/3fk1m4OUjJXwPrb06npJbYI83qbKYPwvq36JMWmOYlJuHkpja1M+xE= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none; nongnu.org; dmarc=none action=none header.from=virtuozzo.com; Received: from xantnef-ws.sw.ru (195.214.232.6) by AM5PR0801MB1988.eurprd08.prod.outlook.com (2603:10a6:203:4b::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1101.14; Fri, 19 May 2017 09:35:24 +0000 From: Anton Nefedov To: Date: Fri, 19 May 2017 12:34:40 +0300 Message-ID: <1495186480-114192-14-git-send-email-anton.nefedov@virtuozzo.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1495186480-114192-1-git-send-email-anton.nefedov@virtuozzo.com> References: <1495186480-114192-1-git-send-email-anton.nefedov@virtuozzo.com> MIME-Version: 1.0 X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: HE1PR09CA0073.eurprd09.prod.outlook.com (2603:10a6:7:3d::17) To AM5PR0801MB1988.eurprd08.prod.outlook.com (2603:10a6:203:4b::15) X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM5PR0801MB1988: X-MS-Office365-Filtering-Correlation-Id: f050cd55-1ead-47d4-c3a3-08d49e9a60b7 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:AM5PR0801MB1988; X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1988; 3:G4CPb+wV7iLoyGAWRMC1wkr73Fj2w1GNdCA7loqddL6AAOL8ZMiCLyTrCwggNXuHRfJkw1/z00nYpZqAL6v4YcCkTNehFvCfCtyibzn1ueljpg4MAVQyLgn+wKMg/IempVzvQAWju17oN6OYdQoYXCa54FOqtCEAw6nMlrP/9iFKQN9Z4Tz6eBiPOF2JR0PBklh29JTAOaFXJparek8COzIKE2amFcAHpnn89KhjX0Ru8ODROVHdLqQ8x4V7uAWj33KjT96zI15k6kqKe+oq4ryg58IFD/gE6OWDXzZzNn6NNVr5rrzQkE2dDhdLmHecqBUmbahi2l0LkckYlY3Oyw==; 25:mjlHivr6/G1IYGfC0XjuAf4ozsJkQ0Dxsshb5y46vnWzpTD0aDLlnd5j/vYUSCve8d/HYGOetljGnbDESTrxldpnZzRhq2zViD9T+sWo2IcskkwbXvxK3XX0iHigJ7rnGeVAhoOuvpesWFyOgMtD0DGc0LhFbDQivrN53tYLj7wKHSlS2Ml2B1YTpc4MY2moVKqHPCT/d3inLEflcrCHcYk/3ey5GPR63L4ttJZljp/kAC/T6/Ir2H1+8OK+pundBufKktwQiqPTUaSibBLhHO3oqkirxtpWSdKfO27dyzQV88juCxzfm4zHKpemFXgnPsyKktWXFYuSYrwFUupj91xqHzaCF5DUoE+4RTYr5mWFaMKCttw1QyByjInyGu8/T6zcqXd6eX0UbJA4wMhIOmbrhPPd7yEI8DWNtOWzmDw9YckhQK0cGQdiP8Gxi869ZQEIZypuFeHbCrfG6M2701l0Td9x7LGutqjVxQxxbr0= X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1988; 31:Drq1UmseHnbPjZws68wCHuKRwb9NE2Cw0F4lwEjsVmCRWXCY7LsfGqAh1m97LOhW930d8ZEjB5H+dZR5AyDXp3jarWtj2H5ciCkz+SQ9Q50oCIUMS29I1pw33VkFMENf3kisLZPu557Nmcaaft6rU8PYqIfvpTVOKHZGsE0lFgRGLDsIaorHcttKPDomLvQzd9DTZ1C9MNEs1Vq2X2qGcAM2algyB0gdrd8IbPL2+RM=; 20:V4Hs0IiZcsp9XJ6NbPWnUOs14qs7KzEsZ+Z2Ts91IFvoZny7xXZry6KX4HIed0Ybyh/enslUeCTsnSvarpcBJ/Qhq42ONKMU6FpjtGNm9MVfOVGB9W2OWFRbWOKub6JLnYCP5laYs/mrIVcFuGRHGvBZhQXH8iwYw9qMgYMK9mhXsoHRGyBmCHNHHbJeJnUKqFaO3nROPE6rSHsjU68ykMcpJE22rUpuoVapDOybG5M+tNcgrW6sh6C0JVB06aBQIVmDkWfipVE8mMuiT194vMO4uadCMqdKEw09DrQy8ReCPEhm6Oofj9+eCstohGyyHiPLte99n163B2L0UxdcMW0HAn+wCxbjoLHLD96ZWmJdGESSxQ6cDd2ExYVmaNMm4iK/1fUCrGgP37ZOY8TEE2ZbY8pN4s8GyAsVO1JWPVs= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(5005006)(8121501046)(3002001)(93006095)(93001095)(10201501046)(6041248)(20161123555025)(20161123558100)(20161123562025)(20161123564025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148); SRVR:AM5PR0801MB1988; BCL:0; PCL:0; RULEID:; SRVR:AM5PR0801MB1988; X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1988; 4:tS5olVuBhHRumR18rAF/uzuGJbkz5/jzRhZ8x43LzQzVrSTpvlF6GJWJjake1vCwYDh/3cchGvxYO8z8yWii4QlLPBepdGXeIUuTv7m0WQ81P35iQcnFEFAmIVLMV/21Cz4HKdVB708dc2StcaYm647cJtXUyO0zMeNqvKdcqSBsySVkDhIdSzXhgOl7v+kirkLtMfPdzmjyld0SLeMjSjHdQunCSP9XXRCMyi/tK7mIjn8EUubnBR5zC4AovfierBvEcp1u0mHooIX9YtrF0GHgl6dI5jP6LlElU1TYV9MFhOJHgAcsDAKGEzKjJEiYoBeKH0dgYooY9aNVCRmVnRfpridLngvVE3CAQpJUGmmWv56ed9ClkrwDXagkY4eCw26rOqadmS8AeJXS+2rAJ/petYsRj85p6lJlB5jtcOpgf7qfN3AF4BzoTdOkIm9Ij3gApMkFB1D0PK528mbLtWkuTL/2BSqLVNWeHho+kNMp1ECkArscK1MAQzn1yC1bBu6agcxtg8aSgjPG0MtO481DVaYVle4SU3cKQLavBqs8w5A19D/8v1hgf973CcXw0OygpU2+6aT0w2QVsLR5ASo4EYM0e+WnnSzJk1dZosbrdTp4tJd3i0/xtc1X/yAnt6zXYO9tk9G9XIZSD8MN8fqQRSszwXKmyr2cGmaFO8AtIK4kyRBGtqpxeogmXC13zww9SmpW8u513BFgulZshdzNXLEmz/QedhOZtMx1yYuEIPZrdPsfC0fJBDtDCiyIFeaQoA7YLlIIwTIxbjt16qtyLI6gUM6LQpdOlzvVFbE= X-Forefront-PRVS: 031257FE13 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(39450400003)(39840400002)(39410400002)(39400400002)(48376002)(8676002)(7736002)(81166006)(53416004)(305945005)(50226002)(33646002)(5003940100001)(42186005)(3846002)(4326008)(25786009)(66066001)(189998001)(50466002)(2351001)(2906002)(478600001)(6486002)(6506006)(50986999)(6512007)(54906002)(36756003)(5660300001)(86362001)(53936002)(2950100002)(110136004)(6666003)(6916009)(107886003)(38730400002)(76176999)(21314002); DIR:OUT; SFP:1102; SCL:1; SRVR:AM5PR0801MB1988; H:xantnef-ws.sw.ru; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; A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iieJKGZOs0RMyY/9Vo= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1988; 7:CxDbMCg3NhmhcKGaUSKmO/hCuP6XSAIxbC8LOQbT+hKNs2cq1xFwN63+Lf+ZAeS6yUFIoKq0uXcyXK4tH9TEYfBTek7IqRQ8p6EBGkBYDFf2L6nNlA/TiGJdLGaeclpNfpdQsKzWsz8K0337z0HfUuvMbgAbqjOE8VuSMfae6NaYyK/YsBJzsb442YMG0K9wfvPFEdN6OOWG6D5tAOM2KeKffRxHSugUg7wmTUxk793FX8ENUAMw+GleUO/bCopZgUb2trV6nDG761+jlcSmvBQAtBp+hs8rtirvw2ifHYmQINLpX1j26/CbsirBHAzVlW99fNAxPIoRqYxScf2Slg==; 20:yZ9zfkRDhbqyArpErX6UYyXETmqFzpOo7K9DYZRvQ9MCGNzCKXiB3DNOnqdWMc+WQTDxDIBKTcLna3xrJqre+W5TgX38RzIJBRlsIlo1jv8MG/q9Dy0+q9e1r9uQC13Nqy9p47vFBj/3h2UZ5pp0ZDPLqUju/YCOtwz+QO5CbHg= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 May 2017 09:35:24.4935 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0801MB1988 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.2.106 Subject: [Qemu-devel] [PATCH v1 13/13] iotest 046: test simultaneous cluster write error case 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, Anton Nefedov , den@virtuozzo.com, mreitz@redhat.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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" <