From nobody Mon Feb 9 04:14:46 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.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 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1564703443; cv=none; d=zoho.com; s=zohoarc; b=B/8fQG2XsQgaAQ30pxPflrqVhYmND4VPsxvqswXLYmQ8nSQ6FfaThoB2cyiQw837XchNAQVcXa9dllj3O/q+9beFz2gmvsTHiRkZM3yxwOrTkH6u0w35xJLu4CQsVH2tInn9LqV6K2pAI0+T8Dz8tYvsFZGkR5nO0ZDhd+Ute/c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1564703443; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=IkdMZ1ySU5K9IoJU/TAak65ZSyC3YEsojkXSiNxLvTQ=; b=hyer550jP9jVWovs6mGPNLWtJv1aZwKxp8whponZcuz3Uvkfdj/FBjGnfULI3vp26gUOp+9N3oMb/ggSVZrSjqVIPRMrHZzE7yS/dpLOPOy4HAATVhflDdovp0ydZ5XVAAbm94tMTciFoEcpy5DeTRyuIzSVpsSviu6urvJAYio= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1564703443436764.7404310954652; Thu, 1 Aug 2019 16:50:43 -0700 (PDT) Received: from localhost ([::1]:59852 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1htKqI-0004bi-Gf for importer@patchew.org; Thu, 01 Aug 2019 19:50:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:32919) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1htKiY-0007d2-0X for qemu-devel@nongnu.org; Thu, 01 Aug 2019 19:42:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1htKiW-0003gm-I0 for qemu-devel@nongnu.org; Thu, 01 Aug 2019 19:42:41 -0400 Received: from mail-pf1-x433.google.com ([2607:f8b0:4864:20::433]:34160) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1htKiW-0003fp-B5; Thu, 01 Aug 2019 19:42:40 -0400 Received: by mail-pf1-x433.google.com with SMTP id b13so34953780pfo.1; Thu, 01 Aug 2019 16:42:40 -0700 (PDT) Received: from localhost.localdomain ([2402:3a80:572:3de5:765:cb16:92cd:ee3e]) by smtp.gmail.com with ESMTPSA id g18sm117975426pgm.9.2019.08.01.16.42.32 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 01 Aug 2019 16:42:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=IkdMZ1ySU5K9IoJU/TAak65ZSyC3YEsojkXSiNxLvTQ=; b=DyuhMEx8ZfB0/vNvAgyRo5rficWwNFxCStGOnRbdr7MPD228ZwQfaaFGp+f7p7UPjG D5uCqg8+ZflqQkBTSQU3ZnG+0e2DXJOsZKSSLsyVLPGTXh7JhFrrLe8NETjDil9aJE8m S2fdYouXgZ8wXKxPOQsTOPRZnX0VYeppz7dvITKbMAFNtjbDh9apZqe0uqDkDpDl917M /wm9pLX4QipU+uHf87ybiNy3eMJZo3DC2Qoxr5F7aq3Xu4CQ0Aqf0Gcgm8z7XJlLCOW+ 3xeXneQZSLgI8J15vIln/CPwXYR4DchNB6Xrtz8d0d8NyuSxAYvRGXfufdO23EJxtXaV p4yw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=IkdMZ1ySU5K9IoJU/TAak65ZSyC3YEsojkXSiNxLvTQ=; b=dhRmC7Fi1oczKajn5XdcbEnLZsLIdgVztD0oUwLVRc7fWA4hZvDfUabwYMLZ6jVqoY kgCPAl99GfROMdW3xSEs32BjQmNWaNU0p38gNBo3OJdz3g3TGS9J4nboWgh8AdgAEJ5m o5IPp5ho1Q84fBz5k876Fwt1jLeWflpIEfXbs47nuIMnYpoM5ksROGdj309i1KJBhv/r dKbIr2P6XIJZqCX/RnAR90d2tEoj2ZzAmyPm4100lTb3q640/E4l0kgPIUU6+Jrv+gDr paosndXgTv1qnUrGysNn/aLid/MkSpDHYQewH+9DGyd3RFhr0zsWZB2+IzvIFw+O2wpE oyVw== X-Gm-Message-State: APjAAAV29Kd1Mz93GfXCslwN4no65ioDOs+wn+bP3dx/xmF1V3N4yjgU wc9hqm2M5hB7F+eyn+uzpM/pdfCrPPWwgw== X-Google-Smtp-Source: APXvYqzrxcJkyrEvAGW2yBmB4YhwQz5hroDzHegvdTpB5nGuklYb1OETgUY8KUqQV4jxw5UUksrgQw== X-Received: by 2002:a17:90a:f488:: with SMTP id bx8mr1293794pjb.91.1564702958794; Thu, 01 Aug 2019 16:42:38 -0700 (PDT) From: Aarushi Mehta To: qemu-devel@nongnu.org Date: Fri, 2 Aug 2019 05:10:28 +0530 Message-Id: <20190801234031.29561-15-mehta.aaru20@gmail.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190801234031.29561-1-mehta.aaru20@gmail.com> References: <20190801234031.29561-1-mehta.aaru20@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::433 Subject: [Qemu-devel] [PATCH v9 14/17] tests/qemu-iotests: enable testing with aio options X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Maxim Levitsky , Sergio Lopez , qemu-block@nongnu.org, Markus Armbruster , Max Reitz , saket.sinha89@gmail.com, Stefan Hajnoczi , Paolo Bonzini , Fam Zheng , Stefan Hajnoczi , Julia Suvorova , Aarushi Mehta Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Signed-off-by: Aarushi Mehta Reviewed-by: Stefan Hajnoczi --- tests/qemu-iotests/check | 15 ++++++++++++++- tests/qemu-iotests/common.rc | 14 ++++++++++++++ tests/qemu-iotests/iotests.py | 9 ++++++++- 3 files changed, 36 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check index c24874ff4a..1e398923fd 100755 --- a/tests/qemu-iotests/check +++ b/tests/qemu-iotests/check @@ -132,6 +132,7 @@ sortme=3Dfalse expunge=3Dtrue have_test_arg=3Dfalse cachemode=3Dfalse +aiomode=3Dfalse =20 tmp=3D"${TEST_DIR}"/$$ rm -f $tmp.list $tmp.tmp $tmp.sed @@ -141,6 +142,7 @@ export IMGFMT_GENERIC=3Dtrue export IMGPROTO=3Dfile export IMGOPTS=3D"" export CACHEMODE=3D"writeback" +export AIOMODE=3D"threads" export QEMU_IO_OPTIONS=3D"" export QEMU_IO_OPTIONS_NO_FMT=3D"" export CACHEMODE_IS_DEFAULT=3Dtrue @@ -225,6 +227,11 @@ s/ .*//p CACHEMODE_IS_DEFAULT=3Dfalse cachemode=3Dfalse continue + elif $aiomode + then + AIOMODE=3D"$r" + aiomode=3Dfalse + continue fi =20 xpand=3Dtrue @@ -269,6 +276,7 @@ other options -n show me, do not run tests -o options -o options to pass to qemu-img create/convert -c mode cache mode + -i mode AIO mode -makecheck pretty print output for make check =20 testlist options @@ -433,10 +441,13 @@ testlist options cachemode=3Dtrue xpand=3Dfalse ;; + -i) + aiomode=3Dtrue + xpand=3Dfalse + ;; -T) # deprecated timestamp option xpand=3Dfalse ;; - -v) verbose=3Dtrue xpand=3Dfalse @@ -515,6 +526,8 @@ done =20 # Set qemu-io cache mode with $CACHEMODE we have QEMU_IO_OPTIONS=3D"$QEMU_IO_OPTIONS --cache $CACHEMODE" +# Set qemu-io aio mode with $AIOMODE we have +QEMU_IO_OPTIONS=3D"$QEMU_IO_OPTIONS --aio $AIOMODE" =20 QEMU_IO_OPTIONS_NO_FMT=3D"$QEMU_IO_OPTIONS" if [ "$IMGOPTSSYNTAX" !=3D "true" ]; then diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc index 5502c3da2f..03f4a1cd7f 100644 --- a/tests/qemu-iotests/common.rc +++ b/tests/qemu-iotests/common.rc @@ -490,6 +490,20 @@ _default_cache_mode() return fi } +_supported_aio_modes() +{ + for mode; do + if [ "$mode" =3D "$AIOMODE" ]; then + return + fi + done + _notrun "not suitable for aio mode: $AIOMODE" +} +_default_aio_mode() +{ + AIOMODE=3D"$1" + QEMU_IO=3D"$QEMU_IO --aio $1" +} =20 _unsupported_imgopts() { diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index ce74177ab1..76f1ab0945 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -58,6 +58,7 @@ imgproto =3D os.environ.get('IMGPROTO', 'file') test_dir =3D os.environ.get('TEST_DIR') output_dir =3D os.environ.get('OUTPUT_DIR', '.') cachemode =3D os.environ.get('CACHEMODE') +aiomode =3D os.environ.get('AIOMODE') qemu_default_machine =3D os.environ.get('QEMU_DEFAULT_MACHINE') =20 socket_scm_helper =3D os.environ.get('SOCKET_SCM_HELPER', 'socket_scm_help= er') @@ -457,6 +458,7 @@ class VM(qtest.QEMUQtestMachine): options.append('file=3D%s' % path) options.append('format=3D%s' % format) options.append('cache=3D%s' % cachemode) + options.append('aio=3D%s' % aiomode) =20 if opts: options.append(opts) @@ -799,6 +801,10 @@ def verify_cache_mode(supported_cache_modes=3D[]): if supported_cache_modes and (cachemode not in supported_cache_modes): notrun('not suitable for this cache mode: %s' % cachemode) =20 +def verify_aio_mode(supported_aio_modes=3D[]): + if supported_aio_modes and (aiomode not in supported_aio_modes): + notrun('not suitable for this aio mode: %s' % aiomode) + def supports_quorum(): return 'quorum' in qemu_img_pipe('--help') =20 @@ -843,7 +849,7 @@ def skip_if_unsupported(required_formats=3D[], read_onl= y=3DFalse): return skip_test_decorator =20 def main(supported_fmts=3D[], supported_oses=3D['linux'], supported_cache_= modes=3D[], - unsupported_fmts=3D[]): + supported_aio_modes=3D[], unsupported_fmts=3D[]): '''Run tests''' =20 global debug @@ -861,6 +867,7 @@ def main(supported_fmts=3D[], supported_oses=3D['linux'= ], supported_cache_modes=3D[], verify_image_format(supported_fmts, unsupported_fmts) verify_platform(supported_oses) verify_cache_mode(supported_cache_modes) + verify_aio_mode(supported_aio_modes) =20 if debug: output =3D sys.stdout --=20 2.21.0