From patchwork Wed Jul 25 14:27:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leonid Bloch X-Patchwork-Id: 10544101 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 231DF112B for ; Wed, 25 Jul 2018 14:30:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 12E792A1E8 for ; Wed, 25 Jul 2018 14:30:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 101362A1EA; Wed, 25 Jul 2018 14:30:39 +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 DDDEC2A214 for ; Wed, 25 Jul 2018 14:30:37 +0000 (UTC) Received: from localhost ([::1]:51537 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fiKoH-00076V-2i for patchwork-qemu-devel@patchwork.kernel.org; Wed, 25 Jul 2018 10:30:37 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47547) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fiKmQ-0005Bb-Mb for qemu-devel@nongnu.org; Wed, 25 Jul 2018 10:28:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fiKmN-0000Jj-MZ for qemu-devel@nongnu.org; Wed, 25 Jul 2018 10:28:42 -0400 Received: from mail-eopbgr700117.outbound.protection.outlook.com ([40.107.70.117]:60081 helo=NAM04-SN1-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 1fiKmN-0000IV-El; Wed, 25 Jul 2018 10:28:39 -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=xOmLUXRUR3DiOVAuBBm7cklLyYZb7zlWNnSnTyrPPWQ=; b=P5KbBWT6hR3GLnq6pFnt1NmJP7wVfhQ0cR3iHFx5+GMUCGSa7+VwIaTU8J6Nc8ZSM2NlYiRFqjqmV9FzjW7a77nHIB2/13yJymH+NgsPvwBXwX3wIqh7YUgmIAIJNrTF+bvz3fszLB7AlT5vcPVEMH19s37ixhz8qjhfj0oNOks= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=lbloch@janustech.com; Received: from Jupiter.local (141.226.29.227) by SN2PR07MB2622.namprd07.prod.outlook.com (2603:10b6:804:8::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.995.16; Wed, 25 Jul 2018 14:28:35 +0000 From: Leonid Bloch To: qemu-devel@nongnu.org Date: Wed, 25 Jul 2018 17:27:58 +0300 Message-Id: <20180725142758.9980-5-lbloch@janustech.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180725142758.9980-1-lbloch@janustech.com> References: <20180725142758.9980-1-lbloch@janustech.com> MIME-Version: 1.0 X-Originating-IP: [141.226.29.227] X-ClientProxiedBy: HE1PR05CA0386.eurprd05.prod.outlook.com (2603:10a6:7:94::45) To SN2PR07MB2622.namprd07.prod.outlook.com (2603:10b6:804:8::6) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9aefd588-cc95-41f6-292d-08d5f23ae90c 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:SN2PR07MB2622; X-Microsoft-Exchange-Diagnostics: 1; SN2PR07MB2622; 3:Ro4Oi+0ftBx3DO3fSv9XK58RBjOcONDNLgWpcSmWasbp/TCeND2ROxy0Wl8jDuNSxsZISQgbH4Q6vUgqE2oKP5VZwaeBWzKNqhqvP9DvV1eJtoXxIftc7+0tCGIQDZ+t3VhzNJXC55hkQnyEZ5byjWDi7RcUCmWQH46Ao25xbQyN5GHeYDMJ4KVetIIaxftdHaWnOkm1S5kOAg9GCWxaaEVPIKcRNC4JXHmvBlaSKnh0wFNjtsIOUXugsfOTILYU; 25:LXBRFG2Wi61z64+NS17q2MFP/RVjiCHqUb7mtZJwCNlisyENzHapfgZiAti4bpVt2alIWXgknCS69p6N/Kpy3Qs5yq+RhXryjKGH2zV/VGk4T2PYPKsxnyPjr8DFZ7jAfg7HKY0ktPfobQ0u0O0rPc5X2GoHAyeQN6gtuzPpVUVNb6INhgJ1dGmQ+NJ0Oy6Fb9Xz6oCeYLi/lxziyVoymCDjZU3nOycBNbgMSWC5MFFAh9Gl9SDrrRM5LVArCFtyNWAhZElJQbp+T3Zzd/dLq325nwrXaVb+qzhz74pAl7Yob0DhhjAnD5DL2fi5z9ut473VvwU6z4Uowf39kQO1xw==; 31:qp1WTjhQJt5cfMfF339Nx8EfLWeIwPLZuDkNnNeEzA1nNc1hO50mCxNwyvXT7OtYADseX9AsWzuPZzj3QcIDE5TV82cFgxDZTldC0NXd7Rem+1MgevwzRVmXUhSd3R7cEUZ4doeYxK4cHUzNQQ78xCTl1z+9uNgVnDVgZONHBD9zXFhcMyjboW4obbqZQMvPzjIPncKy40k9Cp+4AV0+j8PXiqvnby13xkrjAld0NzE= X-MS-TrafficTypeDiagnostic: SN2PR07MB2622: 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)(8121501046)(5005006)(93006095)(93001095)(3231311)(944501410)(52105095)(10201501046)(3002001)(149027)(150027)(6041310)(20161123560045)(2016111802025)(20161123558120)(20161123562045)(20161123564045)(6072148)(6043046)(201708071742011)(7699016); SRVR:SN2PR07MB2622; BCL:0; PCL:0; RULEID:; SRVR:SN2PR07MB2622; X-Microsoft-Exchange-Diagnostics: 1; SN2PR07MB2622; 4:TTuPRe2CMv1sV0JDt8jxLTUdaWPgFkZkbrPmRccwrnGz5fb+tCoXs7/IqZHlAZkPE3JFlWCNlNsY/4BIDrExb2qx+eL+XTq6/f92xzltXrguzFwP+ufQeP7LFL1nX3Yzl59eJgF9kg2NOsiMegB52HwDxzfpr196Rslcp1GvmNSfdns1CX6s8u940OD+Cwi9lkrp/vlZ1dsarhrbCoLNPih1XhtBVOfgS7LjoVFagkPzj4BeXQBiO0wEh8O97SRqboDDeI0NJZjfeXmEc6rljA== X-Forefront-PRVS: 0744CFB5E8 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(376002)(366004)(346002)(39830400003)(396003)(136003)(189003)(199004)(446003)(11346002)(2616005)(476003)(486006)(54906003)(956004)(316002)(52116002)(51416003)(76176011)(16586007)(1076002)(3846002)(6116002)(2351001)(186003)(16526019)(36756003)(26005)(97736004)(48376002)(106356001)(105586002)(86362001)(8936002)(68736007)(50226002)(53936002)(6512007)(7736002)(6916009)(6666003)(478600001)(6486002)(2361001)(305945005)(25786009)(14444005)(2906002)(386003)(50466002)(6506007)(47776003)(4326008)(8676002)(107886003)(66066001)(5660300001)(81166006)(81156014); DIR:OUT; SFP:1102; SCL:1; SRVR:SN2PR07MB2622; H:Jupiter.local; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: janustech.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN2PR07MB2622; 23:2T6IHSpBNt+coeuU3UMSh2tetZeB4SRnTPeQx5dI0?= a+PloBzpXYAApm1FE+Hm3+A8doyfSxldvFUSZlTpT+jZt2ptqsABMI+K8SKBkKbWrkmFgECDpCtWwnmGM2g5yKnWBmoehgm2ITtWvsJEWwMMamhJMCH1XQImLHP7PAR2iRff8sR782dAnBlXT70VYK/vNyuZgjp1MsUJW1cFpbix7qIImxTEFCdsMg8JxFZ9DuhBsS2CSkkgnMMPgk5I8kPtkPjLm0t9PfwCpwdbRxnvnpKZ9LFtCCbKLHNWSFlmSnXMKSNZ010vbFXpxmOhMYjpfMg5Tvcg0Nhj+D1/LsDf+peixDo3q/+pc72pi0sk4U0rYc7hDaun77S+9v8zI6MLtyxDVotqHOp3/EoO7fS3X6MutzzR2GpWzlpguidBkGxEaO1v57fqtuMTxNGBcyo1gYtbnsbJPlZeZfOcmzFaXDQJutpoN2mDBWLEEzv0rPWcUaEVU7rJBRtE3FkB7NRUsJIA/I4YPbeQjS+dXXUScSZYnmcu6QQ8Z8vns/X2Nyv8a+1E4XXm0UE/xm0CkhZGc7YHuxUmGpBFngt0bNNNekx1f07wZoAIPXJDkCVptN0Yjrtbwy5XoeOvXs/hHh/K1AfKR6vsabyiKStAQfz60TpHZEBfNo5Eu9jNDReQVAJ6iA6vvDBSc/PIGiBfYiOw1G0vYHYEERxojnbfuBhPeQhBHLG+AEIDc3QP4imsIPnFHc9der+3uz/Y0F/Rel0f9iRA1jC7ZXAUt3TvSTfTzTSghKA1NguapFQybDbsSbmzZG0uOoYhZyj19kWizg5sePq7so5tqbX7kES+fqwk+EZW0hiCx7IvIirnsJGiqCgKGNsUXLB2yHuMaBtPi7CZbZ9MTFodHN08TRnGq0h/gm98uXyAV48GgnVHFKFn2ztc0r8TJZ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hbLGv6R9Utoc6yN32KV5xbUTNN4gOJaHjQ4ZLX+govrbECpNTVFkc4VG7XXJu6umdX7zqAOdwUiH7H/bQMe9CTFqkaDlcpgH0qOqcOvrxwkERXww5/kPw0xfCPywxQiSIVf7nUiyLb+wpBHfcYtXBOV+PkGStSllP0gxg==; 5:OqiozGm+NWdddkdR3kTgBkkvS5WvwlBjGo7dNKAKHW2eS4dJD2PeumrW7zqBe2S92CRTKJypbfwVh+YfaLrwZe9lqREZXQ9C24oE01Tqj0rgu/x4EfpebA2OrqGPiGE6RC3G+IVbWb4J+SmPjrH257EQvgeu78ox4zAg8vON9vw=; 7:86iQbCJVrqfjxlLk25X3SrQX9kjwiwpm0E2dUN9sljuwuoZ8c2o0fFkjG/zKuT8MjF86gDvHc4ib+Jz/uwfpAP48teQw8V8/7lDXYZUxxOmFYHH5SxRN2kzMuXBW/lLM0YfK80ZdIKcroN7WiHY49rVZjG8aGGPTvlK3MKbP20tvI1lYdl+AUJHBeiNpb5wTACZFGcDuU2clZCL+3IY0tdyqQdXx8HHItr/kkRIOXLt9p4vK0Ldp9HXBfi20vaf9 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: janustech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jul 2018 14:28:35.5487 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9aefd588-cc95-41f6-292d-08d5f23ae90c X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 34eb020e-3cf3-43a1-afeb-f5cf1310628e X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN2PR07MB2622 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 40.107.70.117 Subject: [Qemu-devel] [PATCH v5 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 , Leonid Bloch , 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 Signed-off-by: Leonid Bloch --- tests/qemu-iotests/103 | 6 ++++++ tests/qemu-iotests/103.out | 2 ++ tests/qemu-iotests/137 | 2 ++ tests/qemu-iotests/137.out | 2 ++ 4 files changed, 12 insertions(+) diff --git a/tests/qemu-iotests/103 b/tests/qemu-iotests/103 index 2841318492..85010c6a6d 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=6 $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 bd9eec3250..f4bac5371b 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: l2-cache-size and l2-cache-full 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 at 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 6a2ffc71fd..1ef10ac554 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' +l2-cache-size and l2-cache-full 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