From patchwork Fri Jan 18 09:44:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shinichiro Kawasaki X-Patchwork-Id: 10769617 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 689C613BF for ; Fri, 18 Jan 2019 09:45:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 57DEA2A1B1 for ; Fri, 18 Jan 2019 09:45:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 491992A4AB; Fri, 18 Jan 2019 09:45:09 +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.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D9FFA2A1B1 for ; Fri, 18 Jan 2019 09:45:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726873AbfARJpI (ORCPT ); Fri, 18 Jan 2019 04:45:08 -0500 Received: from esa6.hgst.iphmx.com ([216.71.154.45]:34681 "EHLO esa6.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726288AbfARJpI (ORCPT ); Fri, 18 Jan 2019 04:45:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1547804709; x=1579340709; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=xr1OyQaLlTmPYAsiFIzba9jjn+m6h3teH3K/mzCBlhc=; b=aiSmtoax9lxFeRFCNEZlOiQxQkY4RMLOhLweEhuujjBRjx16q8pvHnqc VtBI0iBSIyFqqBZoVO5oEZxQKEExaqacJe+HmjKn8G1VN47l0UmfqDH7Y rnXHsuT0g5/dAvbcTgzCEPvNxVzQYBOEeKdQ+by9pWgxr+4oT6VLTgHlO RJBS62mmW3UQdEI/t0Y9Z2jbHnR2pIzfYgIPhHip3KAmbatI4EpsXkZRT u/mW1co88uKn+lkz52XQo6eej8y6OA/ESchQjvaLAW2IC5idf9OWxPf8k mkY2XOxslgKfO0LF3C5rt+XIdQTzaYDbs8Gtf4nuOnQze3x8JzfwnAw1w g==; X-IronPort-AV: E=Sophos;i="5.56,489,1539619200"; d="scan'208";a="100920244" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 18 Jan 2019 17:45:07 +0800 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP; 18 Jan 2019 01:26:24 -0800 Received: from shin_dev.dhcp.fujisawa.hgst.com (HELO shin_dev.fujisawa.hgst.com) ([10.149.52.166]) by uls-op-cesaip02.wdc.com with ESMTP; 18 Jan 2019 01:45:02 -0800 From: Shin'ichiro Kawasaki To: linux-block@vger.kernel.org, Omar Sandoval , Masato Suzuki , Shinichiro Kawasaki Cc: Omar Sandoval , Jens Axboe , Matias Bjorling , Hannes Reinecke , Mike Snitzer , "Martin K . Petersen" , Chaitanya Kulkarni Subject: [PATCH blktests v3 02/13] common: Introduce _have_fio_zbd_zonemode() helper function Date: Fri, 18 Jan 2019 18:44:42 +0900 Message-Id: <20190118094453.13773-3-shinichiro.kawasaki@wdc.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190118094453.13773-1-shinichiro.kawasaki@wdc.com> References: <20190118094453.13773-1-shinichiro.kawasaki@wdc.com> MIME-Version: 1.0 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Fio zbd zone mode is necessary for zoned block devices. Introduce the helper function _have_fio_zbd_zonemode() to check that the installed fio version supports the option --zonemode=zbd. Signed-off-by: Shin'ichiro Kawasaki --- common/fio | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/common/fio b/common/fio index e407088..4c771fc 100644 --- a/common/fio +++ b/common/fio @@ -17,6 +17,15 @@ _have_fio() { return 0 } +_have_fio_zbd_zonemode() { + _have_fio || return $? + if ! fio --cmdhelp=zonemode 2>&1 | grep -q zbd ; then + SKIP_REASON="Fio version too old (does not support --zonemode=zbd)" + return 1 + fi + return 0 +} + declare -A FIO_TERSE_FIELDS FIO_TERSE_FIELDS=( # Read status