From patchwork Thu Nov 26 08:35:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yi Zhang X-Patchwork-Id: 11933047 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 085F8C6379D for ; Thu, 26 Nov 2020 08:36:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 99ADD21D81 for ; Thu, 26 Nov 2020 08:36:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="geuk51MD" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727039AbgKZIgE (ORCPT ); Thu, 26 Nov 2020 03:36:04 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:27341 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726392AbgKZIgE (ORCPT ); Thu, 26 Nov 2020 03:36:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1606379763; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gpEC5D0qOw9//L2As7ovMFYeDVD089fvAUww7rjLk5w=; b=geuk51MDoqT0NuJuWLxnbxWKex+s4LwU2BRALxp1Njb7CbTxRIsFetbtWTWavutTSHDlaQ CKC126DCbrxUIfQOoQVu52PTp2WuvW6UWMOTKDAvpKEWrUnF/e/mldmKDZexgRmwX3WTmc BtdWeJ6kNM/WQdRtqxXznazSHxTikWA= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-588-sLMyRioIMuCzZi04AmfOBw-1; Thu, 26 Nov 2020 03:36:00 -0500 X-MC-Unique: sLMyRioIMuCzZi04AmfOBw-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 740041012E85; Thu, 26 Nov 2020 08:35:59 +0000 (UTC) Received: from dhcp-12-105.nay.redhat.com (unknown [10.66.61.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id 76BC719C66; Thu, 26 Nov 2020 08:35:57 +0000 (UTC) From: Yi Zhang To: osandov@osandov.com, bvanassche@acm.org Cc: linux-block@vger.kernel.org, linux-nvme@lists.infradead.org, sagi@grimberg.me Subject: [PATCH V3 blktests 1/5] tests/srp/rc: update the ib_srpt module name Date: Thu, 26 Nov 2020 16:35:28 +0800 Message-Id: <20201126083532.27509-2-yi.zhang@redhat.com> In-Reply-To: <20201126083532.27509-1-yi.zhang@redhat.com> References: <20201126083532.27509-1-yi.zhang@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org Fix the ib_srpt module insmod failure as the module in some distros are end with .xz, like bellow on fedora: /lib/modules/$(uname -r)/kernel/drivers/infiniband/ulp/srpt/ib_srpt.ko.xz Reviewed-by: Bart Van Assche Signed-off-by: Yi Zhang --- tests/srp/rc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/srp/rc b/tests/srp/rc index 7fc094b..1f665a2 100755 --- a/tests/srp/rc +++ b/tests/srp/rc @@ -465,7 +465,7 @@ configure_target_ports() { # Load LIO and configure the SRP target driver and LUNs. start_lio_srpt() { - local b d gid i ini_ids=() opts p target_ids=() vdev + local b d gid i ini_ids=() opts p target_ids=() for gid in $(all_primary_gids); do if [ "${gid#fe8}" != "$gid" ]; then @@ -500,7 +500,7 @@ start_lio_srpt() { if modinfo ib_srpt | grep -q '^parm:[[:blank:]]*rdma_cm_port:'; then opts+=("rdma_cm_port=${srp_rdma_cm_port}") fi - insmod "/lib/modules/$(uname -r)/kernel/drivers/infiniband/ulp/srpt/ib_srpt.ko" "${opts[@]}" || return $? + insmod "/lib/modules/$(uname -r)/kernel/drivers/infiniband/ulp/srpt/ib_srpt."* "${opts[@]}" || return $? i=0 for r in "${vdev_path[@]}"; do if [ -b "$(readlink -f "$r")" ]; then From patchwork Thu Nov 26 08:35:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yi Zhang X-Patchwork-Id: 11933043 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3DB11C64E75 for ; Thu, 26 Nov 2020 08:36:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DCD522145D for ; Thu, 26 Nov 2020 08:36:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="BfAQfk0t" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727498AbgKZIgH (ORCPT ); Thu, 26 Nov 2020 03:36:07 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:41441 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726392AbgKZIgG (ORCPT ); Thu, 26 Nov 2020 03:36:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1606379765; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=b1JUCFxP98Y6dqOjE3XLdXL2MOBEQrR1ym0p8vqzfFo=; b=BfAQfk0tCcs7moiIFrXKljdemJaV2ArY9msdRTlKA+2XaPEWf7wjhtoHFoDjsmJov4b6MY UX/ddyxx9f5XjH6EzArRmaVOun59WoU3qZ2bRLy9by7xLw0MUmu3vwFEAzDh2+A4zpJOCZ gjBBsL5Kep2nuY3bBgCL+HLi+mIh1R4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-15--JoODfOmPliVtZxArPpDmg-1; Thu, 26 Nov 2020 03:36:03 -0500 X-MC-Unique: -JoODfOmPliVtZxArPpDmg-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A277B9A229; Thu, 26 Nov 2020 08:36:01 +0000 (UTC) Received: from dhcp-12-105.nay.redhat.com (unknown [10.66.61.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id C84E819C66; Thu, 26 Nov 2020 08:35:59 +0000 (UTC) From: Yi Zhang To: osandov@osandov.com, bvanassche@acm.org Cc: linux-block@vger.kernel.org, linux-nvme@lists.infradead.org, sagi@grimberg.me Subject: [PATCH V3 blktests 2/5] tests/nvmeof-mp/rc: run nvmeof-mp tests if we set multipath=N Date: Thu, 26 Nov 2020 16:35:29 +0800 Message-Id: <20201126083532.27509-3-yi.zhang@redhat.com> In-Reply-To: <20201126083532.27509-1-yi.zhang@redhat.com> References: <20201126083532.27509-1-yi.zhang@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org To enable it, just do bellow step before we run it: $ echo "options nvme_core multipath=N" >/etc/modprobe.d/nvme.conf Reviewed-by: Bart Van Assche Signed-off-by: Yi Zhang --- tests/nvmeof-mp/rc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/nvmeof-mp/rc b/tests/nvmeof-mp/rc index d7a7c87..c77526f 100755 --- a/tests/nvmeof-mp/rc +++ b/tests/nvmeof-mp/rc @@ -16,9 +16,11 @@ group_requires() { # Since the nvmeof-mp tests are based on the dm-mpath driver, these # tests are incompatible with the NVME_MULTIPATH kernel configuration - # option. - if _have_kernel_option NVME_MULTIPATH; then - SKIP_REASON="CONFIG_NVME_MULTIPATH has been set in .config" + # option with multipathing enabled in the nvme_core kernel module. + if _have_kernel_option NVME_MULTIPATH && \ + _have_module_param_value nvme_core multipath Y; then + SKIP_REASON="CONFIG_NVME_MULTIPATH has been set in .config \ +and multipathing has been enabled in the nvme_core kernel module" return fi From patchwork Thu Nov 26 08:35:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yi Zhang X-Patchwork-Id: 11933051 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BEC9DC64E7B for ; Thu, 26 Nov 2020 08:36:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6E75E21D7F for ; Thu, 26 Nov 2020 08:36:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="XeQan2Vj" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728790AbgKZIgN (ORCPT ); Thu, 26 Nov 2020 03:36:13 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:43781 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728364AbgKZIgN (ORCPT ); Thu, 26 Nov 2020 03:36:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1606379771; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wVrLd3u++NGxsba5ZF6vCk00fz0YWU/gqYiw53/j61A=; b=XeQan2Vjktw9Xek+ZnS/unqSFGPK4OgkYAlVzdUqT0t7uqVEaz9jskrnkYHQYxdq4V325i j919E1qhATr8BRJZplXAHYHhbxUg0jzB6jw4nLS3Qfb38+KgJ7+2928L4eBRwRpagUIRqE LwzHr4K/mgwmHtuOLTw7kdRAezQieRU= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-590-nbB4CddkNWW-62uA4Ihwlg-1; Thu, 26 Nov 2020 03:36:05 -0500 X-MC-Unique: nbB4CddkNWW-62uA4Ihwlg-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id F239D1012E85; Thu, 26 Nov 2020 08:36:03 +0000 (UTC) Received: from dhcp-12-105.nay.redhat.com (unknown [10.66.61.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id 27D1819C66; Thu, 26 Nov 2020 08:36:01 +0000 (UTC) From: Yi Zhang To: osandov@osandov.com, bvanassche@acm.org Cc: linux-block@vger.kernel.org, linux-nvme@lists.infradead.org, sagi@grimberg.me Subject: [PATCH V3 blktests 3/5] nvmeof-mp/012, srp/012: fix the scheduler list Date: Thu, 26 Nov 2020 16:35:30 +0800 Message-Id: <20201126083532.27509-4-yi.zhang@redhat.com> In-Reply-To: <20201126083532.27509-1-yi.zhang@redhat.com> References: <20201126083532.27509-1-yi.zhang@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org There is no cfq scheduler and new added kyber scheduler in lastest kernel, introduce get_scheduler_list and fix nvmeof-mp/012 srp/012 To reproduce it: $ ./check nvmeof-mp/012 nvmeof-mp/012 (dm-mpath on top of multiple I/O schedulers) [passed] runtime 5.922s ... 8.804s $ cat results/nodev/nvmeof-mp/012.full | grep -n "Changing scheduler" 31:Changing scheduler of dm-3 from mq-deadline kyber [bfq] none into cfq failed 47:Changing scheduler of dm-3 from mq-deadline kyber [bfq] none into cfq failed Signed-off-by: Yi Zhang Reviewed-by: Bart Van Assche --- common/multipath-over-rdma | 11 +++++++++++ tests/nvmeof-mp/012 | 10 ++++++---- tests/srp/012 | 10 ++++++---- 3 files changed, 23 insertions(+), 8 deletions(-) diff --git a/common/multipath-over-rdma b/common/multipath-over-rdma index ebc5939..ba6fa0d 100644 --- a/common/multipath-over-rdma +++ b/common/multipath-over-rdma @@ -326,6 +326,17 @@ set_scheduler() { fi } +# Get block dev scheduler list +get_scheduler_list() { + local b=$1 p + p=/sys/block/"$b"/queue/scheduler + if [ -e "$p" ]; then + sed 's/[][]//g' /sys/block/"$b"/queue/scheduler + else + return 1 + fi +} + # Get a /dev/... path that points at dm device number $1. Set its I/O scheduler # to $2 and its timeout to $3. The shell script that includes this file must # define a function get_bdev_path() that translates device number $1 into a diff --git a/tests/nvmeof-mp/012 b/tests/nvmeof-mp/012 index ae6a92c..8b2e918 100755 --- a/tests/nvmeof-mp/012 +++ b/tests/nvmeof-mp/012 @@ -8,7 +8,7 @@ DESCRIPTION="dm-mpath on top of multiple I/O schedulers" QUICK=1 test_io_schedulers() { - local dev m + local dev m dm scheds # Load all I/O scheduler kernel modules for m in "/lib/modules/$(uname -r)/kernel/block/"*.ko; do @@ -17,15 +17,17 @@ test_io_schedulers() { for mq in y n; do use_blk_mq ${mq} || return $? dev=$(get_bdev 0) || return $? - for sched in noop deadline bfq cfq; do - set_scheduler "$(basename "$(readlink -f "${dev}")")" $sched \ + dm=$(basename "$(readlink -f "${dev}")") || return $? + scheds="$(get_scheduler_list "$dm")" || return $? + for sched in $scheds; do + set_scheduler "$dm" "$sched" \ >>"$FULL" 2>&1 || continue echo "I/O scheduler: $sched; use_blk_mq: $mq" >>"$FULL" run_fio --verify=md5 --rw=randwrite --bs=4K --size=64K \ --ioengine=libaio --iodepth=64 \ --iodepth_batch=32 --group_reporting --sync=1 \ --direct=1 --filename="$dev" \ - --name=${sched} --thread --numjobs=1 \ + --name="${sched}" --thread --numjobs=1 \ --output="${RESULTS_DIR}/nvmeof-mp/012-${sched}-${mq}.txt" \ >>"$FULL" || return $? diff --git a/tests/srp/012 b/tests/srp/012 index 20c6daf..ffd56ef 100755 --- a/tests/srp/012 +++ b/tests/srp/012 @@ -8,7 +8,7 @@ DESCRIPTION="dm-mpath on top of multiple I/O schedulers" QUICK=1 test_io_schedulers() { - local dev m + local dev m dm scheds # Load all I/O scheduler kernel modules for m in "/lib/modules/$(uname -r)/kernel/block/"*.ko; do @@ -18,15 +18,17 @@ test_io_schedulers() { [ $mq = n ] && ! _have_legacy_dm && continue use_blk_mq ${mq} ${mq} || return $? dev=$(get_bdev 0) || return $? - for sched in noop deadline bfq cfq; do - set_scheduler "$(basename "$(readlink -f "${dev}")")" $sched \ + dm=$(basename "$(readlink -f "${dev}")") || return $? + scheds="$(get_scheduler_list "$dm")" || return $? + for sched in $scheds; do + set_scheduler "$dm" "$sched" \ >>"$FULL" 2>&1 || continue echo "I/O scheduler: $sched; use_blk_mq: $mq" >>"$FULL" run_fio --verify=md5 --rw=randwrite --bs=4K --size=64K \ --ioengine=libaio --iodepth=64 \ --iodepth_batch=32 --group_reporting --sync=1 \ --direct=1 --filename="$dev" \ - --name=${sched} --thread --numjobs=1 \ + --name="${sched}" --thread --numjobs=1 \ --output="${RESULTS_DIR}/srp/012-${sched}-${mq}.txt" \ >>"$FULL" || return $? From patchwork Thu Nov 26 08:35:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yi Zhang X-Patchwork-Id: 11933045 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8F957C64E7A for ; Thu, 26 Nov 2020 08:36:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 29B4020B80 for ; Thu, 26 Nov 2020 08:36:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="SayaGnEs" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728593AbgKZIgL (ORCPT ); Thu, 26 Nov 2020 03:36:11 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:46082 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728364AbgKZIgK (ORCPT ); Thu, 26 Nov 2020 03:36:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1606379770; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lCz5ifcT7O2+wDdEnfcaQQvtu4Jd45LXFSIcs0dZ4Oo=; b=SayaGnEsAf2pQCf7dzyymkz6EoNFpCHlbNTV8d7mAB9PQGxbvZ0C0IpbbBIJuGkyzvo7SN yfiu4zSpU9SM9H/2xRSsBwgv5MxITdlQv0HCwasg5EXczon4Q6gKIYRSvmZMcpP1l2KUFi JHOThP3EnxJfDI38efVZLQQAYBBdgBo= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-217-G4Ty0S98OrSs0KpjHCQsRQ-1; Thu, 26 Nov 2020 03:36:07 -0500 X-MC-Unique: G4Ty0S98OrSs0KpjHCQsRQ-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 507161012E83; Thu, 26 Nov 2020 08:36:06 +0000 (UTC) Received: from dhcp-12-105.nay.redhat.com (unknown [10.66.61.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id 78B9719C66; Thu, 26 Nov 2020 08:36:04 +0000 (UTC) From: Yi Zhang To: osandov@osandov.com, bvanassche@acm.org Cc: linux-block@vger.kernel.org, linux-nvme@lists.infradead.org, sagi@grimberg.me Subject: [PATCH V3 blktests 4/5] common/rc: _have_iproute2 fix for "ip -V" change Date: Thu, 26 Nov 2020 16:35:31 +0800 Message-Id: <20201126083532.27509-5-yi.zhang@redhat.com> In-Reply-To: <20201126083532.27509-1-yi.zhang@redhat.com> References: <20201126083532.27509-1-yi.zhang@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org With below commit, the version will be updated base on the tag fbef6555 replace SNAPSHOT with auto-generated version string To reproduce it: $ ./check srp/015 common/rc: line 98: [: ip utility, iproute2-5.9.0: integer expression expected Signed-off-by: Yi Zhang Reviewed-by: Bart Van Assche --- common/rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/rc b/common/rc index 0d7a3cd..37eb873 100644 --- a/common/rc +++ b/common/rc @@ -95,7 +95,7 @@ _have_iproute2() { SKIP_REASON="ip utility not found" return 1 fi - if [ "$snapshot" -lt "$1" ]; then + if [[ "$snapshot" =~ ^[0-9]+$ && "$snapshot" -lt "$1" ]]; then SKIP_REASON="ip utility too old" return 1 fi From patchwork Thu Nov 26 08:35:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yi Zhang X-Patchwork-Id: 11933049 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 27953C64E7C for ; Thu, 26 Nov 2020 08:36:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BA3CF205F4 for ; Thu, 26 Nov 2020 08:36:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="ZOw9uQzF" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728364AbgKZIgN (ORCPT ); Thu, 26 Nov 2020 03:36:13 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:60179 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728698AbgKZIgN (ORCPT ); Thu, 26 Nov 2020 03:36:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1606379772; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1wEeIHBFqdeT2BNPcW+1wYEqAC+uZW5kXPJtQYxi8fo=; b=ZOw9uQzFxMoFzXCjippI02b6pCL81Gweo7CR3W0FTqOmppyp+3MWXYgz7uaT3Bzd2JDP3w N39bNn73uHTDP1fvyfMPw9uB8Kf5n9yIgmY4zNHQoyyJgqpUcprEE40L8m9XUeMlSqzQMd JHz97qidrsOUVz+Wr/nc40MZyf4jZMA= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-166-ez99gfV2PIahdMcY8YG5eA-1; Thu, 26 Nov 2020 03:36:09 -0500 X-MC-Unique: ez99gfV2PIahdMcY8YG5eA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A604E80ED8A; Thu, 26 Nov 2020 08:36:08 +0000 (UTC) Received: from dhcp-12-105.nay.redhat.com (unknown [10.66.61.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id CA58519C66; Thu, 26 Nov 2020 08:36:06 +0000 (UTC) From: Yi Zhang To: osandov@osandov.com, bvanassche@acm.org Cc: linux-block@vger.kernel.org, linux-nvme@lists.infradead.org, sagi@grimberg.me Subject: [PATCH V3 blktests 5/5] common/multipath-over-rdma: allow to set use_siw Date: Thu, 26 Nov 2020 16:35:32 +0800 Message-Id: <20201126083532.27509-6-yi.zhang@redhat.com> In-Reply-To: <20201126083532.27509-1-yi.zhang@redhat.com> References: <20201126083532.27509-1-yi.zhang@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org With this change, we can change to use siw for nvme-rdma/nvmeof-mp/srp testing from cmdline: $ use_siw=1 nvme-trtype=rdma ./check nvme/ $ use_siw=1 ./check nvmeof-mp/ $ use_siw=1 ./check srp/ Signed-off-by: Yi Zhang Reviewed-by: Bart Van Assche --- common/multipath-over-rdma | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/multipath-over-rdma b/common/multipath-over-rdma index ba6fa0d..b12dec3 100644 --- a/common/multipath-over-rdma +++ b/common/multipath-over-rdma @@ -12,7 +12,7 @@ filesystem_type=ext4 fio_aux_path=/tmp/fio-state-files memtotal=$(sed -n 's/^MemTotal:[[:blank:]]*\([0-9]*\)[[:blank:]]*kB$/\1/p' /proc/meminfo) max_ramdisk_size=$((1<<25)) -use_siw= +use_siw=${use_siw:-""} ramdisk_size=$((memtotal*(1024/16))) # in bytes if [ $ramdisk_size -gt $max_ramdisk_size ]; then ramdisk_size=$max_ramdisk_size