From patchwork Tue Jul 24 22:17:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leonid Bloch X-Patchwork-Id: 10543251 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 F340D112E for ; Tue, 24 Jul 2018 22:20:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E3975295C6 for ; Tue, 24 Jul 2018 22:20:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D7E7C295D1; Tue, 24 Jul 2018 22:20:29 +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 E3BA1295C6 for ; Tue, 24 Jul 2018 22:20:27 +0000 (UTC) Received: from localhost ([::1]:42804 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fi5fE-0008Di-Rx for patchwork-qemu-devel@patchwork.kernel.org; Tue, 24 Jul 2018 18:20:16 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45252) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fi5do-0006nS-HS for qemu-devel@nongnu.org; Tue, 24 Jul 2018 18:18:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fi5dl-0007Ih-C3 for qemu-devel@nongnu.org; Tue, 24 Jul 2018 18:18:48 -0400 Received: from mail-bn3nam01on0120.outbound.protection.outlook.com ([104.47.33.120]:32563 helo=NAM01-BN3-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 1fi5dl-0007ID-6q; Tue, 24 Jul 2018 18:18:45 -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=a6cuogcFbGuQlyUYFmAgWKFEEuSrvETD+eg9WmE4fYQ=; b=VzbsZCy/k8HTdsyQQlBzzdXuM3BgMTq3iRjc6QysGHjna6dgqRjqtfVqe6VcPG2plR0Tw8Y4SMRwLGVoH+BZbxXJslso/Xxj5BOZapblpFWktXRjmUeTiYsCCr9aJP5PIDOjl7HGW6d3CyL90ldJC95ijeanOgwdqKLF9rC7OiU= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=lbloch@janustech.com; Received: from Jupiter.local (141.226.29.227) by BN3PR07MB2612.namprd07.prod.outlook.com (2a01:111:e400:c5f0::16) 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 22:18:41 +0000 From: Leonid Bloch To: qemu-devel@nongnu.org Date: Wed, 25 Jul 2018 01:17:50 +0300 Message-Id: <20180724221750.16282-5-lbloch@janustech.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180724221750.16282-1-lbloch@janustech.com> References: <20180724221750.16282-1-lbloch@janustech.com> MIME-Version: 1.0 X-Originating-IP: [141.226.29.227] X-ClientProxiedBy: HE1PR05CA0128.eurprd05.prod.outlook.com (2603:10a6:7:28::15) To BN3PR07MB2612.namprd07.prod.outlook.com (2a01:111:e400:c5f0::16) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f0393750-ddd0-453f-df8f-08d5f1b36ae6 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:BN3PR07MB2612; X-Microsoft-Exchange-Diagnostics: 1; BN3PR07MB2612; 3:Z5QqtcHJHnFyEByZJm176f8u5PxX9jiPdItGOXj0+OfWijPqDQj2LrijAVKkb4ctCXQcEoBGPIcRM8Q/tciUeZAvxSawz/MfStW9HUGyAP2FxhX/VRt0eR70dqhNnogJ3+TuqsFC23AlxdNVyTYslGJeLtoCJ+gAwyr/kg2YrOBNjfGXwzk213zAgXvIIbPBhjc4O4otHHM27U84hWfs0lAJHx47BPiLoKRuaAZG/PVyJ39OqJxShJd+tt4TEnxC; 25:IJGJcQE/MC71m2K/w/Urfe2HCevN/Pb1yJrnT0/zfW6p7kHE9j4Ue+A2CXFpqkX2sgvcIstOaXO/D2Pn9O0nCImfg8GgeeQGuy31w0xogNCA4kcnWjZTdmRB3TDNV1gLX3xOFUcQOrtWQhwZDu87HCE3exhTYUsC1a8jKfLgkcIsGhrpMTFtymOt+3zwTEtsUCcf5QzlInioKSJWsR1YbrlMO36V4jS3WjhNbc+NESzHWN1d4ek6+S4zg/uxVh1cgcylQOOUfgM9HqW2BVokH63nbP3FwZYCHtn9ysbU2EEYU1Z2Z5Gb7bE215nBBf7Bu1oZYICBD/JbnkrbEiwysA==; 31:lQOqIUmJXT/YX50wzG3glluaO9FixiP+/TBD+5fAHCFQgOBOvwaujMqlyAKHlJ3mY8OVh+5ydblEkoCMZ2s6RbWWCvp4NBwzl5Je7omhOO2DMCCFH0pjp0qsym6ZUQwzhQKGyZG1FeQEd0oQOie6LU1nSrjHxRBe0pn9pvSkc1WNBHCjd/3j1puWU3vu9ZriVCXdrqJ1jifNsNGxM+fUJxDa9YIaZNAYDwF573HLVt8= X-MS-TrafficTypeDiagnostic: BN3PR07MB2612: 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)(3231311)(944501410)(52105095)(93006095)(93001095)(10201501046)(3002001)(149027)(150027)(6041310)(2016111802025)(20161123560045)(20161123562045)(20161123558120)(20161123564045)(6072148)(6043046)(201708071742011)(7699016); SRVR:BN3PR07MB2612; BCL:0; PCL:0; RULEID:; SRVR:BN3PR07MB2612; X-Microsoft-Exchange-Diagnostics: 1; BN3PR07MB2612; 4:6kZ+Jgw7ynwBI31c2gIwQDk7WQM6Aj8KDp0JEWHOf3BZi4YmpXbpPs2IOq++UNbgAYOJPwvwrqS2DBaEuLnjnjm8732ljksEgXdIn7lyVGX5LLSxiRx/i/yjbDaIruDQ+YLzpQB6W6EKky/9Y3Lcw9bGywSoFl3I5b5EIeSXkVV3f4H/YgqwB9x8CUAtoFP0hLUZTQaHCQ33319IxvGoAiV2+GcWyfmOEU0MHIZZSHGUcNASQWKaj9swYKYm0JHNXieBcDPzlu4oA555sM6BYA== X-Forefront-PRVS: 0743E8D0A6 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(396003)(346002)(39840400004)(366004)(136003)(376002)(199004)(189003)(68736007)(14444005)(3846002)(52116002)(4326008)(51416003)(1076002)(76176011)(2361001)(53936002)(54906003)(5660300001)(25786009)(8676002)(107886003)(2906002)(6486002)(6666003)(6116002)(86362001)(50466002)(48376002)(6916009)(486006)(6512007)(36756003)(2351001)(478600001)(97736004)(66066001)(305945005)(7736002)(2616005)(8936002)(956004)(11346002)(476003)(47776003)(446003)(186003)(16586007)(16526019)(81156014)(26005)(316002)(6506007)(50226002)(106356001)(105586002)(81166006)(386003); DIR:OUT; SFP:1102; SCL:1; SRVR:BN3PR07MB2612; 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; BN3PR07MB2612; 23:rdGZ+dNSnK+qJjWWhoD/QpfvWzDG3Zci8XmJfhY0S?= ufwKrD6lZSyqrfdAawm5qCATklFNoDWlsnMlPPb26NGbEwqVa+6G1U2fR9zm5aK3eNJJa63G8M0Sg8Jj7AGQSjLa/WQE1iulUSVMxix5HUmGcCMno/OCCOwIf5JArDKRkNV6snzSTNQePriiyvh4KsI9VV6P2A/zPBFVO1rIUBwffCal5y17ajx34UNAiBAaq+hPv0gFGPBrHKt4fEkImtKP0QYoAkirJml4J7geeXbbsPZUki2hODtlWdle8ywe7GUsEXybjBCnoNCoUgEG6JiGDGX3fu3GSGuK9UDQXzRzHkvC/6rx1lpDo367odxtAbLf6XbjiGOAyEeBbnNI2UU64w5915rqGBJDxBeA3V7YL9xjnukE//5DPwbcWs+mfU0r3M1rZzZNhALgvfCMQkHDH24CsutSYK1LhuldX4cDMdyYTK8n05NvqvyE5bBti1S5oqGi/Fr6g1k3m2O6aJ71Y/mGvL78UjJwp6V8+K3zL6wip5Ozzbw1dG0jbEpN1j7CiWZGk1HAbOuEbF9G2eAcA7E2/HBGSK9GcSVoJWvlLsKSypke+KAP8qBQP6YjANuUBtFUNKjwIA2UtUoAaVdXNHbB8tcCsc3x2pVVHS35Ea40AsEX3HTT3xR9LixFYlcl1dg+760X2Y/QGI/kn3nUdjPpEzRDN9q20e3n5rVEmT97m0CSj4uqoU4xy5wZ9BJN07pgXenvFYZk4JV5SYc6npeAego/NKSrwlGaJh7sLlgLMeRHfK5xIFfW7IyOXG0u7Vvvah5KSXbV+j24IusQ0SZ0Kc1rzrACSnElXuOxLgtKm9gns09g0jZktOjPpjrHwaREaJH8yUa3EZRPZ1g+QZgW2zRAJDuWD4oGjebRhCHT8pK2kBh7xXfPUyWYvVfcyZiSoduThCzlQZ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U3hVkJCS3ZfF5IQffHfNB6CKbrIaXmmcHYEZZUb7wfQVYr3x68/qMDCBBOfzhBL7KK3wFZz72BBKyXxSvdBbYIeSTT5oGv15ju+h0N6iHCqkuL/ylONBGmJMVCvTuGiAX+7FTJXixjrb+OM9WiQEEQ4H1v7IiM6RmRNqTnM38kQ==; 5:gzFNHONo16aAC9MQyqW0JaNzsR+MFYlR9bvoRrULsJJKLSt5TB6NtbADwLg1mnBAcrvdHt/XKUgYlOBB0GzmTlB6WH6gqCCgJhOt8sW7LYKUEca4Wab5U3+ZmNXHYnSyAV/O8V30h2LZOoIwNWfFsEedfqPrOCFDmLlsXuLNj9w=; 7:hs2kTJWThCSaCn9GNRUfTgml6sbP/ujR2w3asDvN5HIItrg2Sq4k7y7VPh/wg9O+Ip/7TnI1ePr4nEH4NpEynYch26IhJ4a+RYwyMKhPS+h+fMpMwXCMRa2Ra9/wyBpIyxcox/bErWsfun2cRZk8qFNH4TwVnI2rMwdHkx/f1nJjJqGQJ3ztn9rD56MW77HVVL8CyOMQ+DYlO7JjM9CvKrUP0D39ffhathGo03ZfqQbsGcxBlrHsK/7+5kCpL052 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: janustech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jul 2018 22:18:41.7012 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f0393750-ddd0-453f-df8f-08d5f1b36ae6 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 34eb020e-3cf3-43a1-afeb-f5cf1310628e X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR07MB2612 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.33.120 Subject: [Qemu-devel] [PATCH v4 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..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 ab56f03a00..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: 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 6a2ffc71fd..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' +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