From nobody Mon Feb 9 02:43:09 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 (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1513343588031586.9043576122407; Fri, 15 Dec 2017 05:13:08 -0800 (PST) Received: from localhost ([::1]:46160 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ePpnR-0000LU-1j for importer@patchew.org; Fri, 15 Dec 2017 08:13:01 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55497) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ePpVG-0000Wm-Rn for qemu-devel@nongnu.org; Fri, 15 Dec 2017 07:54:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ePpVC-0003Io-Rw for qemu-devel@nongnu.org; Fri, 15 Dec 2017 07:54:14 -0500 Received: from fanzine.igalia.com ([91.117.99.155]:48122) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ePpVA-0003Cn-U2; Fri, 15 Dec 2017 07:54:10 -0500 Received: from [192.168.12.179] (helo=perseus.local) by fanzine.igalia.com with esmtpsa (Cipher TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim) id 1ePpV8-00084n-Mt; Fri, 15 Dec 2017 13:54:06 +0100 Received: from berto by perseus.local with local (Exim 4.89) (envelope-from ) id 1ePpV8-0004ES-AI; Fri, 15 Dec 2017 14:54:06 +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=zXsnoeZSzV6L71n95mCAdk7JYTE5JsSqEMQFJVEysHs=; b=BMFrQNygeYZb3y6iSBh5EYHNdZLhTGTlhUXxCiXVYqXpAmrCfSBmoRMYoqWR2k1D/91jeiOdtUSoYcQP3nhqzqStEMd0mR/bLH9hwzaHAQQEZfNyvb63V0i0UJQpn3X7mgWJhEnTpldOn7YfTQV0QK2yZfw/T2p11823nLl69o12eEupWHsRMYmLtXhI9sEmjevW7Hq6X7Vl9B2BVDCT2OK3NsgvNCah+anjQwyT1IX/2Vdq+zw9Y26tnZikAp1B3Sl0alTnLMwcRT3Yf7wcZ+gC1vumc4E2GSPXW0u/dWuINwH1bqbQRbB2a39gh0Twc2ZYSQFrYDGiKu/18r+qzw==; From: Alberto Garcia To: qemu-devel@nongnu.org Date: Fri, 15 Dec 2017 13:54:00 +0100 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 v2 32/32] iotests: Add test for 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 , "Denis V . Lunev" , Alberto Garcia , qemu-block@nongnu.org, Max Reitz 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 --- 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 ecbd8ebd71..6d9aab986b 100755 --- a/tests/qemu-iotests/103 +++ b/tests/qemu-iotests/103 @@ -64,6 +64,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 @@ -92,6 +100,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