Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp19400991rwd; Wed, 28 Jun 2023 08:51:22 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4T50TRtD7x+hUdlsiCLICGI6HhxeEqMSr/29Aql4jB/nGJUJ5VZhUDqnv8Npgg6Y9qmY/R X-Received: by 2002:a17:907:778e:b0:98d:f4a7:71cf with SMTP id ky14-20020a170907778e00b0098df4a771cfmr11062772ejc.62.1687967481836; Wed, 28 Jun 2023 08:51:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687967481; cv=none; d=google.com; s=arc-20160816; b=MB6O+iI/kKRmRki5Yqtn68Hsy2Ji+C8eEKKCI06lVYH8/pqgqIGQXKIAJCrOtKJFbc oo2XkdO6XDbHvdfAxERiopQcgn7QJP3Tg+jmesMW8ikGdDL2OMDPsEyCewtAY6H1U/Ue IKGO9C9AvSJFC2v1Kwtia6eeQuPQVi3/3Kuf5eOCAfzle+Wf+XcI5F6icUNYo6VPlqrn SFj231KHk0k2+ZotwhP4ILfgM7esDJ7YQX1qUXGKe/is1iLEnL7yIrScWbXOzlhuPhK8 Nw5PaSZ37ZQLbkg+BGbIrTToa24NWvNe9hmu3s9T1nTYeM1vpceHRQq95ZdnrVrn/3Kk x2ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=y/IJwReM/uXABoejcS3ER1zTUO2yvPD9h8VV7ZhYdrs=; fh=1hFOl/y8Yf4puYJGEUtFyF3ISWJIUs31OsNfiF8r3oc=; b=BIty/pXUrOQkj2tOibaKKDL+gPhlXMbFMkETPCF8bICkUO1rcQICDuNK3Q8r4oQw6j 4N9t/swZ0Wq61HdzX9TEOG9VIsDU9YvE5dSO+YDtn6HuNtEfNmR1AyyK5v8WwHIQX5tb GScGEKQ6ByatjiA0wzw6KqC5iigXoHDF+zvYG75USivrjSPsTSRGCMZKZSn8tQbDl5/0 W0xQ4KUL/VVoyDYJzIwZzsQ5dRalgJWH6U7HF1ITF63jRRGGCvnKkDx+weTGZfutj3ej oFI7/dU55Wh3Whgsubv2tx5sMAvyzfvuww20M0s90CsS9406EeCehWTv+udDIUYc1LLS EEXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=mPp5Gnt1; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=4KbCazMV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lr26-20020a170906fb9a00b0099207b3bc48si2518347ejb.224.2023.06.28.08.50.56; Wed, 28 Jun 2023 08:51:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=mPp5Gnt1; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=4KbCazMV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231751AbjF1PQ3 (ORCPT + 99 others); Wed, 28 Jun 2023 11:16:29 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:51904 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229840AbjF1PQ1 (ORCPT ); Wed, 28 Jun 2023 11:16:27 -0400 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 2B4B421860; Wed, 28 Jun 2023 15:16:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1687965386; h=from:from:reply-to: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=y/IJwReM/uXABoejcS3ER1zTUO2yvPD9h8VV7ZhYdrs=; b=mPp5Gnt1bSBq8z+O3iDXMBeGZfZVLiov6zxoT8q41d15eE1O8kGbV5zALKsiWs2TjYVoxU PhWkUsJiYeB6+eQ30m6xhIzuHdIk454kuaZFTqFrYndolcpW/8j3mtUxtXW/GPatlsTKPm B2AWIV51K/icuPejvpjgOWthfDDcnL8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1687965386; h=from:from:reply-to: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=y/IJwReM/uXABoejcS3ER1zTUO2yvPD9h8VV7ZhYdrs=; b=4KbCazMVeoHA4YKRFdDw2HfCRMOh7D8AGUfhG1PZoSrCSuMCiF+wJ3HhZLeUFCB5/iFanq xkRUSobbAqL92mAA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 1D308138E8; Wed, 28 Jun 2023 15:16:26 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id Tq/tBspOnGQxOQAAMHmgww (envelope-from ); Wed, 28 Jun 2023 15:16:26 +0000 From: Daniel Wagner To: linux-nvme@lists.infradead.org Cc: linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, Chaitanya Kulkarni , Shin'ichiro Kawasaki , Sagi Grimberg , Hannes Reinecke , James Smart , Daniel Wagner Subject: [PATCH blktests v2 1/3] nvme/048: Check for queue count check directly Date: Wed, 28 Jun 2023 17:16:21 +0200 Message-ID: <20230628151623.11340-2-dwagner@suse.de> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230628151623.11340-1-dwagner@suse.de> References: <20230628151623.11340-1-dwagner@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The test monitored the state changes live -> resetting -> connecting -> live, to figure out the queue count change was successful. The fc transport is reconnecting very fast and the state transitions are not observed by the current approach. So instead trying to monitor the state changes, let's just wait for the live state and the correct queue number. As queue count is depending on the number of online CPUs we explicitly use 1 and 2 for the max_queue count. This means the queue_count value needs to reach either 2 or 3 (admin queue included). Signed-off-by: Daniel Wagner --- tests/nvme/048 | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/tests/nvme/048 b/tests/nvme/048 index 81084f0440c2..bbfb9873b5e8 100755 --- a/tests/nvme/048 +++ b/tests/nvme/048 @@ -42,6 +42,24 @@ nvmf_wait_for_state() { return 0 } +nvmf_check_queue_count() { + local subsys_name="$1" + local queue_count="$2" + local nvmedev + local queue_count_file + + nvmedev=$(_find_nvme_dev "${subsys_name}") + queue_count_file=$(cat /sys/class/nvme-fabrics/ctl/"${nvmedev}"/queue_count) + + queue_count=$((queue_count + 1)) + if [[ "${queue_count}" -ne "${queue_count_file}" ]]; then + echo "expected queue count ${queue_count} not set" + return 1 + fi + + return 0 +} + set_nvmet_attr_qid_max() { local nvmet_subsystem="$1" local qid_max="$2" @@ -56,10 +74,8 @@ set_qid_max() { local qid_max="$3" set_nvmet_attr_qid_max "${subsys_name}" "${qid_max}" - - # Setting qid_max forces a disconnect and the reconntect attempt starts - nvmf_wait_for_state "${subsys_name}" "connecting" || return 1 nvmf_wait_for_state "${subsys_name}" "live" || return 1 + nvmf_check_queue_count "${subsys_name}" "${qid_max}" || return 1 return 0 } @@ -103,7 +119,7 @@ test() { echo FAIL else set_qid_max "${port}" "${subsys_name}" 1 || echo FAIL - set_qid_max "${port}" "${subsys_name}" 128 || echo FAIL + set_qid_max "${port}" "${subsys_name}" 2 || echo FAIL fi _nvme_disconnect_subsys "${subsys_name}" -- 2.41.0