From patchwork Tue Jul 24 12:17:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leonid Bloch X-Patchwork-Id: 10542193 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BFDC514BC for ; Tue, 24 Jul 2018 13:44:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AF85328916 for ; Tue, 24 Jul 2018 13:44:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A3D9B28926; Tue, 24 Jul 2018 13:44:57 +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=-7.8 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,MAILING_LIST_MULTI,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 79F2528916 for ; Tue, 24 Jul 2018 13:44:56 +0000 (UTC) Received: from localhost ([::1]:40633 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fhxcV-0004Te-Ka for patchwork-qemu-devel@patchwork.kernel.org; Tue, 24 Jul 2018 09:44:55 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35810) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fhwH2-00057w-QK for qemu-devel@nongnu.org; Tue, 24 Jul 2018 08:18:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fhwGz-0006Ld-Ko for qemu-devel@nongnu.org; Tue, 24 Jul 2018 08:18:40 -0400 Received: from mail-eopbgr690118.outbound.protection.outlook.com ([40.107.69.118]:45463 helo=NAM04-CO1-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 1fhwGz-0006Ku-BZ; Tue, 24 Jul 2018 08:18:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janustech.onmicrosoft.com; s=selector1-janustech-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=IdSW7MLN2Y3q6qpEN6LvZ6BLhl6eqTS69dRr2zLeLD0=; b=prZyRnFsg/Y2jfTavz5a/TkrGXnje4KyCau3K6h/KtuO83+jIFixpSwfdlCSuqaS6HhuYoSPLUoPQDIYinZho0NsEquWz7/afiGINM6VH/Oh9BoAqkjVSfueXBheNl/beEIfqfoY2kC7fb1q5pq8KKH8u1eH2OD5n8EmWQzU7jo= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=lbloch@janustech.com; Received: from Jupiter.local (141.226.29.227) by CO2PR07MB2614.namprd07.prod.outlook.com (2603:10b6:102:14::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.973.20; Tue, 24 Jul 2018 12:18:33 +0000 From: Leonid Bloch To: qemu-devel@nongnu.org Date: Tue, 24 Jul 2018 15:17:53 +0300 Message-Id: <20180724121753.5753-5-lbloch@janustech.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180724121753.5753-1-lbloch@janustech.com> References: <20180724121753.5753-1-lbloch@janustech.com> MIME-Version: 1.0 X-Originating-IP: [141.226.29.227] X-ClientProxiedBy: DB6PR0202CA0009.eurprd02.prod.outlook.com (2603:10a6:4:29::19) To CO2PR07MB2614.namprd07.prod.outlook.com (2603:10b6:102:14::9) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 40cfac6e-6bdd-4fe4-9104-08d5f15f940c X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(7021125)(8989117)(5600073)(711020)(4534165)(7022125)(4603075)(4627221)(201702281549075)(8990107)(7048125)(7024125)(7027125)(7028125)(7023125)(2017052603328)(7153060)(7193020); SRVR:CO2PR07MB2614; X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB2614; 3:owRPlYQC3tedYCo2kEKwxx68kbjwBWR4f3mnBEu3htYUFm+wBjo8QFeb7dIRt668S2Ciku+m4iQ53r1MsvI1eKu9PZWc3HCdYJhi9oDtP9aKqlcENXDgOyK9uFn942ZRc3Xw+jik7GNhB5TiCwE2PPxx9x2fFgro383z8eGxA91CVbfwnuiEjzi+f25T3zNww5MWnenmzBKu6L+ZaVSseXQSrTz9trzGdLgmiAzOSgHIs+c9oiCJ4r/L02OL8PWO; 25:LNDMGTaFy/c4Vw4XeiYxN7E+2tmMEQnhshI2HNbhuHZ9rt4FFRwosyWDV6eNqrKIIT02YD8nbMO+LZaC6dQIMpwuNrQZtEGXhaz/BVlY7cY1EBW4E1MWt/BGpEHHlJH/Son+/RbuxXGrorMJxqYCKrvwDljQFvWAl/4noxZdFvEsG7YiWrP4NCTB8TJdL9AGz4BvOy8h73EDu92OsOmOQroHwoa8qTz6PJiT628yzSBP5kckHaOKZfiOMFVw2qyOEmeC3WRLK4OreqDOg2CKuQZ2MSRoMH6Vf1h5AVYLWnPEOuxyYhrA0pehtpyeXeAlHw8X5g/qEL8BbRDxKrnEMA==; 31:gHFGOTYoro3hX+Z/vY/btNkaVm035jd7PHniKZSW2qduxUdEVdRDanO3N1Q7y5AAOIs/Np9Jg2bKA7apbjcf9OBpTiXVwzcbN/2+nb3Z7k/B5vBbXJUVoLdQ6C0VkIShi46mgp7Q4XcGH5/5b9SwkwOwJ+7S1Ynz7gZehioaIUnunTekrfEkVWQOG+8GOStHc0NzQSXjtl9ifaAPy/X7TTWL5upk6TkhNuV2CMbKVEQ= X-MS-TrafficTypeDiagnostic: CO2PR07MB2614: X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(5005006)(8121501046)(10201501046)(3002001)(93006095)(93001095)(3231311)(944501410)(52105095)(149027)(150027)(6041310)(20161123562045)(20161123558120)(20161123564045)(20161123560045)(2016111802025)(6072148)(6043046)(201708071742011)(7699016); SRVR:CO2PR07MB2614; BCL:0; PCL:0; RULEID:; SRVR:CO2PR07MB2614; X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB2614; 4:soEUHkJC2Ai1gXyWl8xHco2hWpbpJRODsY87Dl92VyUqu2ZmUCtzEI7i8X18d7ZVm38Bq3WJ0QcMpTOaDTH3pYo6+BTDY6YB/At9+hOkx2GEbXamBZ01ShTmfxSwzpgCD7YztzMWjWLJpCUki7xtrfytQ9k+0N/3Eek3Tdtss2GaWS9m+D18c7kg19PVxoRI8pxBD5NyX9xvkp6hkth4+62nxwWagYfJpjE6G19HoWOd+f8b89qV14VMIZZHpcE0Fh31Hx5xB13iatx/M24HCw== X-Forefront-PRVS: 0743E8D0A6 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(136003)(366004)(376002)(346002)(396003)(39830400003)(199004)(189003)(6506007)(66066001)(6116002)(6666003)(86362001)(6916009)(2616005)(476003)(956004)(52116002)(47776003)(2351001)(3846002)(6512007)(478600001)(2361001)(5660300001)(316002)(106356001)(76176011)(16586007)(105586002)(50226002)(25786009)(4326008)(11346002)(54906003)(446003)(68736007)(51416003)(1076002)(7736002)(36756003)(48376002)(53936002)(305945005)(16526019)(2906002)(186003)(8936002)(50466002)(6486002)(97736004)(26005)(14444005)(81156014)(81166006)(8676002)(486006)(386003); DIR:OUT; SFP:1102; SCL:1; SRVR:CO2PR07MB2614; H:Jupiter.local; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: janustech.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CO2PR07MB2614; 23:/Mbj35sJHgUkjL/jQr+elPHuCYDAQKVV+VvY5NTlO?= j8QIbvpZT/Q/wMfY5CfzWfSJRNFveV0Pf7vp1yXUo835Zs2ljxrljcJNPNVtOBfPqJbUHC4Fol/fC7BHYGz5GbfgbHGXY1P/NaTRkvjrHJz0UppeeYbQfe7wGpl+DOzFROwgXUIwlnwsjixXxgySKfKbGgo10wQSArEqLkURdBHmk0GbMSF/7R78b3BRL1n3EjkTENxujJy0nC+j8HCD3r5PWDpSHGrL0FExSyo2EUCxOefenH1aLyR8XacIPVEaC9xNVl57XXVqghCKnx2ltjIbIwiqtrK2l1xWC0KAL/qB7Qfd7XyR4DZOmM+wI5X5u+zX6Wb9vxoJ6bNJOO8MV7LYawvQP46/9tfN0hV/sbsoGOI9JYv2hyFVK6s00Wg4N+GhzrdMcJXIijGLWA42AP2GrdZg+mhrF1h4pU1rtJbA+4bmlc1d3edyZyhAKZZ8j6wk04TlfyVGPxiDoepZKVGFyfPtzIuXN0WvQfqRJsjPyTkU1cAF/tDblTOYEuIvmeVWqPEaCboGzUyGbkF9hgptw9VcRHasYUgLGFmkHa1BBU4aGrU2GoCROJ/FsyVX2LwlIQ0mxYjFAspvRl7Zb2GuWAdPYWhcYQtCkEkNLBMxmm33oLede115f26IOVv/7D/jvQc9WR/GkLojFr0T3zLxe1ljLQiDnQ131qUNesLcDzLwY6hZA+J2s/O0nQ8qcXOhqBf43XwTB5skh+WNBqbFOjYeQzvX1Al4+8JdIivQqW61Cx4OT7YICw9UCObbq+Gl++Qp3BCBlVCkmqbF6U0f3/t6sY/po+PfJx61WSyzk8cOa6ffRS9FKs2JUR7TEUsmaulHl1yzf935PR8bow2EhSjpg4JQhh4U5SzE6CDbHf6SGwR1qt9+f8D9mph1nkCEM4NAmxWNj9BIKY96PwlU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daeeYtGEgR12Bi6yQ9W8KWjNJybAmtOmE6Gxd4RzBGgAqVLaNfGvfHA+p9jkc/b/TZFaTHMxYON/ydtqJUQ5kR/Xgl5Q7FT3ZL2UVdieuc3NhiAfTVU8KWzNqrPwIqIMyLupXB6qdW2PBuEQ==; 5:O0T3bnUGcljLHcbappMIU/DYmH+VBIaBlRQ3H1LORy6YvDZ6Pcl04DIHniQr2CGXTvLO3qXd1vvrDcUjoaoIvjsmjg4QHbl+H1xbfVUBhL/JgmvpNN2peTsPnYhXPdzp2mwSF+HCzzmzLayhwiRphRpXc+Oy2j1C0hzvUWi2rEE=; 7:iNaBr2BVzwKGoWh4jDgRPeUFrQGX4fhMRqWjSfURSpG5tp2XpsEXINgtUpqp2xLoaREu4W5EKY+idOn02mfAYKWi1zf5QtQQ1iEr0Hyt7EcuFaYZUBwXqou5cCXCEbu3+alpeOfh448LjLDdIRthBq5ljPgJehgtIUPCmlUM22jjaFZqgYrPjt+GXsw6jQdWjUn96P1/bhisF2XD0ZnaI72SXWuz7go5x2P8ho+qA3WCoIuLztaeL5LoIZuKmU/v SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: janustech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jul 2018 12:18:33.3019 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 40cfac6e-6bdd-4fe4-9104-08d5f15f940c X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 34eb020e-3cf3-43a1-afeb-f5cf1310628e X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO2PR07MB2614 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 40.107.69.118 X-Mailman-Approved-At: Tue, 24 Jul 2018 09:40:43 -0400 Subject: [Qemu-devel] [PATCH 4/4] iotests: Add tests for the new l2-cache-full option 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: Kevin Wolf , qemu-block@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP This patch adds tests for the l2-cache-full option, and also intcoduces a small change due to a grammar fix in block/qcow2.c Signed-off-by: Leonid Bloch --- tests/qemu-iotests/103 | 6 ++++++ tests/qemu-iotests/103.out | 4 +++- tests/qemu-iotests/137 | 2 ++ tests/qemu-iotests/137.out | 4 +++- 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/103 b/tests/qemu-iotests/103 index 2841318492..a2886e8569 100755 --- a/tests/qemu-iotests/103 +++ b/tests/qemu-iotests/103 @@ -52,9 +52,15 @@ echo echo '=== Testing invalid option combinations ===' echo +# l2-cache-size and l2-cache-full at the same time +$QEMU_IO -c "open -o l2-cache-full,l2-cache-size=1M $TEST_IMG" 2>&1 | + _filter_testdir | _filter_imgfmt # all sizes set at the same time $QEMU_IO -c "open -o cache-size=1.25M,l2-cache-size=1M,refcount-cache-size=0.25M $TEST_IMG" \ 2>&1 | _filter_testdir | _filter_imgfmt +# cache-size may not be smaller than the full L2 size if l2-cache-full is used +$QEMU_IO -c "open -o l2-cache-full,cache-size=6K $TEST_IMG" 2>&1 | + _filter_testdir | _filter_imgfmt # l2-cache-size may not exceed cache-size $QEMU_IO -c "open -o cache-size=1M,l2-cache-size=2M $TEST_IMG" 2>&1 \ | _filter_testdir | _filter_imgfmt diff --git a/tests/qemu-iotests/103.out b/tests/qemu-iotests/103.out index bd45d3875a..92afbff024 100644 --- a/tests/qemu-iotests/103.out +++ b/tests/qemu-iotests/103.out @@ -5,7 +5,9 @@ wrote 65536/65536 bytes at offset 0 === Testing invalid option combinations === -can't open device TEST_DIR/t.IMGFMT: cache-size, l2-cache-size and refcount-cache-size may not be set the same time +can't open device TEST_DIR/t.IMGFMT: l2-cache-full and l2-cache-size may not be set at the same time +can't open device TEST_DIR/t.IMGFMT: cache-size, l2-cache-size and refcount-cache-size may not be set at the same time +can't open device TEST_DIR/t.IMGFMT: cache-size must be greater than the full L2 cache if l2-cache-full is used can't open device TEST_DIR/t.IMGFMT: l2-cache-size may not exceed cache-size can't open device TEST_DIR/t.IMGFMT: refcount-cache-size may not exceed cache-size can't open device TEST_DIR/t.IMGFMT: cache-size, l2-cache-size and refcount-cache-size may not be set the same time diff --git a/tests/qemu-iotests/137 b/tests/qemu-iotests/137 index 87965625d8..f460b5bfe1 100755 --- a/tests/qemu-iotests/137 +++ b/tests/qemu-iotests/137 @@ -106,7 +106,9 @@ echo $QEMU_IO \ -c "reopen -o lazy-refcounts=42" \ + -c "reopen -o l2-cache-full,l2-cache-size=64k" \ -c "reopen -o cache-size=1M,l2-cache-size=64k,refcount-cache-size=64k" \ + -c "reopen -o l2-cache-full,cache-size=6K" \ -c "reopen -o cache-size=1M,l2-cache-size=2M" \ -c "reopen -o cache-size=1M,refcount-cache-size=2M" \ -c "reopen -o l2-cache-size=256T" \ diff --git a/tests/qemu-iotests/137.out b/tests/qemu-iotests/137.out index 96724a6c33..b15dfc391a 100644 --- a/tests/qemu-iotests/137.out +++ b/tests/qemu-iotests/137.out @@ -16,7 +16,9 @@ read 33554432/33554432 bytes at offset 0 === Try setting some invalid values === Parameter 'lazy-refcounts' expects 'on' or 'off' -cache-size, l2-cache-size and refcount-cache-size may not be set the same time +l2-cache-full and l2-cache-size may not be set at the same time +cache-size, l2-cache-size and refcount-cache-size may not be set at the same time +cache-size must be greater than the full L2 cache if l2-cache-full is used l2-cache-size may not exceed cache-size refcount-cache-size may not exceed cache-size L2 cache size too big