From nobody Sat Feb 7 06:54:13 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1517845353777156.42978008439547; Mon, 5 Feb 2018 07:42:33 -0800 (PST) Received: from localhost ([::1]:54257 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eiiuf-0002KL-0J for importer@patchew.org; Mon, 05 Feb 2018 10:42:33 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42794) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eii5D-0007Ya-0R for qemu-devel@nongnu.org; Mon, 05 Feb 2018 09:49:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eii5B-0000aX-Jd for qemu-devel@nongnu.org; Mon, 05 Feb 2018 09:49:23 -0500 Received: from fanzine.igalia.com ([91.117.99.155]:49518) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eii5B-0000Yo-9v; Mon, 05 Feb 2018 09:49:21 -0500 Received: from [194.100.51.2] (helo=perseus.local) by fanzine.igalia.com with esmtpsa (Cipher TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim) id 1eihqj-0001rv-LM; Mon, 05 Feb 2018 15:34:25 +0100 Received: from berto by perseus.local with local (Exim 4.89) (envelope-from ) id 1eihqK-0008Pa-7L; Mon, 05 Feb 2018 16:34:00 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=References:In-Reply-To:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=mP7HadvWb0hmYvYdBj7hBByvgLGZjyXvUeOpHVp9xJU=; b=AjonJhvCp0NswzxCyglE19hVvFMt0l5dOZr9Isr7U2CO5XcfAz8C4DF8Oef+/jBVm7ICEiGKtTOQWf6AS2Sf5rHW0GyMqHFDh0EPh/JaAVJKzTa/DLg0R66L/MvnMFjGle+yBf/5RiXupdKN/xI9zGuJ1zGnToTPL6sPSaPJXmzoWsELyiT6R5Ccfp3ZrJdR2xioy5zNTa4fU/MHMYCV4ZzOl4Qim5ECVASNp+OnMb3Gq81cFXXg6FxFygPrfrC5X7krBpRawRqnTTsJ3mQZmto6UOnSOpBYEmAfQq180CsSzm3XcwvLvPhnGjAquLYFLf3IC5+1tuYfR9W3j1N17w==; From: Alberto Garcia To: qemu-devel@nongnu.org Date: Mon, 5 Feb 2018 16:33:37 +0200 Message-Id: X-Mailer: git-send-email 2.11.0 In-Reply-To: References: In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] [fuzzy] X-Received-From: 91.117.99.155 Subject: [Qemu-devel] [PATCH v4 37/39] iotests: Test valid values of l2-cache-entry-size 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 , Anton Nefedov , Alberto Garcia , qemu-block@nongnu.org, Max Reitz , "Denis V . Lunev" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The l2-cache-entry-size setting can only contain values that are powers of two between 512 and the cluster size. Signed-off-by: Alberto Garcia Reviewed-by: Eric Blake Reviewed-by: Max Reitz --- tests/qemu-iotests/103 | 17 +++++++++++++++++ tests/qemu-iotests/103.out | 3 +++ 2 files changed, 20 insertions(+) diff --git a/tests/qemu-iotests/103 b/tests/qemu-iotests/103 index d0cfab8844..7a2ca22803 100755 --- a/tests/qemu-iotests/103 +++ b/tests/qemu-iotests/103 @@ -66,6 +66,14 @@ $QEMU_IO -c "open -o cache-size=3D1M,refcount-cache-size= =3D2M $TEST_IMG" 2>&1 \ $QEMU_IO -c "open -o cache-size=3D0,l2-cache-size=3D0,refcount-cache-size= =3D0 $TEST_IMG" \ 2>&1 | _filter_testdir | _filter_imgfmt =20 +# Invalid cache entry sizes +$QEMU_IO -c "open -o l2-cache-entry-size=3D256 $TEST_IMG" \ + 2>&1 | _filter_testdir | _filter_imgfmt +$QEMU_IO -c "open -o l2-cache-entry-size=3D300 $TEST_IMG" \ + 2>&1 | _filter_testdir | _filter_imgfmt +$QEMU_IO -c "open -o l2-cache-entry-size=3D128k $TEST_IMG" \ + 2>&1 | _filter_testdir | _filter_imgfmt + echo echo '=3D=3D=3D Testing valid option combinations =3D=3D=3D' echo @@ -94,6 +102,15 @@ $QEMU_IO -c "open -o l2-cache-size=3D1M,refcount-cache-= size=3D0.25M $TEST_IMG" \ -c 'read -P 42 0 64k' \ | _filter_qemu_io =20 +# Valid cache entry sizes +$QEMU_IO -c "open -o l2-cache-entry-size=3D512 $TEST_IMG" \ + 2>&1 | _filter_testdir | _filter_imgfmt +$QEMU_IO -c "open -o l2-cache-entry-size=3D16k $TEST_IMG" \ + 2>&1 | _filter_testdir | _filter_imgfmt +$QEMU_IO -c "open -o l2-cache-entry-size=3D64k $TEST_IMG" \ + 2>&1 | _filter_testdir | _filter_imgfmt + + echo echo '=3D=3D=3D Testing minimal L2 cache and COW =3D=3D=3D' echo diff --git a/tests/qemu-iotests/103.out b/tests/qemu-iotests/103.out index b7aaadf89a..bd45d3875a 100644 --- a/tests/qemu-iotests/103.out +++ b/tests/qemu-iotests/103.out @@ -9,6 +9,9 @@ can't open device TEST_DIR/t.IMGFMT: cache-size, l2-cache-s= ize and refcount-cach can't open device TEST_DIR/t.IMGFMT: l2-cache-size may not exceed cache-si= ze can't open device TEST_DIR/t.IMGFMT: refcount-cache-size may not exceed ca= che-size can't open device TEST_DIR/t.IMGFMT: cache-size, l2-cache-size and refcoun= t-cache-size may not be set the same time +can't open device TEST_DIR/t.IMGFMT: L2 cache entry size must be a power o= f two between 512 and the cluster size (65536) +can't open device TEST_DIR/t.IMGFMT: L2 cache entry size must be a power o= f two between 512 and the cluster size (65536) +can't open device TEST_DIR/t.IMGFMT: L2 cache entry size must be a power o= f two between 512 and the cluster size (65536) =20 =3D=3D=3D Testing valid option combinations =3D=3D=3D =20 --=20 2.11.0