From patchwork Thu Mar 21 09:47:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Wagner X-Patchwork-Id: 13598561 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6643C55792 for ; Thu, 21 Mar 2024 09:47:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711014460; cv=none; b=bdyuGHen3+Yy3Einxvrim4TXKCXMHnPHmARxiSVhnmr9yt8B7OYgX+75pSSALVVy9ckpe67UkwHxZUu/WqG/cyVGyG6Q2sO9XR/b+sVNMXHXzELS4YkHnXrLNOSLz5no85hgwFsDZSFGBUa7UBCmeKsmkrrlYIDhDUofLRfX29c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711014460; c=relaxed/simple; bh=427UI0q+gFxS02r9zeJ677KQIVMVpQvHECRYTSpZaxA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Vzi55DrYzskkCxPj4i38LV2dH4HLpq43nzDSq94aDBn6f9vQ9bUTm7VaywrvYB4Zwb61LzIcDX6+WOpscLwoE+DsbKkfQg+2XmLnsIGuWxXwMLmTcosNIBQUZt0Uxxc9NsieXQB47JrPgACi6ATSgUjO/lvPVlCpEym0uGlKCHU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=c0U/kVyG; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=G71NIniz; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=wD1CJSp3; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=gdGUj4GT; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="c0U/kVyG"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="G71NIniz"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="wD1CJSp3"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="gdGUj4GT" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id EEAA137159; Thu, 21 Mar 2024 09:47:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1711014451; 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=NcXhbsfc56xlq1mnzBpFBPcMEmf7LzKv1U7zLuZmvMc=; b=c0U/kVyG/Z5I9t/Uo1NSqp382Xjk9hs8voGPPx3bg8hXlft6HgWQXk/ljd3dVBOTwTAzku +CPYizW2NdmY47EICtgXxli45LsGYOLYeL2jPH7jshnqDetgW7aA4Z4L7vrUAZyxShK4oO 9KyWrQhKQKOoF4V75Uachr99Q72P6Z8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1711014451; 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=NcXhbsfc56xlq1mnzBpFBPcMEmf7LzKv1U7zLuZmvMc=; b=G71NInizG4SRjfq8/GCxgFm/RfS1A59V2pDL6Nf7lsu9MnnBcErqBAi48CuKuYCHBnQNfP ycP6W6oEUY5ABIBA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1711014450; 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=NcXhbsfc56xlq1mnzBpFBPcMEmf7LzKv1U7zLuZmvMc=; b=wD1CJSp3q7eT6Unx592irbm3bhb27hnWdevzykN0J0IMUgDp0CGTvIlViHx9IAs1uhpG0r HU5dTlU678vyJq6KukaOXRimiWTe2RYhE/dg8DRRHnS8VJQFTFTfblv9hqRvlPGMhKnSJW PbqhxWy2gVaZINtQIZAS5mMKFqRxtsY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1711014450; 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=NcXhbsfc56xlq1mnzBpFBPcMEmf7LzKv1U7zLuZmvMc=; b=gdGUj4GTxWjzmEX0ot4BZ6d2Y8u+0bpdIJNPKqCV0oA8miMhKeBK3w8WWqHx/yMscd139t cAvFhXOGkqf6NACA== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id DCA2113976; Thu, 21 Mar 2024 09:47:30 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id MnJuNDIC/GW2DwAAD6G6ig (envelope-from ); Thu, 21 Mar 2024 09:47:30 +0000 From: Daniel Wagner To: Shin'ichiro Kawasaki Cc: linux-block@vger.kernel.org, linux-nvme@lists.infradead.org, Chaitanya Kulkarni , Hannes Reinecke , Daniel Wagner Subject: [PATCH blktests v1 01/18] nvme/rc: silence error on module unload for fc Date: Thu, 21 Mar 2024 10:47:10 +0100 Message-ID: <20240321094727.6503-2-dwagner@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240321094727.6503-1-dwagner@suse.de> References: <20240321094727.6503-1-dwagner@suse.de> Precedence: bulk X-Mailing-List: linux-block@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Authentication-Results: smtp-out1.suse.de; none X-Spam-Level: *** X-Spam-Score: 3.37 X-Spamd-Result: default: False [3.37 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_MISSING_CHARSET(2.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; BROKEN_CONTENT_TYPE(1.50)[]; RCPT_COUNT_FIVE(0.00)[6]; NEURAL_HAM_LONG(-0.98)[-0.976]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MID_CONTAINS_FROM(1.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-0.35)[76.46%] X-Spam-Flag: NO The other transports silence the error output when trying to unload the module. Do the same for FC. Signed-off-by: Daniel Wagner --- tests/nvme/rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/nvme/rc b/tests/nvme/rc index 2d6ebeab2f6f..78d84af72e73 100644 --- a/tests/nvme/rc +++ b/tests/nvme/rc @@ -332,7 +332,7 @@ _cleanup_nvmet() { if [[ "${nvme_trtype}" == "fc" ]]; then _cleanup_fcloop "${def_local_wwnn}" "${def_local_wwpn}" \ "${def_remote_wwnn}" "${def_remote_wwpn}" - modprobe -rq nvme-fcloop + modprobe -rq nvme-fcloop 2>/dev/null fi modprobe -rq nvme-"${nvme_trtype}" 2>/dev/null if [[ "${nvme_trtype}" != "loop" ]]; then From patchwork Thu Mar 21 09:47:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Wagner X-Patchwork-Id: 13598555 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AACD32C86A for ; Thu, 21 Mar 2024 09:47:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711014455; cv=none; b=VjdnEWav06WM4gr4B/lqyU/vmo/iKwKZ2avM8BeVQyHlTmN01tazYPJlPBE2pZU9WbxI2eMihD60Oxq9esHQRAYc03Hwhe5L6qgJaqkpxMEP32ek1uXnGPWLvlRQB87ZkAUsexd9hlmTtJAY0++7rCvbumb+qYRPY4gLnpah+KM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711014455; c=relaxed/simple; bh=SjZcFet/FLu8HamUQkkJ6VtXMgQWFzDYulQx1wTodk4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=eB7uSmIMDX2UPxsuHzAUdd+7RVm/A7DJ6mP7m+4vj2GCjoIrNIiQRCzZ5or4TvgPJVcVFjhdrFebpnjnHtgPJBDkEQIffMX9Ddn1IP1guy6DDdkuJFIsqINcTWPVejDjeXueeasXh7MZQdRXoUhEofDBBfeHtJeIxdWeyRYLiN8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=ukkdw13T; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=J5TuhvC2; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=ukkdw13T; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=J5TuhvC2; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="ukkdw13T"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="J5TuhvC2"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="ukkdw13T"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="J5TuhvC2" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 969551FBF9; Thu, 21 Mar 2024 09:47:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1711014451; 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=XSwWBqWUSD8+M7SAylRtgq7n47f1ZHfkI43qiK/fNIs=; b=ukkdw13TY8Z8/KJ2TpVf8lc5z86Uf1yT310HRyu/Y4nSNxjrOsUpT3PCPY0GKqSN7LWuxv JOhIGWaQvvvVaa+RcBGuDP7wc5yI+YS7F21LvCxvaWO3f2V/0HnRZSszRWJuSfNQaFwXxf 63PSjKV7klV8Yh8b3LtKAYGKEbPt/ag= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1711014451; 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=XSwWBqWUSD8+M7SAylRtgq7n47f1ZHfkI43qiK/fNIs=; b=J5TuhvC20ceq+u7RdLVTtteGmE2Z+MwU6dVxC4zWD92+SlZHs4CrIafv205pgEBLQXzMVo D4u7MbHmjJxFhLDA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1711014451; 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=XSwWBqWUSD8+M7SAylRtgq7n47f1ZHfkI43qiK/fNIs=; b=ukkdw13TY8Z8/KJ2TpVf8lc5z86Uf1yT310HRyu/Y4nSNxjrOsUpT3PCPY0GKqSN7LWuxv JOhIGWaQvvvVaa+RcBGuDP7wc5yI+YS7F21LvCxvaWO3f2V/0HnRZSszRWJuSfNQaFwXxf 63PSjKV7klV8Yh8b3LtKAYGKEbPt/ag= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1711014451; 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=XSwWBqWUSD8+M7SAylRtgq7n47f1ZHfkI43qiK/fNIs=; b=J5TuhvC20ceq+u7RdLVTtteGmE2Z+MwU6dVxC4zWD92+SlZHs4CrIafv205pgEBLQXzMVo D4u7MbHmjJxFhLDA== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 7BE3913976; Thu, 21 Mar 2024 09:47:31 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id TcjbHDMC/GW5DwAAD6G6ig (envelope-from ); Thu, 21 Mar 2024 09:47:31 +0000 From: Daniel Wagner To: Shin'ichiro Kawasaki Cc: linux-block@vger.kernel.org, linux-nvme@lists.infradead.org, Chaitanya Kulkarni , Hannes Reinecke , Daniel Wagner Subject: [PATCH blktests v1 02/18] nvme/rc: silence fcloop cleanup failures Date: Thu, 21 Mar 2024 10:47:11 +0100 Message-ID: <20240321094727.6503-3-dwagner@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240321094727.6503-1-dwagner@suse.de> References: <20240321094727.6503-1-dwagner@suse.de> Precedence: bulk X-Mailing-List: linux-block@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Score: 3.49 X-Spam-Flag: NO X-Spamd-Bar: +++ Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=ukkdw13T; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=J5TuhvC2 X-Spamd-Result: default: False [3.49 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_MISSING_CHARSET(2.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; BROKEN_CONTENT_TYPE(1.50)[]; RCPT_COUNT_FIVE(0.00)[6]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; DKIM_TRACE(0.00)[suse.de:+]; MX_GOOD(-0.01)[]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-0.00)[43.05%]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from] X-Spam-Level: *** X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Rspamd-Queue-Id: 969551FBF9 When the ctl file is missing we are logging tests/nvme/rc: line 265: /sys/class/fcloop/ctl/del_target_port: No such file or directory tests/nvme/rc: line 257: /sys/class/fcloop/ctl/del_local_port: No such file or directory tests/nvme/rc: line 249: /sys/class/fcloop/ctl/del_remote_port: No such file or directory because the first redirect operator fails. Thus first check if the ctl file exists. Signed-off-by: Daniel Wagner --- tests/nvme/rc | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/tests/nvme/rc b/tests/nvme/rc index 78d84af72e73..53fa54e64cb2 100644 --- a/tests/nvme/rc +++ b/tests/nvme/rc @@ -234,7 +234,10 @@ _nvme_fcloop_del_rport() { local remote_wwpn="$4" local loopctl=/sys/class/fcloop/ctl - echo "wwnn=${remote_wwnn},wwpn=${remote_wwpn}" > ${loopctl}/del_remote_port 2> /dev/null + if [[ ! -f "${loopctrl}" ]]; then + return + fi + echo "wwnn=${remote_wwnn},wwpn=${remote_wwpn}" > ${loopctl}/del_remote_port > /dev/null 2>&1 } _nvme_fcloop_del_lport() { @@ -242,7 +245,10 @@ _nvme_fcloop_del_lport() { local wwpn="$2" local loopctl=/sys/class/fcloop/ctl - echo "wwnn=${wwnn},wwpn=${wwpn}" > ${loopctl}/del_local_port 2> /dev/null + if [[ ! -f "${loopctrl}" ]]; then + return + fi + echo "wwnn=${wwnn},wwpn=${wwpn}" > ${loopctl}/del_local_port > /dev/null > /dev/null 2>&1 } _nvme_fcloop_del_tport() { @@ -250,7 +256,10 @@ _nvme_fcloop_del_tport() { local wwpn="$2" local loopctl=/sys/class/fcloop/ctl - echo "wwnn=${wwnn},wwpn=${wwpn}" > ${loopctl}/del_target_port 2> /dev/null + if [[ ! -f "${loopctrl}" ]]; then + return + fi + echo "wwnn=${wwnn},wwpn=${wwpn}" > ${loopctl}/del_target_port > /dev/null 2&>1 } _cleanup_fcloop() { From patchwork Thu Mar 21 09:47:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Wagner X-Patchwork-Id: 13598564 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8598555C3E for ; Thu, 21 Mar 2024 09:47:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711014461; cv=none; b=tg2rJnvguBAAqj81Tw151IGQmMSQDRCBmMiv0Qr3/Bjd2QGy2pQ53r6ZroUtnsdlVVpdhCSQLBfwgMFYGwJ3MXS+/z8BSUQdyKw0ud81Jwu5Rtorz2uGNgm25K+ht8s2IasjGJPx8DTw38FbYK6fYa+vn1oAblq7FzNJRyNuZmM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711014461; c=relaxed/simple; bh=foSF3oEoPrhYnxXgoSK4+5LEAMTOqNqA4ppUZN5gjxA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=BfOPWa60I+ZTQH21175dk60c308s3JOvhXLsFDipjBQWMu/GdhcEPEPJ8FKDEZjUby49sjs1ffkYdsBqvBPus3f4Zo5Csoqp/FbJQGQKZaIw0k05sZzZk6jbdl3hKj4iJDWqC9Gd4U9gd62ir9kRKTpzFeFnf+PNT+s+j04+5cM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=bwLUK99a; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=Djaw7sbu; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=bwLUK99a; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=Djaw7sbu; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="bwLUK99a"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="Djaw7sbu"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="bwLUK99a"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="Djaw7sbu" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 3298F3715A; Thu, 21 Mar 2024 09:47:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1711014452; 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=iGeLl5WEAa793vjrOKZVLNQhTJwlJbFni6zh2vQYVkk=; b=bwLUK99aPbsYDgFcsp49HShNMvShdONfYnH4uUYFtAw6irlWU88TX4h/1J4tPiFnojS2ub t+gLtMwWntsBOnZf7ahmcU6lKbCu8VABKa8Ec6Z6im1B1nZp1HqsKaLhO2FFOiMfuUETGe N2YqOBZ7pFepvmxwEKClrhwIqtdODnE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1711014452; 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=iGeLl5WEAa793vjrOKZVLNQhTJwlJbFni6zh2vQYVkk=; b=Djaw7sbujYNSbcKWVDSPpcQKycoGrj8+KDOpjxloi7emsxkE4+0ycjskpURYMEm43eo1kF Sc7yDClrX1auM2CQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1711014452; 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=iGeLl5WEAa793vjrOKZVLNQhTJwlJbFni6zh2vQYVkk=; b=bwLUK99aPbsYDgFcsp49HShNMvShdONfYnH4uUYFtAw6irlWU88TX4h/1J4tPiFnojS2ub t+gLtMwWntsBOnZf7ahmcU6lKbCu8VABKa8Ec6Z6im1B1nZp1HqsKaLhO2FFOiMfuUETGe N2YqOBZ7pFepvmxwEKClrhwIqtdODnE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1711014452; 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=iGeLl5WEAa793vjrOKZVLNQhTJwlJbFni6zh2vQYVkk=; b=Djaw7sbujYNSbcKWVDSPpcQKycoGrj8+KDOpjxloi7emsxkE4+0ycjskpURYMEm43eo1kF Sc7yDClrX1auM2CQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 1F61B13976; Thu, 21 Mar 2024 09:47:32 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id ZKQrBjQC/GW8DwAAD6G6ig (envelope-from ); Thu, 21 Mar 2024 09:47:32 +0000 From: Daniel Wagner To: Shin'ichiro Kawasaki Cc: linux-block@vger.kernel.org, linux-nvme@lists.infradead.org, Chaitanya Kulkarni , Hannes Reinecke , Daniel Wagner Subject: [PATCH blktests v1 03/18] nvme/rc: log error if stale configuration is found Date: Thu, 21 Mar 2024 10:47:12 +0100 Message-ID: <20240321094727.6503-4-dwagner@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240321094727.6503-1-dwagner@suse.de> References: <20240321094727.6503-1-dwagner@suse.de> Precedence: bulk X-Mailing-List: linux-block@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Authentication-Results: smtp-out1.suse.de; none X-Spam-Level: *** X-Spam-Score: 3.72 X-Spamd-Result: default: False [3.72 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_MISSING_CHARSET(2.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; BROKEN_CONTENT_TYPE(1.50)[]; RCPT_COUNT_FIVE(0.00)[6]; NEURAL_HAM_LONG(-0.98)[-0.976]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MID_CONTAINS_FROM(1.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-0.00)[32.20%] X-Spam-Flag: NO It's possible that a previous run of blktest left some stale configuration left. E.g. when the module unload doesn't work (the bug might in the kernel we are testing). In this case error out and avoid confusion. Signed-off-by: Daniel Wagner --- tests/nvme/rc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/nvme/rc b/tests/nvme/rc index 53fa54e64cb2..0b4c88c37f6c 100644 --- a/tests/nvme/rc +++ b/tests/nvme/rc @@ -658,6 +658,11 @@ _create_nvmet_host() { local nvmet_ctrlkey="$4" local host_path="${NVMET_CFS}/hosts/${nvmet_hostnqn}" + if [[ -d "${host_path}" ]]; then + echo "FAIL target setup failed. stale host configuration found" + return 1; + fi + mkdir "${host_path}" _add_nvmet_allow_hosts "${nvmet_subsystem}" "${nvmet_hostnqn}" if [[ "${nvmet_hostkey}" ]] ; then From patchwork Thu Mar 21 09:47:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Wagner X-Patchwork-Id: 13598556 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ACA7F4597E for ; Thu, 21 Mar 2024 09:47:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711014456; cv=none; b=Da+6MLumT4wex8jkUsHuZZQ5rTFa7vXDQvsfbAxXhRK0Q37zDMfMYp7p2syzgGe+hmsiub090aIdKoS1iTzocFMyCsKuKWeRV1LDw6/KS+kQlwl0ROVLmP8oY+Xx6q93enO9vXBe35Rzb69kCww7YPfsk0FYQNHnkyHd7KzARCU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711014456; c=relaxed/simple; bh=YCIGqzbnuxgRiH5eRqLpdZkhi+BH1RJ1HrRmb/vej8A=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=kymJPwEocfvkzxl4bZaPiejwaP0r14gmT20NAb1JYdFZx5FnXgACCdBupXolygHHSaY09A9q8lOVNC12GYd46aB4SnVCViW5XFrjUAf6HCXZgsnj7rZzy3piLS8+w9oaF0KZw2gZyCrbN0G8JsQpejccG9qyqJpnuCLEWQdFo2E= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=zImkQgyX; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=+rKSb46n; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=zImkQgyX; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=+rKSb46n; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="zImkQgyX"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="+rKSb46n"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="zImkQgyX"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="+rKSb46n" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id C886D5CBC2; Thu, 21 Mar 2024 09:47:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1711014452; 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=YI2CBx8BIa8CSsKBnOyhZ/dTKMZfvGnVLkV71KB7Krk=; b=zImkQgyXuNgEIsK4dEuJYU9OWaxKLPpUt59G4H/1J2Dvh6fRKo2lR2E5NUxePRzY/dLNrH RRINRHWOdWwPeBjh3ujpHxRoAG6KYk13NTkYbycZZb5Wjpnu6nvqQaBacZ7xmm6qc9nzh/ //SgOB1UXo0sWcazyIvIBZwSk5c4Eo4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1711014452; 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=YI2CBx8BIa8CSsKBnOyhZ/dTKMZfvGnVLkV71KB7Krk=; b=+rKSb46n2bTU1hma/zw5eVhHXeVTAN4EztnhPtFoyLxBE24zJ8HT3YyyKDH9bm5nIvZt8U jxXOt4YdTACz7/Bg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1711014452; 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=YI2CBx8BIa8CSsKBnOyhZ/dTKMZfvGnVLkV71KB7Krk=; b=zImkQgyXuNgEIsK4dEuJYU9OWaxKLPpUt59G4H/1J2Dvh6fRKo2lR2E5NUxePRzY/dLNrH RRINRHWOdWwPeBjh3ujpHxRoAG6KYk13NTkYbycZZb5Wjpnu6nvqQaBacZ7xmm6qc9nzh/ //SgOB1UXo0sWcazyIvIBZwSk5c4Eo4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1711014452; 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=YI2CBx8BIa8CSsKBnOyhZ/dTKMZfvGnVLkV71KB7Krk=; b=+rKSb46n2bTU1hma/zw5eVhHXeVTAN4EztnhPtFoyLxBE24zJ8HT3YyyKDH9bm5nIvZt8U jxXOt4YdTACz7/Bg== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id B6B7B13976; Thu, 21 Mar 2024 09:47:32 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id 7KgyKzQC/GW/DwAAD6G6ig (envelope-from ); Thu, 21 Mar 2024 09:47:32 +0000 From: Daniel Wagner To: Shin'ichiro Kawasaki Cc: linux-block@vger.kernel.org, linux-nvme@lists.infradead.org, Chaitanya Kulkarni , Hannes Reinecke , Daniel Wagner Subject: [PATCH blktests v1 04/18] common/xfs: propagate errors from _xfs_run_fio_verify_io Date: Thu, 21 Mar 2024 10:47:13 +0100 Message-ID: <20240321094727.6503-5-dwagner@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240321094727.6503-1-dwagner@suse.de> References: <20240321094727.6503-1-dwagner@suse.de> Precedence: bulk X-Mailing-List: linux-block@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Score: 2.43 X-Spam-Flag: NO X-Spamd-Bar: ++ Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=zImkQgyX; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=+rKSb46n X-Spamd-Result: default: False [2.43 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_MISSING_CHARSET(2.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; BROKEN_CONTENT_TYPE(1.50)[]; RCPT_COUNT_FIVE(0.00)[6]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; DKIM_TRACE(0.00)[suse.de:+]; MX_GOOD(-0.01)[]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-1.06)[87.80%]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from] X-Spam-Level: ** X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Rspamd-Queue-Id: C886D5CBC2 If _xfs_mkfs_and_mount fails _xfs_run_fio_verify_io will continue to execute and fio will run against the local file system instead against the block device. Propagate all errors back to the caller. Signed-off-by: Daniel Wagner --- common/xfs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/common/xfs b/common/xfs index 37ce85878df2..569770fecd53 100644 --- a/common/xfs +++ b/common/xfs @@ -16,7 +16,7 @@ _xfs_mkfs_and_mount() { mkdir -p "${mount_dir}" umount "${mount_dir}" - mkfs.xfs -l size=64m -f "${bdev}" + mkfs.xfs -l size=64m -f "${bdev}" || return $? mount "${bdev}" "${mount_dir}" } @@ -27,8 +27,10 @@ _xfs_run_fio_verify_io() { local sz_mb local avail local avail_mb + local rc - _xfs_mkfs_and_mount "${bdev}" "${mount_dir}" >> "${FULL}" 2>&1 + _xfs_mkfs_and_mount "${bdev}" "${mount_dir}" \ + >>"${FULL}" 2>&1 || return $? avail="$(df --output=avail "${mount_dir}" | tail -1)" avail_mb="$((avail / 1024))" @@ -43,7 +45,10 @@ _xfs_run_fio_verify_io() { fi _run_fio_verify_io --size="${sz_mb}m" --directory="${mount_dir}/" + rc=$? umount "${mount_dir}" >> "${FULL}" 2>&1 rm -fr "${mount_dir}" + + return "${rc}" } From patchwork Thu Mar 21 09:47:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Wagner X-Patchwork-Id: 13598557 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3F6AB4D9E7 for ; Thu, 21 Mar 2024 09:47:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711014457; cv=none; b=WefCl1LcrL8PTB6216gKZKPR/FWrxT2CB5mvQlMr9mvR5pNJhUBqIR3wM6cqy18nV3BPiiTHuZFeTJggJR7BJ3tbVEFZpuUswHFArWMdEybljtOikBWClN7XcKcjPr0XWh2w5luicv+m81nCKYAjmtvv9W+byUjo+pQJ+JzzKCA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711014457; c=relaxed/simple; bh=IMn6efD3rHdfHVxXztU+oxf/9Izh+7UABCTIhY13dI8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Z5nOO8fpxpDVAB+tcHo/U+dCJR2ugGDqyO7ozodKatqOKfQ6UlVLFGY1gYSgZa1tA1sXbXHmfsiI5csI+G4dfRkTI1EgLyMWgPBnhOEvyZYjdfF6szDQlO10B5WgnK1n5qdEmKuHYxeQUTpoau18ptPOWwlANej7emNRtSuYZ3o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=n0Fg1ixq; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=czC2alZR; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=n0Fg1ixq; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=czC2alZR; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="n0Fg1ixq"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="czC2alZR"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="n0Fg1ixq"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="czC2alZR" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 6BAA75CBC3; Thu, 21 Mar 2024 09:47:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1711014453; 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=yEnyo+AcYrJKCl2seZqGvjTKSN/N0LR3yJr6caLuKVY=; b=n0Fg1ixqRg4A5IcXkFSo7U/9isdrfJZ/moeQXEQQTrIZJOpkDq9DeRvt8xBCNjfu81v9zM MsfkEQA0/lwEzfcKcsdllmtc/Xb0dFS/vitbOK3LN30BLzmL1moYzK6RH4YOmrmajKz+Z5 7TA7xspkXPNWAwa+dOF6XPEgFSvn2u0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1711014453; 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=yEnyo+AcYrJKCl2seZqGvjTKSN/N0LR3yJr6caLuKVY=; b=czC2alZR+lclMW4RtYlIaN8EALzv396IG2farxUiF57yfNVvAaY9GCnjDJg4z2dt0Xj3iT dloIP+JEV2cNfIDg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1711014453; 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=yEnyo+AcYrJKCl2seZqGvjTKSN/N0LR3yJr6caLuKVY=; b=n0Fg1ixqRg4A5IcXkFSo7U/9isdrfJZ/moeQXEQQTrIZJOpkDq9DeRvt8xBCNjfu81v9zM MsfkEQA0/lwEzfcKcsdllmtc/Xb0dFS/vitbOK3LN30BLzmL1moYzK6RH4YOmrmajKz+Z5 7TA7xspkXPNWAwa+dOF6XPEgFSvn2u0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1711014453; 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=yEnyo+AcYrJKCl2seZqGvjTKSN/N0LR3yJr6caLuKVY=; b=czC2alZR+lclMW4RtYlIaN8EALzv396IG2farxUiF57yfNVvAaY9GCnjDJg4z2dt0Xj3iT dloIP+JEV2cNfIDg== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 59B6A13976; Thu, 21 Mar 2024 09:47:33 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id XxZzFDUC/GXBDwAAD6G6ig (envelope-from ); Thu, 21 Mar 2024 09:47:33 +0000 From: Daniel Wagner To: Shin'ichiro Kawasaki Cc: linux-block@vger.kernel.org, linux-nvme@lists.infradead.org, Chaitanya Kulkarni , Hannes Reinecke , Daniel Wagner Subject: [PATCH blktests v1 05/18] nvme/{012,013,035}: check return value of _xfs_run_fio_verify_io Date: Thu, 21 Mar 2024 10:47:14 +0100 Message-ID: <20240321094727.6503-6-dwagner@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240321094727.6503-1-dwagner@suse.de> References: <20240321094727.6503-1-dwagner@suse.de> Precedence: bulk X-Mailing-List: linux-block@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Authentication-Results: smtp-out2.suse.de; none X-Spam-Level: X-Spam-Score: 0.72 X-Spamd-Result: default: False [0.72 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_MISSING_CHARSET(2.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; BROKEN_CONTENT_TYPE(1.50)[]; RCPT_COUNT_FIVE(0.00)[6]; NEURAL_HAM_LONG(-0.98)[-0.978]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MID_CONTAINS_FROM(1.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-3.00)[100.00%] X-Spam-Flag: NO When _xfs_run_fio_verify_io fails we should log the error. Currently, no failure is detected when this function fails. Signed-off-by: Daniel Wagner --- tests/nvme/012 | 4 +++- tests/nvme/013 | 4 +++- tests/nvme/035 | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/nvme/012 b/tests/nvme/012 index c5e0eb9c5e23..f0914ce3206b 100755 --- a/tests/nvme/012 +++ b/tests/nvme/012 @@ -33,7 +33,9 @@ test() { nvmedev=$(_find_nvme_dev "${def_subsysnqn}") _check_uuid "${nvmedev}" - _xfs_run_fio_verify_io "/dev/${nvmedev}n1" + if ! _xfs_run_fio_verify_io "/dev/${nvmedev}n1"; then + echo "FAIL: fio verify failed" + fi _nvme_disconnect_subsys "${def_subsysnqn}" diff --git a/tests/nvme/013 b/tests/nvme/013 index 3ec280ff24cf..3cef009cb9f4 100755 --- a/tests/nvme/013 +++ b/tests/nvme/013 @@ -32,7 +32,9 @@ test() { nvmedev=$(_find_nvme_dev "${def_subsysnqn}") _check_uuid "${nvmedev}" - _xfs_run_fio_verify_io "/dev/${nvmedev}n1" + if ! _xfs_run_fio_verify_io "/dev/${nvmedev}n1"; then + echo "FAIL: fio verify failed" + fi _nvme_disconnect_subsys "${def_subsysnqn}" diff --git a/tests/nvme/035 b/tests/nvme/035 index 712fe1dbcfb8..01aa09077d6a 100755 --- a/tests/nvme/035 +++ b/tests/nvme/035 @@ -31,7 +31,9 @@ test_device() { _nvmet_passthru_target_setup "${def_subsysnqn}" nsdev=$(_nvmet_passthru_target_connect "${nvme_trtype}" "${def_subsysnqn}") - _xfs_run_fio_verify_io "${nsdev}" "${nvme_img_size}" + if ! _xfs_run_fio_verify_io "${nsdev}" "${nvme_img_size}"; then + echo "FAIL: fio verify failed" + fi _nvme_disconnect_subsys "${def_subsysnqn}" _nvmet_passthru_target_cleanup "${def_subsysnqn}" From patchwork Thu Mar 21 09:47:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Wagner X-Patchwork-Id: 13598558 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BFA5F5472A for ; Thu, 21 Mar 2024 09:47:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711014457; cv=none; b=eh3pTwwp/pewYapp/caS9LRJOJhqcILN614VjxhOpazmBsXbkLTmisXZKyiXft4Qw4V1JVtec7YlGhhRuL9nZqidIUruQK+JkJX/BLFXdLQTp+uNShvI51WVy/muZPdR50bupNpYlE9ldPSWsArSAeaVd+sU7mIVOM4/nnyr0JA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711014457; c=relaxed/simple; bh=62QX67pPG7Trr/NpLghixhX2vMiWq4U2av/UWRlF5vI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=QHZcCpimjlrt30/3wikwdMs6k1ILAmGANnRi3caH9ooCG3z5GPE8D8zK2AazQhpdD8aX2AOG/0FK5mGMyuFzfZ0oAEOvlagHeCeTPZxyrDn3kZ44uFdbc//q5cV3CYwU9C3lWu4lKwW4mzNMT4Bgf2hZ9exPVu8OD/dw9VKugAQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=Vyg0BDIf; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=6+QIshHt; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=Vyg0BDIf; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=6+QIshHt; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="Vyg0BDIf"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="6+QIshHt"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="Vyg0BDIf"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="6+QIshHt" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 098FF5CBC4; Thu, 21 Mar 2024 09:47:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1711014454; 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=kU+W8jWSw/g0+BVz/oBmRDbvxTlP0TFnSeTNrv8knUI=; b=Vyg0BDIfextnXpBWmxmFbEMn4/x7uXPHqzBA7wPvL/MIGZRAZ2KTiCD7pIJneWL1Ng4s4w sQxOzfyYdr4gXaBenhsdW2qWbJhxm7E9k1ouVc061q0+m4oGRUCPTEDjy4JUYuCVx4L3d5 nfhT2hYlNrdwVi1i+FCd/BNzyu7Fvmo= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1711014454; 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=kU+W8jWSw/g0+BVz/oBmRDbvxTlP0TFnSeTNrv8knUI=; b=6+QIshHtVbZmqbQxCFGyczyrjHyhi0pte5pu1HZ/BefZakUTViYPGJ2EI8I7ca7RBK2Lmx RSzz0iVzljJ8mjBw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1711014454; 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=kU+W8jWSw/g0+BVz/oBmRDbvxTlP0TFnSeTNrv8knUI=; b=Vyg0BDIfextnXpBWmxmFbEMn4/x7uXPHqzBA7wPvL/MIGZRAZ2KTiCD7pIJneWL1Ng4s4w sQxOzfyYdr4gXaBenhsdW2qWbJhxm7E9k1ouVc061q0+m4oGRUCPTEDjy4JUYuCVx4L3d5 nfhT2hYlNrdwVi1i+FCd/BNzyu7Fvmo= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1711014454; 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=kU+W8jWSw/g0+BVz/oBmRDbvxTlP0TFnSeTNrv8knUI=; b=6+QIshHtVbZmqbQxCFGyczyrjHyhi0pte5pu1HZ/BefZakUTViYPGJ2EI8I7ca7RBK2Lmx RSzz0iVzljJ8mjBw== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id ED12E13976; Thu, 21 Mar 2024 09:47:33 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id hmRuODUC/GXDDwAAD6G6ig (envelope-from ); Thu, 21 Mar 2024 09:47:33 +0000 From: Daniel Wagner To: Shin'ichiro Kawasaki Cc: linux-block@vger.kernel.org, linux-nvme@lists.infradead.org, Chaitanya Kulkarni , Hannes Reinecke , Daniel Wagner Subject: [PATCH blktests v1 06/18] nvme/rc: use long command line option for nvme Date: Thu, 21 Mar 2024 10:47:15 +0100 Message-ID: <20240321094727.6503-7-dwagner@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240321094727.6503-1-dwagner@suse.de> References: <20240321094727.6503-1-dwagner@suse.de> Precedence: bulk X-Mailing-List: linux-block@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Score: 3.70 X-Spamd-Result: default: False [3.70 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_MISSING_CHARSET(2.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; BROKEN_CONTENT_TYPE(1.50)[]; RCPT_COUNT_FIVE(0.00)[6]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MID_CONTAINS_FROM(1.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[] X-Spam-Level: *** Authentication-Results: smtp-out2.suse.de; none X-Spam-Flag: NO The long format of the command line option are more descriptive and more likely to stay stable. Signed-off-by: Daniel Wagner --- tests/nvme/rc | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/nvme/rc b/tests/nvme/rc index 0b4c88c37f6c..f8bbad873a5f 100644 --- a/tests/nvme/rc +++ b/tests/nvme/rc @@ -148,7 +148,7 @@ _require_nvme_trtype_is_fabrics() { } _require_nvme_cli_auth() { - if ! nvme gen-dhchap-key -n nvmf-test-subsys > /dev/null 2>&1 ; then + if ! nvme gen-dhchap-key --nqn nvmf-test-subsys > /dev/null 2>&1 ; then SKIP_REASONS+=("nvme gen-dhchap-key command missing") return 1 fi @@ -396,13 +396,13 @@ _setup_nvmet() { _nvme_disconnect_ctrl() { local ctrl="$1" - nvme disconnect -d "${ctrl}" + nvme disconnect --device "${ctrl}" } _nvme_disconnect_subsys() { local subsysnqn="$1" - nvme disconnect -n "${subsysnqn}" |& tee -a "$FULL" | + nvme disconnect --nqn "${subsysnqn}" |& tee -a "$FULL" | grep -o "disconnected.*" } @@ -496,11 +496,11 @@ _nvme_connect_subsys() { trtype="$1" subsysnqn="$2" - ARGS=(-t "${trtype}" -n "${subsysnqn}") + ARGS=(--transport "${trtype}" --nqn "${subsysnqn}") if [[ "${trtype}" == "fc" ]] ; then - ARGS+=(-a "${traddr}" -w "${host_traddr}") + ARGS+=(--traddr "${traddr}" --host-traddr "${host_traddr}") elif [[ "${trtype}" != "loop" ]]; then - ARGS+=(-a "${traddr}" -s "${trsvcid}") + ARGS+=(--traddr "${traddr}" --trsvcid "${trsvcid}") fi ARGS+=(--hostnqn="${hostnqn}") ARGS+=(--hostid="${hostid}") @@ -565,13 +565,13 @@ _nvme_discover() { local host_traddr="${3:-$def_host_traddr}" local trsvcid="${3:-$def_trsvcid}" - ARGS=(-t "${trtype}") + ARGS=(--transport "${trtype}") ARGS+=(--hostnqn="${def_hostnqn}") ARGS+=(--hostid="${def_hostid}") if [[ "${trtype}" = "fc" ]]; then - ARGS+=(-a "${traddr}" -w "${host_traddr}") + ARGS+=(--traddr "${traddr}" --host-traddr "${host_traddr}") elif [[ "${trtype}" != "loop" ]]; then - ARGS+=(-a "${traddr}" -s "${trsvcid}") + ARGS+=(--traddr "${traddr}" --trsvcid "${trsvcid}") fi nvme discover "${ARGS[@]}" } From patchwork Thu Mar 21 09:47:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Wagner X-Patchwork-Id: 13598559 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 777D054BF7 for ; Thu, 21 Mar 2024 09:47:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711014458; cv=none; b=uz+Iw0umdUnscdT96rFsrc6V4ppPYgl+nmc12lVb2+PijZ/drPC3HYnBbEMThOb0fuECcrnkXoCoLKQIX4TxSlqnz6rBEOKbwy5llClnjVPjDoR8LxeDBYtZ8gFa4kByOcA+lcgF5Sq7AtoL9dildA5d978Qg5G5TTGJfMrifyM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711014458; c=relaxed/simple; bh=YgSpOJUhuslLqtJpLkfqrgcyN6ob7taJHidtybp2OoU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hNzboBf2u/7q1cU5iYK1viBwpyJvXk1cWC1R6nIRSb6/7eaSNUzpfJ6sK4lhcKvukEs+yRtuZfV7kKB/8NquKWIu+2KtdPWpb27WPB+0rPlzc9fQndxnxcYfjAWFYxlGOl2yZ/5du7ELw71UCmtVcOu3WhMZYcycfKbgqI269Rg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=AZ7R4tjl; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=adXnoTGA; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=AZ7R4tjl; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=adXnoTGA; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="AZ7R4tjl"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="adXnoTGA"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="AZ7R4tjl"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="adXnoTGA" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id A53225CBC5; Thu, 21 Mar 2024 09:47:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1711014454; 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=ahbPRkzP/qUxAlhof3e74vBcyvxraUmwOoCkqC/yW0w=; b=AZ7R4tjlq8cQEE7s+b4RmCcZ5+bO43tNlH5TdiQvfNGKZkNdmBGlkPOABWhHxkxmHsQ7U7 hQx4wa5g6leMNPp8Wf4GIQCE23Mbf18qj8ar+MuqsaTSKSFdXpkHjwm7C9IPlRZ+J9yP5m lIGjZ49sUUTFraHN4gjs+UAI4bUC0fk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1711014454; 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=ahbPRkzP/qUxAlhof3e74vBcyvxraUmwOoCkqC/yW0w=; b=adXnoTGA2QK02LRd0aRv6PY8kIgXi/pzJW2c2dFTfXwysy3oSfJ4z1A8I/Ogo5b1IZPaa5 5XFNOmGNgJJxljCQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1711014454; 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=ahbPRkzP/qUxAlhof3e74vBcyvxraUmwOoCkqC/yW0w=; b=AZ7R4tjlq8cQEE7s+b4RmCcZ5+bO43tNlH5TdiQvfNGKZkNdmBGlkPOABWhHxkxmHsQ7U7 hQx4wa5g6leMNPp8Wf4GIQCE23Mbf18qj8ar+MuqsaTSKSFdXpkHjwm7C9IPlRZ+J9yP5m lIGjZ49sUUTFraHN4gjs+UAI4bUC0fk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1711014454; 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=ahbPRkzP/qUxAlhof3e74vBcyvxraUmwOoCkqC/yW0w=; b=adXnoTGA2QK02LRd0aRv6PY8kIgXi/pzJW2c2dFTfXwysy3oSfJ4z1A8I/Ogo5b1IZPaa5 5XFNOmGNgJJxljCQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 925ED13976; Thu, 21 Mar 2024 09:47:34 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id Pvx1IjYC/GXGDwAAD6G6ig (envelope-from ); Thu, 21 Mar 2024 09:47:34 +0000 From: Daniel Wagner To: Shin'ichiro Kawasaki Cc: linux-block@vger.kernel.org, linux-nvme@lists.infradead.org, Chaitanya Kulkarni , Hannes Reinecke , Daniel Wagner Subject: [PATCH blktests v1 07/18] nvme/{014,015,018,019,020,023,024,026,045,046}: use long command line option for nvme Date: Thu, 21 Mar 2024 10:47:16 +0100 Message-ID: <20240321094727.6503-8-dwagner@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240321094727.6503-1-dwagner@suse.de> References: <20240321094727.6503-1-dwagner@suse.de> Precedence: bulk X-Mailing-List: linux-block@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=AZ7R4tjl; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=adXnoTGA X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Spamd-Result: default: False [-3.01 / 50.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; TO_DN_SOME(0.00)[]; R_MISSING_CHARSET(2.50)[]; BROKEN_CONTENT_TYPE(1.50)[]; RCPT_COUNT_FIVE(0.00)[6]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[suse.de:+]; MX_GOOD(-0.01)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; BAYES_HAM(-3.00)[100.00%]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-0.998]; MIME_GOOD(-0.10)[text/plain]; DWL_DNSWL_HI(-3.50)[suse.de:dkim]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; MID_CONTAINS_FROM(1.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_TLS_ALL(0.00)[]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from] X-Spam-Score: -3.01 X-Rspamd-Queue-Id: A53225CBC5 X-Spam-Flag: NO The long format of the command line option are more descriptive and more likely to stay stable. Signed-off-by: Daniel Wagner --- tests/nvme/014 | 2 +- tests/nvme/015 | 2 +- tests/nvme/018 | 3 ++- tests/nvme/019 | 3 ++- tests/nvme/020 | 3 ++- tests/nvme/023 | 3 ++- tests/nvme/024 | 3 ++- tests/nvme/026 | 3 ++- tests/nvme/045 | 4 ++-- tests/nvme/046 | 7 ++++--- 10 files changed, 20 insertions(+), 13 deletions(-) diff --git a/tests/nvme/014 b/tests/nvme/014 index 31bfeb76d13d..c02167142cb3 100755 --- a/tests/nvme/014 +++ b/tests/nvme/014 @@ -39,7 +39,7 @@ test() { dd if=/dev/urandom of="/dev/${nvmedev}n1" \ count="${count}" bs="${bs}" status=none - nvme flush "/dev/${nvmedev}" -n 1 + nvme flush "/dev/${nvmedev}" --namespace-id 1 _nvme_disconnect_subsys "${def_subsysnqn}" diff --git a/tests/nvme/015 b/tests/nvme/015 index 4315ffa57577..8ea90f10bda7 100755 --- a/tests/nvme/015 +++ b/tests/nvme/015 @@ -39,7 +39,7 @@ test() { dd if=/dev/urandom of="/dev/${nvmedev}n1" \ count="${count}" bs="${bs}" status=none - nvme flush "/dev/${nvmedev}n1" -n 1 + nvme flush "/dev/${nvmedev}n1" --namespace-id 1 _nvme_disconnect_subsys "${def_subsysnqn}" diff --git a/tests/nvme/018 b/tests/nvme/018 index e90173098ec1..e631434d7bd6 100755 --- a/tests/nvme/018 +++ b/tests/nvme/018 @@ -35,7 +35,8 @@ test() { sectors="$(blockdev --getsz "/dev/${nvmedev}n1")" bs="$(blockdev --getbsz "/dev/${nvmedev}n1")" - nvme read "/dev/${nvmedev}n1" -s "$sectors" -c 0 -z "$bs" &>"$FULL" \ + nvme read "/dev/${nvmedev}n1" --start-block "$sectors" \ + --block-count 0 --data-size "$bs" &>"$FULL" \ && echo "ERROR: nvme read for out of range LBA was not rejected" _nvme_disconnect_subsys "${def_subsysnqn}" diff --git a/tests/nvme/019 b/tests/nvme/019 index a1035ff8d8c7..3ab22e2cba01 100755 --- a/tests/nvme/019 +++ b/tests/nvme/019 @@ -31,7 +31,8 @@ test() { nvmedev=$(_find_nvme_dev "${def_subsysnqn}") _check_uuid "${nvmedev}" - nvme dsm "/dev/${nvmedev}" -n 1 -d -s "${sblk_range}" -b "${nblk_range}" + nvme dsm "/dev/${nvmedev}" --namespace-id 1 --ad \ + --slbs "${sblk_range}" --blocks "${nblk_range}" _nvme_disconnect_subsys "${def_subsysnqn}" diff --git a/tests/nvme/020 b/tests/nvme/020 index ba3f4c8a5b3d..10de114b83af 100755 --- a/tests/nvme/020 +++ b/tests/nvme/020 @@ -30,7 +30,8 @@ test() { nvmedev=$(_find_nvme_dev "${def_subsysnqn}") _check_uuid "${nvmedev}" - nvme dsm "/dev/${nvmedev}" -n 1 -d -s "${sblk_range}" -b "${nblk_range}" + nvme dsm "/dev/${nvmedev}" --namespace-id 1 --ad \ + --slbs "${sblk_range}" --blocks "${nblk_range}" _nvme_disconnect_subsys "${def_subsysnqn}" diff --git a/tests/nvme/023 b/tests/nvme/023 index 4e4d838ef6c9..58f03e8603a7 100755 --- a/tests/nvme/023 +++ b/tests/nvme/023 @@ -29,7 +29,8 @@ test() { nvmedev=$(_find_nvme_dev "${def_subsysnqn}") _check_uuid "${nvmedev}" - if ! nvme smart-log "/dev/${nvmedev}" -n 1 >> "$FULL" 2>&1; then + if ! nvme smart-log "/dev/${nvmedev}" --namespace-id 1 \ + >> "$FULL" 2>&1; then echo "ERROR: smart-log bdev-ns failed" fi diff --git a/tests/nvme/024 b/tests/nvme/024 index 2535a9a78d23..4608f015c4c3 100755 --- a/tests/nvme/024 +++ b/tests/nvme/024 @@ -29,7 +29,8 @@ test() { nvmedev=$(_find_nvme_dev "${def_subsysnqn}") _check_uuid "${nvmedev}" - if ! nvme smart-log "/dev/${nvmedev}" -n 1 >> "$FULL" 2>&1; then + if ! nvme smart-log "/dev/${nvmedev}" --namespace-id 1 \ + >> "$FULL" 2>&1; then echo "ERROR: smart-log file-ns failed" fi _nvme_disconnect_subsys "${def_subsysnqn}" >> "$FULL" 2>&1 diff --git a/tests/nvme/026 b/tests/nvme/026 index 5a7d9927b44b..d5e13db0a916 100755 --- a/tests/nvme/026 +++ b/tests/nvme/026 @@ -29,7 +29,8 @@ test() { nvmedev=$(_find_nvme_dev "${def_subsysnqn}") _check_uuid "${nvmedev}" - if ! nvme ns-descs "/dev/${nvmedev}" -n 1 >> "$FULL" 2>&1; then + if ! nvme ns-descs "/dev/${nvmedev}" --namespace-id 1 \ + >> "$FULL" 2>&1; then echo "ERROR: ns-desc failed" fi diff --git a/tests/nvme/045 b/tests/nvme/045 index be408b629771..9e5cb54e9533 100755 --- a/tests/nvme/045 +++ b/tests/nvme/045 @@ -68,7 +68,7 @@ test() { echo "Renew host key on the controller" - new_hostkey="$(nvme gen-dhchap-key -n ${def_subsysnqn} 2> /dev/null)" + new_hostkey="$(nvme gen-dhchap-key --nqn ${def_subsysnqn} 2> /dev/null)" _set_nvmet_hostkey "${def_hostnqn}" "${new_hostkey}" @@ -78,7 +78,7 @@ test() { echo "Renew ctrl key on the controller" - new_ctrlkey="$(nvme gen-dhchap-key -n ${def_subsysnqn} 2> /dev/null)" + new_ctrlkey="$(nvme gen-dhchap-key --nqn ${def_subsysnqn} 2> /dev/null)" _set_nvmet_ctrlkey "${def_hostnqn}" "${new_ctrlkey}" diff --git a/tests/nvme/046 b/tests/nvme/046 index 7576a24f234d..ea68d4079403 100755 --- a/tests/nvme/046 +++ b/tests/nvme/046 @@ -25,13 +25,14 @@ test_device() { chmod g+r,o+r "$ngdev" - if ! _run_user "nvme io-passthru ${ngdev} --opcode 2 -l 4096 \ - -n $nsid -r" >> "${FULL}" 2>&1; then + if ! _run_user "nvme io-passthru ${ngdev} --opcode 2 --data-len 4096 \ + --namespace-id $nsid --read" >> "${FULL}" 2>&1; then echo "Error: io-passthru read failed" fi if _run_user "echo hello | nvme io-passthru ${ngdev} --opcode 1 \ - -l 4096 -n $nsid -r" >> "${FULL}" 2>&1; then + --data-len 4096 --namespace-id $nsid --read" \ + >> "${FULL}" 2>&1; then echo "Error: io-passthru write passed (unexpected)" fi From patchwork Thu Mar 21 09:47:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Wagner X-Patchwork-Id: 13598569 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 55DB056B6B for ; Thu, 21 Mar 2024 09:47:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711014463; cv=none; b=LG+dvHLAn11exbUc01d6s7zWGeKvvlPjMYZdabiK48nFG0VGtqsEND414ybBXygbf328IHzNJhofTnqx76v/+jwQT8iUmrQlfvwePmTGErzhX1uJFkOC5t/j7qWxrgTm9iqaeBL5R0S2dwgNQIWo9xP9qZ0XzcycfvvF8W/XeDM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711014463; c=relaxed/simple; bh=I2S6/4FYIgi2d6pEO4PnYWc9n7IYvya6tYWqeq+ZEqY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=BBEhzGaY2BkRSNVTk0JDdKGSWMVzvYMLqHmygs6kuoSC0hPKjO+OB1i5WCCM8YrSTbfNBqk8XV31jIsTcxWopyJS9hCWZK2nfrn5kLGthwI7jX09VDx5BNZHm+H66ztA/Jd3mPq8aHqwcNuxZx3ubeLibj5cYju6gJcrHlITUr0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=eMHAi94f; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=vYO180vi; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=eMHAi94f; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=vYO180vi; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="eMHAi94f"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="vYO180vi"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="eMHAi94f"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="vYO180vi" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 592C13715B; Thu, 21 Mar 2024 09:47:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1711014455; 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=T/kqbhd0zcVIUz21Ia4QDLT6jzWbUrNtvXJHBzIZ/bc=; b=eMHAi94fGikLZXI9KzyQpGsTK4pBKr+jJ1gNMyc4UrNrBNLNo6UeVIkSxI7vdVJ7wyQuP2 oI6AHj6Kl4gcjQqSLrcKAwlvAYa5mqeD2iwhbXWTrbhqnKERyidNEPHmmSTytGj1AYN2FM kWT2idWHxhApgGjlMVi3VCxwyHVmGfU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1711014455; 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=T/kqbhd0zcVIUz21Ia4QDLT6jzWbUrNtvXJHBzIZ/bc=; b=vYO180viMBM+TYiCWryVUmJ03DezmSduw7wVLAn4mSNx0yOcAg5gJ+1XcwtIdyymSh/KDC cIT9QrB4YF+a8LAw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1711014455; 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=T/kqbhd0zcVIUz21Ia4QDLT6jzWbUrNtvXJHBzIZ/bc=; b=eMHAi94fGikLZXI9KzyQpGsTK4pBKr+jJ1gNMyc4UrNrBNLNo6UeVIkSxI7vdVJ7wyQuP2 oI6AHj6Kl4gcjQqSLrcKAwlvAYa5mqeD2iwhbXWTrbhqnKERyidNEPHmmSTytGj1AYN2FM kWT2idWHxhApgGjlMVi3VCxwyHVmGfU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1711014455; 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=T/kqbhd0zcVIUz21Ia4QDLT6jzWbUrNtvXJHBzIZ/bc=; b=vYO180viMBM+TYiCWryVUmJ03DezmSduw7wVLAn4mSNx0yOcAg5gJ+1XcwtIdyymSh/KDC cIT9QrB4YF+a8LAw== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 3C63D13976; Thu, 21 Mar 2024 09:47:35 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id xUZUDTcC/GXIDwAAD6G6ig (envelope-from ); Thu, 21 Mar 2024 09:47:35 +0000 From: Daniel Wagner To: Shin'ichiro Kawasaki Cc: linux-block@vger.kernel.org, linux-nvme@lists.infradead.org, Chaitanya Kulkarni , Hannes Reinecke , Daniel Wagner Subject: [PATCH blktests v1 08/18] nvme/rc: connect subsys only support long options Date: Thu, 21 Mar 2024 10:47:17 +0100 Message-ID: <20240321094727.6503-9-dwagner@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240321094727.6503-1-dwagner@suse.de> References: <20240321094727.6503-1-dwagner@suse.de> Precedence: bulk X-Mailing-List: linux-block@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Score: 3.70 X-Spamd-Result: default: False [3.70 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_MISSING_CHARSET(2.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; BROKEN_CONTENT_TYPE(1.50)[]; RCPT_COUNT_FIVE(0.00)[6]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MID_CONTAINS_FROM(1.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-0.00)[12.64%] X-Spam-Level: *** Authentication-Results: smtp-out1.suse.de; none X-Spam-Flag: NO There is no user for the short command line options, thus remove the short options to reduce the parsing overhead. Signed-off-by: Daniel Wagner --- tests/nvme/rc | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/tests/nvme/rc b/tests/nvme/rc index f8bbad873a5f..1cd4833bae7d 100644 --- a/tests/nvme/rc +++ b/tests/nvme/rc @@ -428,55 +428,55 @@ _nvme_connect_subsys() { while [[ $# -gt 0 ]]; do case $1 in - -a|--traddr) + --traddr) traddr="$2" shift 2 ;; - -w|--host-traddr) + --host-traddr) host_traddr="$2" shift 2 ;; - -s|--trsvcid) + --trsvcid) trsvcid="$2" shift 2 ;; - -n|--hostnqn) + --hostnqn) hostnqn="$2" shift 2 ;; - -I|--hostid) + --hostid) hostid="$2" shift 2 ;; - -S|--dhchap-secret) + --dhchap-secret) hostkey="$2" shift 2 ;; - -C|--dhchap-ctrl-secret) + --dhchap-ctrl-secret) ctrlkey="$2" shift 2 ;; - -i|--nr-io-queues) + --nr-io-queues) nr_io_queues="$2" shift 2 ;; - -W|--nr-write-queues) + --nr-write-queues) nr_write_queues="$2" shift 2 ;; - -P|--nr-poll-queues) + --nr-poll-queues) nr_poll_queues="$2" shift 2 ;; - -k|--keep-alive-tmo) + --keep-alive-tmo) keep_alive_tmo="$2" shift 2 ;; - -c|--reconnect-delay) + --reconnect-delay) reconnect_delay="$2" shift 2 ;; - -l|--ctrl-loss-tmo) + --ctrl-loss-tmo) ctrl_loss_tmo="$2" shift 2 ;; From patchwork Thu Mar 21 09:47:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Wagner X-Patchwork-Id: 13598573 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 62E0356B81 for ; Thu, 21 Mar 2024 09:47:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711014464; cv=none; b=SbhZg5tKJ25llF25cMtY+xWG6WnMoI72Xi57/LrXa3gIO+BMC1wJNDkFvGE92G3P1bGyiEId78rMP/bpNvtOtEpixke8B4J1l6GVgDPOOZeVuLCzOOhlBVu8B5yLl84Q2avvPc9cX+6ms/W1iDRyV2ZspJx+vWycZ1nNlqMZlyI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711014464; c=relaxed/simple; bh=Hd17UTXLiTFtGZhS+jD1GZ5+9g1LAPbBU16B3h2G6as=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=RXZLRWGvDtZdgnMoTq2/SvDKLQmKZlvBnWgk7gJQg32fjzye1IXc6TkOCteJFAN6UYfgFCKd6IQSwY71OTTUh0ossJbtFd7ymNzIOPJuTfbVO+ZkhGWxOC0brMcaIufK4biyA06qg1etXAuMLLPDkqw27c6gr+fHBcD1jM0rbUY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=0cmKEI7U; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=W2my15Io; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=0cmKEI7U; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=W2my15Io; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="0cmKEI7U"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="W2my15Io"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="0cmKEI7U"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="W2my15Io" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id E22D43715C; Thu, 21 Mar 2024 09:47:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1711014455; 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=DZcGbnt0fhlsTjFbNnKLHG6/NSKQHZB9rpGpSAbjui4=; b=0cmKEI7UyZJ05DbJvjaXoEnXX6Dh8fNCaN89lXPk4A2c3yHye4AnpmIHO40Za9kQwY2ru0 f2YntIU+4/VDu45j7dU5lGVCjrZJfw9/q1eSRYJpuy/FJt8IgVKfFQ0x1X9btmao1wMbiq /VT/8ciVAmQV5iI/nQMXu8vtNkcjaeA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1711014455; 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=DZcGbnt0fhlsTjFbNnKLHG6/NSKQHZB9rpGpSAbjui4=; b=W2my15IoeLaWyQCCDptKvDuFE2M060ct9FM57Pnvqax5ToYKXvudtEqmDs1u1oTCCI/sZn liZC0ViibvQXYKAw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1711014455; 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=DZcGbnt0fhlsTjFbNnKLHG6/NSKQHZB9rpGpSAbjui4=; b=0cmKEI7UyZJ05DbJvjaXoEnXX6Dh8fNCaN89lXPk4A2c3yHye4AnpmIHO40Za9kQwY2ru0 f2YntIU+4/VDu45j7dU5lGVCjrZJfw9/q1eSRYJpuy/FJt8IgVKfFQ0x1X9btmao1wMbiq /VT/8ciVAmQV5iI/nQMXu8vtNkcjaeA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1711014455; 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=DZcGbnt0fhlsTjFbNnKLHG6/NSKQHZB9rpGpSAbjui4=; b=W2my15IoeLaWyQCCDptKvDuFE2M060ct9FM57Pnvqax5ToYKXvudtEqmDs1u1oTCCI/sZn liZC0ViibvQXYKAw== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id D014413976; Thu, 21 Mar 2024 09:47:35 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id N7lPMTcC/GXLDwAAD6G6ig (envelope-from ); Thu, 21 Mar 2024 09:47:35 +0000 From: Daniel Wagner To: Shin'ichiro Kawasaki Cc: linux-block@vger.kernel.org, linux-nvme@lists.infradead.org, Chaitanya Kulkarni , Hannes Reinecke , Daniel Wagner Subject: [PATCH blktests v1 09/18] nvme/rc: add nqn/uuid args to target setup/cleanup helper Date: Thu, 21 Mar 2024 10:47:18 +0100 Message-ID: <20240321094727.6503-10-dwagner@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240321094727.6503-1-dwagner@suse.de> References: <20240321094727.6503-1-dwagner@suse.de> Precedence: bulk X-Mailing-List: linux-block@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Authentication-Results: smtp-out1.suse.de; none X-Spam-Level: *** X-Spam-Score: 3.72 X-Spamd-Result: default: False [3.72 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_MISSING_CHARSET(2.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; BROKEN_CONTENT_TYPE(1.50)[]; RCPT_COUNT_FIVE(0.00)[6]; NEURAL_HAM_LONG(-0.98)[-0.977]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MID_CONTAINS_FROM(1.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-0.01)[47.47%] X-Spam-Flag: NO Make these helper a bit more flexible, so that the caller can setup not just the default subsysnqn. Signed-off-by: Daniel Wagner --- tests/nvme/rc | 36 ++++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/tests/nvme/rc b/tests/nvme/rc index 1cd4833bae7d..bcc936549689 100644 --- a/tests/nvme/rc +++ b/tests/nvme/rc @@ -817,6 +817,8 @@ _nvmet_target_setup() { local blkdev local ctrlkey="" local hostkey="" + local subsysnqn="${def_subsysnqn}" + local subsys_uuid="${def_subsys_uuid}" local port while [[ $# -gt 0 ]]; do @@ -833,6 +835,14 @@ _nvmet_target_setup() { hostkey="$2" shift 2 ;; + --subsysnqn) + subsysnqn="$2" + shift 2 + ;; + --subsys-uuid) + subsys_uuid="$2" + shift 2 + ;; *) echo "WARNING: unknown argument: $1" shift @@ -847,11 +857,11 @@ _nvmet_target_setup() { blkdev="$(_nvme_def_file_path)" fi - _create_nvmet_subsystem "${def_subsysnqn}" "${blkdev}" \ - "${def_subsys_uuid}" + _create_nvmet_subsystem "${subsysnqn}" "${blkdev}" \ + "${subsys_uuid}" port="$(_create_nvmet_port "${nvme_trtype}")" - _add_nvmet_subsys_to_port "${port}" "${def_subsysnqn}" - _create_nvmet_host "${def_subsysnqn}" "${def_hostnqn}" \ + _add_nvmet_subsys_to_port "${port}" "${subsysnqn}" + _create_nvmet_host "${subsysnqn}" "${def_hostnqn}" \ "${hostkey}" "${ctrlkey}" } @@ -859,14 +869,28 @@ _nvmet_target_cleanup() { local ports local port local blkdev + local subsysnqn="${def_subsysnqn}" + + while [[ $# -gt 0 ]]; do + case $1 in + --subsysnqn) + subsysnqn="$2" + shift 2 + ;; + *) + echo "WARNING: unknown argument: $1" + shift + ;; + esac + done _get_nvmet_ports "${def_subsysnqn}" ports for port in "${ports[@]}"; do - _remove_nvmet_subsystem_from_port "${port}" "${def_subsysnqn}" + _remove_nvmet_subsystem_from_port "${port}" "${subsysnqn}" _remove_nvmet_port "${port}" done - _remove_nvmet_subsystem "${def_subsysnqn}" + _remove_nvmet_subsystem "${subsysnqn}" _remove_nvmet_host "${def_hostnqn}" _cleanup_blkdev From patchwork Thu Mar 21 09:47:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Wagner X-Patchwork-Id: 13598560 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3DB415472A for ; Thu, 21 Mar 2024 09:47:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711014459; cv=none; b=HZuMDq1b6af3DWaA+Kd0YlOp9s6CxTwFiURlSIbfruT2WPFbAbVBisoQCwa/9dK5/MAia1DtX4/P8PKZaF+WA0sQNQcV8GPq3iM9MvJNmI3JL2oy72W4kEtMLxu6uk21G9M3WEGWaMSMOgKpYqlQqhqEUC5/HT4M33M1lyqi11k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711014459; c=relaxed/simple; bh=xBpx4xdyttuWG/yFdfgtDWAnt308WnXkCP1HE8JyQSo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Hc5l1RlZ/YPFMmzWso1wdzF5GF7Gp9UkMG5azKCtBTpK6j0po4oxTU/4Af6Hj9tV0Y/y9dldXU4WBcMRb2uPlv1C9MKIW07o5Sdi3T7FaeAX2xqihxwHEs7QFtBKgJJWhvo8DkDMb4bsTY57cgnsWZpKCsf0pSFZN4qoNWFWCcw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=lG7cD2PK; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=QZ/zVNYi; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=lG7cD2PK; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=QZ/zVNYi; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="lG7cD2PK"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="QZ/zVNYi"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="lG7cD2PK"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="QZ/zVNYi" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 87DA65CBC6; Thu, 21 Mar 2024 09:47:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1711014456; 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=B70yQI77lSD6R+II1ZF++3m28FGPD0kcKsOZKvVNRI0=; b=lG7cD2PKfLoJk7gu7r+HDx/itkFEcsWAwcez8jbz3eC/VUtRFbCy/FGjRG0ekfUs+H7tfj FmuiyxwUJ5G8QAqQ4b6DSfZPHZqHQX17rUcmGuQmsyQRmcZ0wfb2kpNsYHz9n38oGVBdWB Pa7MNVOxVYp8ed/WlsuXLl7AWrCU2Eg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1711014456; 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=B70yQI77lSD6R+II1ZF++3m28FGPD0kcKsOZKvVNRI0=; b=QZ/zVNYi4jlfYxbxWiaKp2RBStX+ZDVoxosa8btQQUhIwMzMGpbJNZenIT90WhkeSNMVMl LDZnx/NboLx0OBBA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1711014456; 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=B70yQI77lSD6R+II1ZF++3m28FGPD0kcKsOZKvVNRI0=; b=lG7cD2PKfLoJk7gu7r+HDx/itkFEcsWAwcez8jbz3eC/VUtRFbCy/FGjRG0ekfUs+H7tfj FmuiyxwUJ5G8QAqQ4b6DSfZPHZqHQX17rUcmGuQmsyQRmcZ0wfb2kpNsYHz9n38oGVBdWB Pa7MNVOxVYp8ed/WlsuXLl7AWrCU2Eg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1711014456; 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=B70yQI77lSD6R+II1ZF++3m28FGPD0kcKsOZKvVNRI0=; b=QZ/zVNYi4jlfYxbxWiaKp2RBStX+ZDVoxosa8btQQUhIwMzMGpbJNZenIT90WhkeSNMVMl LDZnx/NboLx0OBBA== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 6BA1213976; Thu, 21 Mar 2024 09:47:36 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id EtnBGDgC/GXZDwAAD6G6ig (envelope-from ); Thu, 21 Mar 2024 09:47:36 +0000 From: Daniel Wagner To: Shin'ichiro Kawasaki Cc: linux-block@vger.kernel.org, linux-nvme@lists.infradead.org, Chaitanya Kulkarni , Hannes Reinecke , Daniel Wagner Subject: [PATCH blktests v1 10/18] nvme/rc: remove unused connect options Date: Thu, 21 Mar 2024 10:47:19 +0100 Message-ID: <20240321094727.6503-11-dwagner@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240321094727.6503-1-dwagner@suse.de> References: <20240321094727.6503-1-dwagner@suse.de> Precedence: bulk X-Mailing-List: linux-block@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Authentication-Results: smtp-out2.suse.de; none X-Spam-Level: *** X-Spam-Score: 3.72 X-Spamd-Result: default: False [3.72 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_MISSING_CHARSET(2.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; BROKEN_CONTENT_TYPE(1.50)[]; RCPT_COUNT_FIVE(0.00)[6]; NEURAL_HAM_LONG(-0.98)[-0.977]; R_RATELIMIT(0.00)[to_ip_from(RLm9s6cmri9k4spo5w97m8fq33)]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MID_CONTAINS_FROM(1.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[] X-Spam-Flag: NO These options are not used, thus remove them. Signed-off-by: Daniel Wagner --- tests/nvme/rc | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/tests/nvme/rc b/tests/nvme/rc index bcc936549689..ba83f32febb8 100644 --- a/tests/nvme/rc +++ b/tests/nvme/rc @@ -410,9 +410,6 @@ _nvme_connect_subsys() { local positional_args=() local trtype="" local subsysnqn="" - local traddr="$def_traddr" - local host_traddr="$def_host_traddr" - local trsvcid="$def_trsvcid" local hostnqn="$def_hostnqn" local hostid="$def_hostid" local hostkey="" @@ -428,18 +425,6 @@ _nvme_connect_subsys() { while [[ $# -gt 0 ]]; do case $1 in - --traddr) - traddr="$2" - shift 2 - ;; - --host-traddr) - host_traddr="$2" - shift 2 - ;; - --trsvcid) - trsvcid="$2" - shift 2 - ;; --hostnqn) hostnqn="$2" shift 2 @@ -498,9 +483,9 @@ _nvme_connect_subsys() { ARGS=(--transport "${trtype}" --nqn "${subsysnqn}") if [[ "${trtype}" == "fc" ]] ; then - ARGS+=(--traddr "${traddr}" --host-traddr "${host_traddr}") + ARGS+=(--traddr "${def_traddr}" --host-traddr "${def_host_traddr}") elif [[ "${trtype}" != "loop" ]]; then - ARGS+=(--traddr "${traddr}" --trsvcid "${trsvcid}") + ARGS+=(--traddr "${def_traddr}" --trsvcid "${def_trsvcid}") fi ARGS+=(--hostnqn="${hostnqn}") ARGS+=(--hostid="${hostid}") From patchwork Thu Mar 21 09:47:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Wagner X-Patchwork-Id: 13598563 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CD5CE55C3B for ; Thu, 21 Mar 2024 09:47:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711014460; cv=none; b=ei4oNNMj0v7/vjx2V+oudCgPDALBlO4VZkuuP/uRG52eYlaQKfjjSLT1q8vBhGNLX/CT0nTCRcqy56O+dR8DSZo+6WbVKu0APcuSl2lfj/SXaBWvUQJVDH7/zCtk6bXr1BQPfNG6oyrVi0hlZnwORbHrCI4A1JKuhhH5J6GS89c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711014460; c=relaxed/simple; bh=ozF3ZTTja91AckWUISY211uyUv57rz31GfG7VAp6N44=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=sUS11SZz66XOWpkj8Krqa9INyZpL2FSYmma45TGueQ4jbd4KEjxNMWd/gnNDnMQSBipyxzqobzbjIQfBKhxa4NuPF9xcnx+05SD6qTGQhn4/WYw7ttQteMznvTPyKW/ULtdsLsLp+6boMGt44TeYn2do3U19DZP0NBxYuPSisco= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=y6I8OlI3; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=4SzaR9+i; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=y6I8OlI3; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=4SzaR9+i; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="y6I8OlI3"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="4SzaR9+i"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="y6I8OlI3"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="4SzaR9+i" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 1EA9F5CBC7; Thu, 21 Mar 2024 09:47:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1711014457; 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=qESwvGMvANqaY3Icr9sfur8OsYwyqrb2vJVNIQj9xio=; b=y6I8OlI3eiohxtV9+4OabLjUsNVYQFPtcY/cZSM0fE93nI1JGa7KGXmjEH7h3kycPbQ4K+ DdD1OAOf8EbkpvDXWeM/jwPNUnmBhWEDP1hikf+kdhvn0h9lkMFOsc1MOixO4vaovbmWUN iDAbe80TQRCDqvn6PPEmkv4XMsSh0II= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1711014457; 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=qESwvGMvANqaY3Icr9sfur8OsYwyqrb2vJVNIQj9xio=; b=4SzaR9+i/cqhcvNAYXzw7L6HWU0TvFTHlcBAKYkHycl+bWZo9j14ubjQV95/MFBx6JBSI/ tkUfK693sAvnG6Bw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1711014457; 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=qESwvGMvANqaY3Icr9sfur8OsYwyqrb2vJVNIQj9xio=; b=y6I8OlI3eiohxtV9+4OabLjUsNVYQFPtcY/cZSM0fE93nI1JGa7KGXmjEH7h3kycPbQ4K+ DdD1OAOf8EbkpvDXWeM/jwPNUnmBhWEDP1hikf+kdhvn0h9lkMFOsc1MOixO4vaovbmWUN iDAbe80TQRCDqvn6PPEmkv4XMsSh0II= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1711014457; 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=qESwvGMvANqaY3Icr9sfur8OsYwyqrb2vJVNIQj9xio=; b=4SzaR9+i/cqhcvNAYXzw7L6HWU0TvFTHlcBAKYkHycl+bWZo9j14ubjQV95/MFBx6JBSI/ tkUfK693sAvnG6Bw== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 0C9C113976; Thu, 21 Mar 2024 09:47:37 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id XNGuATkC/GXbDwAAD6G6ig (envelope-from ); Thu, 21 Mar 2024 09:47:37 +0000 From: Daniel Wagner To: Shin'ichiro Kawasaki Cc: linux-block@vger.kernel.org, linux-nvme@lists.infradead.org, Chaitanya Kulkarni , Hannes Reinecke , Daniel Wagner Subject: [PATCH blktests v1 11/18] nvme/rc: remove correct port from target Date: Thu, 21 Mar 2024 10:47:20 +0100 Message-ID: <20240321094727.6503-12-dwagner@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240321094727.6503-1-dwagner@suse.de> References: <20240321094727.6503-1-dwagner@suse.de> Precedence: bulk X-Mailing-List: linux-block@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Score: 3.68 X-Spamd-Result: default: False [3.68 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_MISSING_CHARSET(2.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; BROKEN_CONTENT_TYPE(1.50)[]; RCPT_COUNT_FIVE(0.00)[6]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_RATELIMIT(0.00)[to_ip_from(RLm9s6cmri9k4spo5w97m8fq33)]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MID_CONTAINS_FROM(1.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-0.02)[54.11%] X-Spam-Level: *** Authentication-Results: smtp-out2.suse.de; none X-Spam-Flag: NO Remove the port from the subsystem the test wants to remove. Fixes: a12281b8320f ("nvme: introduce nvmet_target_{setup/cleanup} common code") Signed-off-by: Daniel Wagner --- tests/nvme/rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/nvme/rc b/tests/nvme/rc index ba83f32febb8..d74a5418557d 100644 --- a/tests/nvme/rc +++ b/tests/nvme/rc @@ -869,7 +869,7 @@ _nvmet_target_cleanup() { esac done - _get_nvmet_ports "${def_subsysnqn}" ports + _get_nvmet_ports "${subsysnqn}" ports for port in "${ports[@]}"; do _remove_nvmet_subsystem_from_port "${port}" "${subsysnqn}" From patchwork Thu Mar 21 09:47:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Wagner X-Patchwork-Id: 13598567 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A983456B62 for ; Thu, 21 Mar 2024 09:47:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711014463; cv=none; b=JLC8a428C2n5iUfSjEQDzOg1fQUmb2LwiWf9Zvxcp9/ad03kSQQyGZVvlAIX87xQaRwgPORA6pH9bltTQrp9jkyDFrUEAI2XJv6yK/xGc1kgWtPbmU+MD8i1SWHvEao2EVHo845hkfLLFmYZfiANc1CJkb7DVs3OkQ+TAhIq/Js= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711014463; c=relaxed/simple; bh=ePQEE4FlagJFJPTNc1c+7l36gxxdHk2H1DGNV7IhTcA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=EGnEBaAMSNitiPdRaWV92XHVsKbn2tjrQ+3Ldjip9PBt56h2PhMBGcYuEyDfUoml1ZNxKJkB1ZGPkaNbwTT5YoSyJGTP25RrSFGrQINHLUXbZCh4CnqR/kzDwuIlH2XbRpmkErd48DA4WPh+HSLa/JgaWfhpX9seN3PB7Y4Q/Ts= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=x5I8yBjv; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=IhiRnrJN; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=x5I8yBjv; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=IhiRnrJN; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="x5I8yBjv"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="IhiRnrJN"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="x5I8yBjv"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="IhiRnrJN" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id B67D43715D; Thu, 21 Mar 2024 09:47:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1711014457; 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=vyzDDp3p3lrp1DsUfN/vs/oKyxmll6oQP8NBXF15qX8=; b=x5I8yBjvFxWXWXFDBCvQDdgJeeSrMdqg+oNHLKJ6Xx4HJvwiZ6f/afHbb6YSaGZxoJhuse dujqKibsnrJ/Ttz56DdESMSYccVk3JPz4WOx0AHjFSZZ1PFpYKuQWdrd+4xhCGqREytoBE O/jZe8pj1YXq8/4xeEHe+2Aq17ZYB28= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1711014457; 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=vyzDDp3p3lrp1DsUfN/vs/oKyxmll6oQP8NBXF15qX8=; b=IhiRnrJNAj1YIj+uMO6SfFuPB69WPHImeSJsBozPVQNJQ/6zx3oU3bCTf2OI/1D4+8k7tz VOmoFvoJSLxTbwCw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1711014457; 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=vyzDDp3p3lrp1DsUfN/vs/oKyxmll6oQP8NBXF15qX8=; b=x5I8yBjvFxWXWXFDBCvQDdgJeeSrMdqg+oNHLKJ6Xx4HJvwiZ6f/afHbb6YSaGZxoJhuse dujqKibsnrJ/Ttz56DdESMSYccVk3JPz4WOx0AHjFSZZ1PFpYKuQWdrd+4xhCGqREytoBE O/jZe8pj1YXq8/4xeEHe+2Aq17ZYB28= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1711014457; 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=vyzDDp3p3lrp1DsUfN/vs/oKyxmll6oQP8NBXF15qX8=; b=IhiRnrJNAj1YIj+uMO6SfFuPB69WPHImeSJsBozPVQNJQ/6zx3oU3bCTf2OI/1D4+8k7tz VOmoFvoJSLxTbwCw== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id A4EEF13976; Thu, 21 Mar 2024 09:47:37 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id osDWJjkC/GXdDwAAD6G6ig (envelope-from ); Thu, 21 Mar 2024 09:47:37 +0000 From: Daniel Wagner To: Shin'ichiro Kawasaki Cc: linux-block@vger.kernel.org, linux-nvme@lists.infradead.org, Chaitanya Kulkarni , Hannes Reinecke , Daniel Wagner Subject: [PATCH blktests v1 12/18] nvme/031: do not open code target setup/cleanup Date: Thu, 21 Mar 2024 10:47:21 +0100 Message-ID: <20240321094727.6503-13-dwagner@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240321094727.6503-1-dwagner@suse.de> References: <20240321094727.6503-1-dwagner@suse.de> Precedence: bulk X-Mailing-List: linux-block@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Authentication-Results: smtp-out1.suse.de; none X-Spam-Level: ** X-Spam-Score: 2.31 X-Spamd-Result: default: False [2.31 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_MISSING_CHARSET(2.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; BROKEN_CONTENT_TYPE(1.50)[]; RCPT_COUNT_FIVE(0.00)[6]; NEURAL_HAM_LONG(-0.98)[-0.978]; R_RATELIMIT(0.00)[to_ip_from(RLm9s6cmri9k4spo5w97m8fq33)]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MID_CONTAINS_FROM(1.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-1.41)[91.01%] X-Spam-Flag: NO No need to open code the target setup and cleanup step. Just use the common helper to setup and cleanup the target. Signed-off-by: Daniel Wagner --- tests/nvme/031 | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tests/nvme/031 b/tests/nvme/031 index ed5f19668674..892a52170ce9 100755 --- a/tests/nvme/031 +++ b/tests/nvme/031 @@ -40,14 +40,12 @@ test() { port="$(_create_nvmet_port "${nvme_trtype}")" for ((i = 0; i < iterations; i++)); do - _create_nvmet_subsystem "${subsys}$i" "${loop_dev}" - _add_nvmet_subsys_to_port "${port}" "${subsys}$i" - _create_nvmet_host "${subsys}$i" "${def_hostnqn}" + _nvmet_target_setup --subsysnqn "${subsys}$i" --blkdev "${loop_dev}" + _nvme_connect_subsys "${nvme_trtype}" "${subsys}$i" _nvme_disconnect_subsys "${subsys}$i" >> "${FULL}" 2>&1 - _remove_nvmet_subsystem_from_port "${port}" "${subsys}$i" - _remove_nvmet_subsystem "${subsys}$i" - _remove_nvmet_host "${def_hostnqn}" + + _nvmet_target_cleanup --subsysnqn "${subsys}$i" done _remove_nvmet_port "${port}" From patchwork Thu Mar 21 09:47:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Wagner X-Patchwork-Id: 13598565 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CA41D55E4F for ; Thu, 21 Mar 2024 09:47:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711014461; cv=none; b=ByDpFx6JQkrUOhZYaSIWKxRwSC5xfCzcKLBrsh5F+gdwjrLRus+8pP+24xt2fahUEFPMoZNmyqR8mQWhxYW+pDp33z7XpwY7E5RO5g9bettGbZPL51T/lv/6PHirm/fYXcWd1UlGo7x0P48s8qBRNWInfB9b6aB1WkRMrTuQSII= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711014461; c=relaxed/simple; bh=ZMuiMm2YBbt9BkhqcRyU/ZId3xKi8LNTjgFaTJYb/wg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=htDhjw6NVDq7tNxdA+tWs7/F9Hhm1Y9/NvqXVqRmtmHQU8vQdVCZ1A6BhXjPMoLSJ+sp+jwiD2DtG2LD+8an/yGTHgZMH+W00vp7OswNylss4nyvH0B5GeTPtyARgng7WiDSZYGu2hka8dlA7IYg+Ut+uGiRHcxVL2qv/gdJ+Lc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=q7tmfp6h; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=MWFA+urw; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=q7tmfp6h; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=MWFA+urw; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="q7tmfp6h"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="MWFA+urw"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="q7tmfp6h"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="MWFA+urw" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 548CD5CBC8; Thu, 21 Mar 2024 09:47:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1711014458; 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=d+hhT8mYIDmfa1QfLAxQ9c9VKsoPa4xGXF8L0z12hAc=; b=q7tmfp6hi2dtoZTo/ojsmHtopM70td/ZVJoFQ1fAhAVmPq2dbiI/Z9R5MWg+w7JFmrmkgz aJNfetjTKd5SXpWzLrVrD8BhhzCBbsF/LyvYKYlAoO3fLB9XNFsnKDtWamwv02C8ZALFd1 l/tn5thFtPw1VgD4PdiRuSA+gnVUOz4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1711014458; 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=d+hhT8mYIDmfa1QfLAxQ9c9VKsoPa4xGXF8L0z12hAc=; b=MWFA+urwDm/7whjt1gtdSYqZR4RpJ4Z19kC2lmTkCBImJUXLc/BE8/lellTgLkwRT/EBvp fbLKazjW0ZIhEFCg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1711014458; 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=d+hhT8mYIDmfa1QfLAxQ9c9VKsoPa4xGXF8L0z12hAc=; b=q7tmfp6hi2dtoZTo/ojsmHtopM70td/ZVJoFQ1fAhAVmPq2dbiI/Z9R5MWg+w7JFmrmkgz aJNfetjTKd5SXpWzLrVrD8BhhzCBbsF/LyvYKYlAoO3fLB9XNFsnKDtWamwv02C8ZALFd1 l/tn5thFtPw1VgD4PdiRuSA+gnVUOz4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1711014458; 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=d+hhT8mYIDmfa1QfLAxQ9c9VKsoPa4xGXF8L0z12hAc=; b=MWFA+urwDm/7whjt1gtdSYqZR4RpJ4Z19kC2lmTkCBImJUXLc/BE8/lellTgLkwRT/EBvp fbLKazjW0ZIhEFCg== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 425B713976; Thu, 21 Mar 2024 09:47:38 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id 6ky7DjoC/GXfDwAAD6G6ig (envelope-from ); Thu, 21 Mar 2024 09:47:38 +0000 From: Daniel Wagner To: Shin'ichiro Kawasaki Cc: linux-block@vger.kernel.org, linux-nvme@lists.infradead.org, Chaitanya Kulkarni , Hannes Reinecke , Daniel Wagner Subject: [PATCH blktests v1 13/18] nvme/{rc,031}: do not cleanup external managed loop device Date: Thu, 21 Mar 2024 10:47:22 +0100 Message-ID: <20240321094727.6503-14-dwagner@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240321094727.6503-1-dwagner@suse.de> References: <20240321094727.6503-1-dwagner@suse.de> Precedence: bulk X-Mailing-List: linux-block@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Authentication-Results: smtp-out2.suse.de; none X-Spam-Level: *** X-Spam-Score: 3.60 X-Spamd-Result: default: False [3.60 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_MISSING_CHARSET(2.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; BROKEN_CONTENT_TYPE(1.50)[]; RCPT_COUNT_FIVE(0.00)[6]; NEURAL_HAM_LONG(-0.98)[-0.977]; R_RATELIMIT(0.00)[to_ip_from(RLm9s6cmri9k4spo5w97m8fq33)]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MID_CONTAINS_FROM(1.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-0.12)[67.21%] X-Spam-Flag: NO If the test setups a loop device itself (not created by _nvmet_target_create), do not cleanup automatically. Signed-off-by: Daniel Wagner --- tests/nvme/031 | 2 +- tests/nvme/rc | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/nvme/031 b/tests/nvme/031 index 892a52170ce9..bfc43282411e 100755 --- a/tests/nvme/031 +++ b/tests/nvme/031 @@ -45,7 +45,7 @@ test() { _nvme_connect_subsys "${nvme_trtype}" "${subsys}$i" _nvme_disconnect_subsys "${subsys}$i" >> "${FULL}" 2>&1 - _nvmet_target_cleanup --subsysnqn "${subsys}$i" + _nvmet_target_cleanup --subsysnqn "${subsys}$i" --blkdev "${loop_dev}" done _remove_nvmet_port "${port}" diff --git a/tests/nvme/rc b/tests/nvme/rc index d74a5418557d..e6e7b113ca8b 100644 --- a/tests/nvme/rc +++ b/tests/nvme/rc @@ -855,9 +855,14 @@ _nvmet_target_cleanup() { local port local blkdev local subsysnqn="${def_subsysnqn}" + local blkdev_type="" while [[ $# -gt 0 ]]; do case $1 in + --blkdev) + blkdev_type="$2" + shift 2 + ;; --subsysnqn) subsysnqn="$2" shift 2 @@ -878,7 +883,9 @@ _nvmet_target_cleanup() { _remove_nvmet_subsystem "${subsysnqn}" _remove_nvmet_host "${def_hostnqn}" - _cleanup_blkdev + if [[ "${blkdev_type}" == "device" ]]; then + _cleanup_blkdev + fi } _nvmet_passthru_target_setup() { From patchwork Thu Mar 21 09:47:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Wagner X-Patchwork-Id: 13598566 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AC9A95674A for ; Thu, 21 Mar 2024 09:47:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711014462; cv=none; b=dFN3gt3Hta6NYz/4CECkVD9WhvI2rj2nXtEjVXGPkmYjVZFyjQHmxKJ6V6zVeCjxy8ICtuFS7NTPfPFQNFupTCz2AqGY4dmTXsxIjtbVMGXrPmyt32RKGgIro6t3d05Pm2vJ+eWoFyjho86tCHvBMj7B3H8P8iCydfn1lKKB9cE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711014462; c=relaxed/simple; bh=ZzGDe7Yoek0OPjM3XduiCU8w7QdWbc2aRIUL/EfGZkM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Qm0DgVDWulEVYGIPO8jICh2uDnsy02eHKYwk8wN0JnWlxboFrF1bNWVay7KKIBesMRlrd+NEjg2dM84f7tnwx92bs4o6T4oTb+8+uBeL4NPrSsRz2XelBmu71Ll0Z1AOUD78T6Lk+hb+QACSlzMHM9W+cm1PhIUYOCyWBviWX6w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=J1W2qDJR; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=3JT9PTVj; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=I6ydUGac; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=ukOMSCbj; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="J1W2qDJR"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="3JT9PTVj"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="I6ydUGac"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="ukOMSCbj" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id EA7D55CBCA; Thu, 21 Mar 2024 09:47:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1711014459; 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=LospdGfwU23nyiRKkSygCbva6HFl9kE/T36lRWeXP4c=; b=J1W2qDJRvWdcV4yEt7mg50j4NmYKkCabLTncFV0zBR8tMInlX4qaS5SSZ04KVM1C6a7vjh cueTThi/AQYnGqSXi3x12O1layovf2YKVcP7GEaxOpS2JO5XnxaVCz33hWftw4L6TN+z5f Bz7HE52FSgOIkqvmtMarjoQuk0vRUEA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1711014459; 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=LospdGfwU23nyiRKkSygCbva6HFl9kE/T36lRWeXP4c=; b=3JT9PTVjvyBOOYurV4lGohaoQ49zdvQydBe6fLy8joTnTdnUCCLQQrXEzyJGEZ6q/UCRDb tQVgxRiYTRnt8dAg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1711014458; 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=LospdGfwU23nyiRKkSygCbva6HFl9kE/T36lRWeXP4c=; b=I6ydUGac2XPEd5LrYZ4JBP3YI076S2GaxPIbGbbHfWFElebW+g2X3BnRFPqPJWq6YGLpIv PB1c49GXg3bGYXic19eC3y2nY+8tnMyjsXwMBvBOstGLiiU7BNCDYjJQfcIxZ40pEWf3DK Uau8Exx+eY/FfXlSAueCCigcZAcZGrI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1711014458; 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=LospdGfwU23nyiRKkSygCbva6HFl9kE/T36lRWeXP4c=; b=ukOMSCbjHr8T8qLMYfavElruxH3BU+wz0GdLqyv5EZIOEtwEfCjyGApOk4sd0e7IYuJqs7 T/XPZd2yDFXRmGCA== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id D5D4513976; Thu, 21 Mar 2024 09:47:38 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id Z++5MjoC/GXmDwAAD6G6ig (envelope-from ); Thu, 21 Mar 2024 09:47:38 +0000 From: Daniel Wagner To: Shin'ichiro Kawasaki Cc: linux-block@vger.kernel.org, linux-nvme@lists.infradead.org, Chaitanya Kulkarni , Hannes Reinecke , Daniel Wagner Subject: [PATCH blktests v1 14/18] nvme: drop default trtype argument for _nvmet_connect_subsys Date: Thu, 21 Mar 2024 10:47:23 +0100 Message-ID: <20240321094727.6503-15-dwagner@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240321094727.6503-1-dwagner@suse.de> References: <20240321094727.6503-1-dwagner@suse.de> Precedence: bulk X-Mailing-List: linux-block@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Authentication-Results: smtp-out2.suse.de; none X-Spam-Level: X-Spam-Score: 0.72 X-Spamd-Result: default: False [0.72 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_MISSING_CHARSET(2.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; BROKEN_CONTENT_TYPE(1.50)[]; RCPT_COUNT_FIVE(0.00)[6]; NEURAL_HAM_LONG(-0.98)[-0.980]; R_RATELIMIT(0.00)[to_ip_from(RLm9s6cmri9k4spo5w97m8fq33)]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MID_CONTAINS_FROM(1.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-3.00)[100.00%] X-Spam-Flag: NO Every invocation of _nvmet_connect_subsys passes in the default nvme_trtype argument. nvme/rc also assumes the test is always using nvme_trtype for trtype (e.g. cleanup code paths), thus just drop this argument. Signed-off-by: Daniel Wagner --- tests/nvme/003 | 2 +- tests/nvme/004 | 3 +-- tests/nvme/005 | 2 +- tests/nvme/008 | 2 +- tests/nvme/009 | 2 +- tests/nvme/010 | 2 +- tests/nvme/011 | 2 +- tests/nvme/012 | 2 +- tests/nvme/013 | 2 +- tests/nvme/014 | 2 +- tests/nvme/015 | 2 +- tests/nvme/018 | 2 +- tests/nvme/019 | 2 +- tests/nvme/020 | 2 +- tests/nvme/021 | 2 +- tests/nvme/022 | 2 +- tests/nvme/023 | 2 +- tests/nvme/024 | 2 +- tests/nvme/025 | 2 +- tests/nvme/026 | 2 +- tests/nvme/027 | 2 +- tests/nvme/028 | 2 +- tests/nvme/029 | 2 +- tests/nvme/031 | 2 +- tests/nvme/040 | 2 +- tests/nvme/041 | 4 ++-- tests/nvme/042 | 4 ++-- tests/nvme/043 | 4 ++-- tests/nvme/044 | 8 ++++---- tests/nvme/045 | 2 +- tests/nvme/047 | 4 ++-- tests/nvme/048 | 2 +- tests/nvme/rc | 10 ++++------ 33 files changed, 43 insertions(+), 46 deletions(-) diff --git a/tests/nvme/003 b/tests/nvme/003 index b5ea2720100e..9a7c41f0856b 100755 --- a/tests/nvme/003 +++ b/tests/nvme/003 @@ -25,7 +25,7 @@ test() { _nvmet_target_setup - _nvme_connect_subsys "${nvme_trtype}" nqn.2014-08.org.nvmexpress.discovery + _nvme_connect_subsys nqn.2014-08.org.nvmexpress.discovery # This is ugly but checking for the absence of error messages is ... sleep 10 diff --git a/tests/nvme/004 b/tests/nvme/004 index cc5310e78e0b..024ac986e5c1 100755 --- a/tests/nvme/004 +++ b/tests/nvme/004 @@ -22,10 +22,9 @@ test() { _setup_nvmet - _nvmet_target_setup - _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" + _nvme_connect_subsys "${def_subsysnqn}" local nvmedev nvmedev=$(_find_nvme_dev "${def_subsysnqn}") diff --git a/tests/nvme/005 b/tests/nvme/005 index f9956e960a56..80a5359e862e 100755 --- a/tests/nvme/005 +++ b/tests/nvme/005 @@ -25,7 +25,7 @@ test() { _nvmet_target_setup - _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" + _nvme_connect_subsys "${def_subsysnqn}" nvmedev=$(_find_nvme_dev "${def_subsysnqn}") diff --git a/tests/nvme/008 b/tests/nvme/008 index 6ff3362e9c9b..fb1726723d43 100755 --- a/tests/nvme/008 +++ b/tests/nvme/008 @@ -24,7 +24,7 @@ test() { _nvmet_target_setup - _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" + _nvme_connect_subsys "${def_subsysnqn}" nvmedev=$(_find_nvme_dev "${def_subsysnqn}") _check_uuid "${nvmedev}" diff --git a/tests/nvme/009 b/tests/nvme/009 index 4ea00636e5dd..a9d83b675ba2 100755 --- a/tests/nvme/009 +++ b/tests/nvme/009 @@ -23,7 +23,7 @@ test() { _nvmet_target_setup --blkdev file - _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" + _nvme_connect_subsys "${def_subsysnqn}" nvmedev=$(_find_nvme_dev "${def_subsysnqn}") _check_uuid "${nvmedev}" diff --git a/tests/nvme/010 b/tests/nvme/010 index 5ed6cb5c0374..496f6e5c6a52 100755 --- a/tests/nvme/010 +++ b/tests/nvme/010 @@ -24,7 +24,7 @@ test() { _nvmet_target_setup - _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" + _nvme_connect_subsys "${def_subsysnqn}" nvmedev=$(_find_nvme_dev "${def_subsysnqn}") _check_uuid "${nvmedev}" diff --git a/tests/nvme/011 b/tests/nvme/011 index f9150e06434e..14a17a774d5f 100755 --- a/tests/nvme/011 +++ b/tests/nvme/011 @@ -24,7 +24,7 @@ test() { _nvmet_target_setup --blkdev file - _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" + _nvme_connect_subsys "${def_subsysnqn}" nvmedev=$(_find_nvme_dev "${def_subsysnqn}") _check_uuid "${nvmedev}" diff --git a/tests/nvme/012 b/tests/nvme/012 index f0914ce3206b..8dbf8eb1a9f0 100755 --- a/tests/nvme/012 +++ b/tests/nvme/012 @@ -28,7 +28,7 @@ test() { _nvmet_target_setup - _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" + _nvme_connect_subsys "${def_subsysnqn}" nvmedev=$(_find_nvme_dev "${def_subsysnqn}") _check_uuid "${nvmedev}" diff --git a/tests/nvme/013 b/tests/nvme/013 index 3cef009cb9f4..eb22933fdec6 100755 --- a/tests/nvme/013 +++ b/tests/nvme/013 @@ -27,7 +27,7 @@ test() { _nvmet_target_setup --blkdev file - _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" + _nvme_connect_subsys "${def_subsysnqn}" nvmedev=$(_find_nvme_dev "${def_subsysnqn}") _check_uuid "${nvmedev}" diff --git a/tests/nvme/014 b/tests/nvme/014 index c02167142cb3..20ff69176231 100755 --- a/tests/nvme/014 +++ b/tests/nvme/014 @@ -27,7 +27,7 @@ test() { _nvmet_target_setup - _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" + _nvme_connect_subsys "${def_subsysnqn}" nvmedev=$(_find_nvme_dev "${def_subsysnqn}") _check_uuid "${nvmedev}" diff --git a/tests/nvme/015 b/tests/nvme/015 index 8ea90f10bda7..634c42c07a86 100755 --- a/tests/nvme/015 +++ b/tests/nvme/015 @@ -27,7 +27,7 @@ test() { _nvmet_target_setup --blkdev file - _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" + _nvme_connect_subsys "${def_subsysnqn}" nvmedev=$(_find_nvme_dev "${def_subsysnqn}") _check_uuid "${nvmedev}" diff --git a/tests/nvme/018 b/tests/nvme/018 index e631434d7bd6..9225f7d58377 100755 --- a/tests/nvme/018 +++ b/tests/nvme/018 @@ -25,7 +25,7 @@ test() { _nvmet_target_setup --blkdev file - _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" + _nvme_connect_subsys "${def_subsysnqn}" nvmedev=$(_find_nvme_dev "${def_subsysnqn}") _check_uuid "${nvmedev}" diff --git a/tests/nvme/019 b/tests/nvme/019 index 3ab22e2cba01..9cf9f5299305 100755 --- a/tests/nvme/019 +++ b/tests/nvme/019 @@ -26,7 +26,7 @@ test() { _nvmet_target_setup - _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" + _nvme_connect_subsys "${def_subsysnqn}" nvmedev=$(_find_nvme_dev "${def_subsysnqn}") _check_uuid "${nvmedev}" diff --git a/tests/nvme/020 b/tests/nvme/020 index 10de114b83af..f6a204e6e417 100755 --- a/tests/nvme/020 +++ b/tests/nvme/020 @@ -25,7 +25,7 @@ test() { _nvmet_target_setup --blkdev file - _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" + _nvme_connect_subsys "${def_subsysnqn}" nvmedev=$(_find_nvme_dev "${def_subsysnqn}") _check_uuid "${nvmedev}" diff --git a/tests/nvme/021 b/tests/nvme/021 index 7dc6a41b9f7b..73e414e9db47 100755 --- a/tests/nvme/021 +++ b/tests/nvme/021 @@ -24,7 +24,7 @@ test() { _nvmet_target_setup --blkdev file - _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" + _nvme_connect_subsys "${def_subsysnqn}" nvmedev=$(_find_nvme_dev "${def_subsysnqn}") _check_uuid "${nvmedev}" diff --git a/tests/nvme/022 b/tests/nvme/022 index c70fbbae822e..31435cd2e9c7 100755 --- a/tests/nvme/022 +++ b/tests/nvme/022 @@ -24,7 +24,7 @@ test() { _nvmet_target_setup --blkdev file - _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" + _nvme_connect_subsys "${def_subsysnqn}" nvmedev=$(_find_nvme_dev "${def_subsysnqn}") _check_uuid "${nvmedev}" diff --git a/tests/nvme/023 b/tests/nvme/023 index 58f03e8603a7..c4c292899f32 100755 --- a/tests/nvme/023 +++ b/tests/nvme/023 @@ -24,7 +24,7 @@ test() { _nvmet_target_setup - _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" + _nvme_connect_subsys "${def_subsysnqn}" nvmedev=$(_find_nvme_dev "${def_subsysnqn}") _check_uuid "${nvmedev}" diff --git a/tests/nvme/024 b/tests/nvme/024 index 4608f015c4c3..b0d6f5a3c0b9 100755 --- a/tests/nvme/024 +++ b/tests/nvme/024 @@ -24,7 +24,7 @@ test() { _nvmet_target_setup --blkdev file - _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" + _nvme_connect_subsys "${def_subsysnqn}" nvmedev=$(_find_nvme_dev "${def_subsysnqn}") _check_uuid "${nvmedev}" diff --git a/tests/nvme/025 b/tests/nvme/025 index 46f6197cdfed..107eb38ba787 100755 --- a/tests/nvme/025 +++ b/tests/nvme/025 @@ -24,7 +24,7 @@ test() { _nvmet_target_setup --blkdev file - _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" + _nvme_connect_subsys "${def_subsysnqn}" nvmedev=$(_find_nvme_dev "${def_subsysnqn}") _check_uuid "${nvmedev}" diff --git a/tests/nvme/026 b/tests/nvme/026 index d5e13db0a916..ff4ff91d5d4f 100755 --- a/tests/nvme/026 +++ b/tests/nvme/026 @@ -24,7 +24,7 @@ test() { _nvmet_target_setup --blkdev file - _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" + _nvme_connect_subsys "${def_subsysnqn}" nvmedev=$(_find_nvme_dev "${def_subsysnqn}") _check_uuid "${nvmedev}" diff --git a/tests/nvme/027 b/tests/nvme/027 index 82b77a963623..a15e6d6e92d0 100755 --- a/tests/nvme/027 +++ b/tests/nvme/027 @@ -24,7 +24,7 @@ test() { _nvmet_target_setup --blkdev file - _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" + _nvme_connect_subsys "${def_subsysnqn}" nvmedev=$(_find_nvme_dev "${def_subsysnqn}") _check_uuid "${nvmedev}" diff --git a/tests/nvme/028 b/tests/nvme/028 index 0b49e2016d30..41dcb6ef7a4f 100755 --- a/tests/nvme/028 +++ b/tests/nvme/028 @@ -24,7 +24,7 @@ test() { _nvmet_target_setup --blkdev file - _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" + _nvme_connect_subsys "${def_subsysnqn}" nvmedev=$(_find_nvme_dev "${def_subsysnqn}") _check_uuid "${nvmedev}" diff --git a/tests/nvme/029 b/tests/nvme/029 index a4f0cb1402b1..7bde5565b020 100755 --- a/tests/nvme/029 +++ b/tests/nvme/029 @@ -58,7 +58,7 @@ test() { _nvmet_target_setup - _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" + _nvme_connect_subsys "${def_subsysnqn}" nvmedev=$(_find_nvme_dev "${def_subsysnqn}") _check_uuid "${nvmedev}" diff --git a/tests/nvme/031 b/tests/nvme/031 index bfc43282411e..f2a4e817e137 100755 --- a/tests/nvme/031 +++ b/tests/nvme/031 @@ -42,7 +42,7 @@ test() { for ((i = 0; i < iterations; i++)); do _nvmet_target_setup --subsysnqn "${subsys}$i" --blkdev "${loop_dev}" - _nvme_connect_subsys "${nvme_trtype}" "${subsys}$i" + _nvme_connect_subsys "${subsys}$i" _nvme_disconnect_subsys "${subsys}$i" >> "${FULL}" 2>&1 _nvmet_target_cleanup --subsysnqn "${subsys}$i" --blkdev "${loop_dev}" diff --git a/tests/nvme/040 b/tests/nvme/040 index 7759bac9b43c..06d0d0d47368 100755 --- a/tests/nvme/040 +++ b/tests/nvme/040 @@ -26,7 +26,7 @@ test() { _nvmet_target_setup - _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" + _nvme_connect_subsys "${def_subsysnqn}" nvmedev=$(_find_nvme_dev "${def_subsysnqn}") # start fio job diff --git a/tests/nvme/041 b/tests/nvme/041 index c4588d7058ac..02452fd52628 100755 --- a/tests/nvme/041 +++ b/tests/nvme/041 @@ -38,7 +38,7 @@ test() { # Test unauthenticated connection (should fail) echo "Test unauthenticated connection (should fail)" - _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" \ + _nvme_connect_subsys "${def_subsysnqn}" \ --hostnqn "${def_hostnqn}" \ --hostid "${def_hostid}" @@ -46,7 +46,7 @@ test() { # Test authenticated connection echo "Test authenticated connection" - _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" \ + _nvme_connect_subsys "${def_subsysnqn}" \ --hostnqn "${def_hostnqn}" \ --hostid "${def_hostid}" \ --dhchap-secret "${hostkey}" diff --git a/tests/nvme/042 b/tests/nvme/042 index 815d65e7c610..961301ff6993 100755 --- a/tests/nvme/042 +++ b/tests/nvme/042 @@ -41,7 +41,7 @@ test() { fi _set_nvmet_hostkey "${def_hostnqn}" "${hostkey}" - _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" \ + _nvme_connect_subsys "${def_subsysnqn}" \ --hostnqn "${def_hostnqn}" \ --hostid "${def_hostid}" \ --dhchap-secret "${hostkey}" @@ -58,7 +58,7 @@ test() { fi _set_nvmet_hostkey "${def_hostnqn}" "${hostkey}" - _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" \ + _nvme_connect_subsys "${def_subsysnqn}" \ --hostnqn "${def_hostnqn}" \ --hostid "${def_hostid}" \ --dhchap-secret "${hostkey}" diff --git a/tests/nvme/043 b/tests/nvme/043 index e65abb09fe7c..ed18869a5977 100755 --- a/tests/nvme/043 +++ b/tests/nvme/043 @@ -45,7 +45,7 @@ test() { _set_nvmet_hash "${def_hostnqn}" "${hash}" - _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" \ + _nvme_connect_subsys "${def_subsysnqn}" \ --hostnqn "${def_hostnqn}" \ --hostid "${def_hostid}" \ --dhchap-secret "${hostkey}" @@ -59,7 +59,7 @@ test() { _set_nvmet_dhgroup "${def_hostnqn}" "${dhgroup}" - _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" \ + _nvme_connect_subsys "${def_subsysnqn}" \ --hostnqn "${def_hostnqn}" \ --hostid "${def_hostid}" \ --dhchap-secret "${hostkey}" diff --git a/tests/nvme/044 b/tests/nvme/044 index 9ee07475e738..8e2b4131b969 100755 --- a/tests/nvme/044 +++ b/tests/nvme/044 @@ -49,7 +49,7 @@ test() { # Step 1: Connect with host authentication only echo "Test host authentication" - _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" \ + _nvme_connect_subsys "${def_subsysnqn}" \ --hostnqn "${def_hostnqn}" \ --hostid "${def_hostid}" \ --dhchap-secret "${hostkey}" @@ -59,7 +59,7 @@ test() { # Step 2: Connect with host authentication # and invalid ctrl authentication echo "Test invalid ctrl authentication (should fail)" - _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" \ + _nvme_connect_subsys "${def_subsysnqn}" \ --hostnqn "${def_hostnqn}" \ --hostid "${def_hostid}" \ --dhchap-secret "${hostkey}" \ @@ -70,7 +70,7 @@ test() { # Step 3: Connect with host authentication # and valid ctrl authentication echo "Test valid ctrl authentication" - _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" \ + _nvme_connect_subsys "${def_subsysnqn}" \ --hostnqn "${def_hostnqn}" \ --hostid "${def_hostid}" \ --dhchap-secret "${hostkey}" \ @@ -82,7 +82,7 @@ test() { # and invalid ctrl key echo "Test invalid ctrl key (should fail)" invkey="DHHC-1:00:Jc/My1o0qtLCWRp+sHhAVafdfaS7YQOMYhk9zSmlatobqB8C:" - _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" \ + _nvme_connect_subsys "${def_subsysnqn}" \ --hostnqn "${def_hostnqn}" \ --hostid "${def_hostid}" \ --dhchap-secret "${hostkey}" \ diff --git a/tests/nvme/045 b/tests/nvme/045 index 9e5cb54e9533..f89378836e67 100755 --- a/tests/nvme/045 +++ b/tests/nvme/045 @@ -51,7 +51,7 @@ test() { _set_nvmet_dhgroup "${def_hostnqn}" "ffdhe2048" - _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" \ + _nvme_connect_subsys "${def_subsysnqn}" \ --hostnqn "${def_hostnqn}" \ --hostid "${def_hostid}" \ --dhchap-secret "${hostkey}" \ diff --git a/tests/nvme/047 b/tests/nvme/047 index 94d7d50f9f98..162bd3bf70fa 100755 --- a/tests/nvme/047 +++ b/tests/nvme/047 @@ -27,7 +27,7 @@ test() { _nvmet_target_setup - _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" \ + _nvme_connect_subsys \ --nr-write-queues 1 || echo FAIL nvmedev=$(_find_nvme_dev "${def_subsysnqn}") @@ -37,7 +37,7 @@ test() { _nvme_disconnect_subsys "${def_subsysnqn}" >> "$FULL" 2>&1 - _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" \ + _nvme_connect_subsys "${def_subsysnqn}" \ --nr-write-queues 1 \ --nr-poll-queues 1 || echo FAIL diff --git a/tests/nvme/048 b/tests/nvme/048 index f76cfedf8b03..44fdffe287c8 100755 --- a/tests/nvme/048 +++ b/tests/nvme/048 @@ -99,7 +99,7 @@ test() { _nvmet_target_setup --blkdev file if [[ -f "${cfs_path}/attr_qid_max" ]] ; then - _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" \ + _nvme_connect_subsys "${def_subsysnqn}" \ --hostnqn "${def_hostnqn}" \ --hostid "${def_hostid}" \ --keep-alive-tmo 1 \ diff --git a/tests/nvme/rc b/tests/nvme/rc index e6e7b113ca8b..91c80aea59e8 100644 --- a/tests/nvme/rc +++ b/tests/nvme/rc @@ -408,7 +408,6 @@ _nvme_disconnect_subsys() { _nvme_connect_subsys() { local positional_args=() - local trtype="" local subsysnqn="" local hostnqn="$def_hostnqn" local hostid="$def_hostid" @@ -478,13 +477,12 @@ _nvme_connect_subsys() { set -- "${positional_args[@]}" - trtype="$1" - subsysnqn="$2" + subsysnqn="$1" - ARGS=(--transport "${trtype}" --nqn "${subsysnqn}") - if [[ "${trtype}" == "fc" ]] ; then + ARGS=(--transport "${nvme_trtype}" --nqn "${subsysnqn}") + if [[ "${nvme_trtype}" == "fc" ]] ; then ARGS+=(--traddr "${def_traddr}" --host-traddr "${def_host_traddr}") - elif [[ "${trtype}" != "loop" ]]; then + elif [[ "${nvme_trtype}" != "loop" ]]; then ARGS+=(--traddr "${def_traddr}" --trsvcid "${def_trsvcid}") fi ARGS+=(--hostnqn="${hostnqn}") From patchwork Thu Mar 21 09:47:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Wagner X-Patchwork-Id: 13598570 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A985D56B68 for ; Thu, 21 Mar 2024 09:47:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711014464; cv=none; b=lcbyGE3EtQfJUedLvmENyDCQtcTVMQ7JKcPmMW0jeigagJEV2rbyFOadkTgzvui98vXu0BuIhVPV9UjU2QQfVOYkmX7uOVGhjbrtD2yCecnvOZX+2n2QLnmTXYfeOo4mHVPQlwNoyYwCZSyc/btNgjZrtjah5b2FuqImmUsKk/k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711014464; c=relaxed/simple; bh=3Sf7e2azTAtgQjTL2PI9/yJTg5Yvw3o6UXppdOcyWak=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=h3yvg8oZcDMvLKZ8qXb8d2j2ao+bkWtZRm1xuhllSVxeX+wRDPf2rQWlvaleM4RlsA527YBP22SGiHcpYt01F2hmce1e42nOLfaV4KfUalP38npxYjXOZyHdArdRWMYsD99sZFW0d7LHxZR1cumaL4p7+VkXYDwbvvmFyDmzqp8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=Yfl+lYSv; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=3bbsA29+; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=Yfl+lYSv; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=3bbsA29+; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="Yfl+lYSv"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="3bbsA29+"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="Yfl+lYSv"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="3bbsA29+" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 8FC7A3715E; Thu, 21 Mar 2024 09:47:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1711014459; 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=YCgJs3cl3qSz8cdEBO9oHuFamWa0vG+sDjG9BJvAsZQ=; b=Yfl+lYSvyxJoSHvsg7bZQ7C/lmsjAgUqBnOHQXsfW2gVJXMit+mr0HTZoX0e+nQ61gXn8n OEgoLzjhIF+T3+gQphDuxLn4hYWzr5XuuVU9NlmEHiczqHFMj5Fy4xbKFFoCayyMn6vSdD pfnsuMF8KgQqRXZ6qFY1c6NH/Or9Iic= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1711014459; 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=YCgJs3cl3qSz8cdEBO9oHuFamWa0vG+sDjG9BJvAsZQ=; b=3bbsA29+xHbGqxUW5dRJ2BZQG4/VXcOa3RrG5rI6T47QeD1NEZlotSBKmKTyjFgNVmim+c EcmE8JwUsfKRssCQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1711014459; 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=YCgJs3cl3qSz8cdEBO9oHuFamWa0vG+sDjG9BJvAsZQ=; b=Yfl+lYSvyxJoSHvsg7bZQ7C/lmsjAgUqBnOHQXsfW2gVJXMit+mr0HTZoX0e+nQ61gXn8n OEgoLzjhIF+T3+gQphDuxLn4hYWzr5XuuVU9NlmEHiczqHFMj5Fy4xbKFFoCayyMn6vSdD pfnsuMF8KgQqRXZ6qFY1c6NH/Or9Iic= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1711014459; 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=YCgJs3cl3qSz8cdEBO9oHuFamWa0vG+sDjG9BJvAsZQ=; b=3bbsA29+xHbGqxUW5dRJ2BZQG4/VXcOa3RrG5rI6T47QeD1NEZlotSBKmKTyjFgNVmim+c EcmE8JwUsfKRssCQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 7873613976; Thu, 21 Mar 2024 09:47:39 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id opH/GzsC/GXpDwAAD6G6ig (envelope-from ); Thu, 21 Mar 2024 09:47:39 +0000 From: Daniel Wagner To: Shin'ichiro Kawasaki Cc: linux-block@vger.kernel.org, linux-nvme@lists.infradead.org, Chaitanya Kulkarni , Hannes Reinecke , Daniel Wagner Subject: [PATCH blktests v1 15/18] nvme: drop default subsysnqn argument from _nvme_{connect|disconnect}_subsys Date: Thu, 21 Mar 2024 10:47:24 +0100 Message-ID: <20240321094727.6503-16-dwagner@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240321094727.6503-1-dwagner@suse.de> References: <20240321094727.6503-1-dwagner@suse.de> Precedence: bulk X-Mailing-List: linux-block@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Authentication-Results: smtp-out1.suse.de; none X-Spam-Level: X-Spam-Score: 0.72 X-Spamd-Result: default: False [0.72 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_MISSING_CHARSET(2.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; BROKEN_CONTENT_TYPE(1.50)[]; RCPT_COUNT_FIVE(0.00)[6]; NEURAL_HAM_LONG(-0.98)[-0.980]; R_RATELIMIT(0.00)[to_ip_from(RLm9s6cmri9k4spo5w97m8fq33)]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MID_CONTAINS_FROM(1.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-3.00)[100.00%] X-Spam-Flag: NO Remove the last positional argument for _nvme_connect_subsys which most test pass in the default subsysnqn anyway. There is little point in cluttering all the test textual noise. Signed-off-by: Daniel Wagner --- tests/nvme/003 | 4 ++-- tests/nvme/004 | 4 ++-- tests/nvme/005 | 2 +- tests/nvme/008 | 4 ++-- tests/nvme/009 | 4 ++-- tests/nvme/010 | 4 ++-- tests/nvme/011 | 4 ++-- tests/nvme/012 | 4 ++-- tests/nvme/013 | 4 ++-- tests/nvme/014 | 4 ++-- tests/nvme/015 | 4 ++-- tests/nvme/018 | 4 ++-- tests/nvme/019 | 4 ++-- tests/nvme/020 | 4 ++-- tests/nvme/021 | 4 ++-- tests/nvme/022 | 4 ++-- tests/nvme/023 | 4 ++-- tests/nvme/024 | 4 ++-- tests/nvme/025 | 4 ++-- tests/nvme/026 | 4 ++-- tests/nvme/027 | 4 ++-- tests/nvme/028 | 4 ++-- tests/nvme/029 | 4 ++-- tests/nvme/031 | 4 ++-- tests/nvme/040 | 2 +- tests/nvme/041 | 10 ++++------ tests/nvme/042 | 10 ++++------ tests/nvme/043 | 10 ++++------ tests/nvme/044 | 20 ++++++++------------ tests/nvme/045 | 6 ++---- tests/nvme/047 | 4 ++-- tests/nvme/048 | 11 +++++------ tests/nvme/rc | 28 ++++++++++++++++++++-------- 33 files changed, 97 insertions(+), 98 deletions(-) diff --git a/tests/nvme/003 b/tests/nvme/003 index 9a7c41f0856b..be6b4e18ec30 100755 --- a/tests/nvme/003 +++ b/tests/nvme/003 @@ -25,7 +25,7 @@ test() { _nvmet_target_setup - _nvme_connect_subsys nqn.2014-08.org.nvmexpress.discovery + _nvme_connect_subsys --subsysnqn "nqn.2014-08.org.nvmexpress.discovery" # This is ugly but checking for the absence of error messages is ... sleep 10 @@ -38,7 +38,7 @@ test() { echo "Fail" fi - _nvme_disconnect_subsys nqn.2014-08.org.nvmexpress.discovery + _nvme_disconnect_subsys --subsysnqn "nqn.2014-08.org.nvmexpress.discovery" _nvmet_target_cleanup diff --git a/tests/nvme/004 b/tests/nvme/004 index 024ac986e5c1..b751746c6c91 100755 --- a/tests/nvme/004 +++ b/tests/nvme/004 @@ -24,13 +24,13 @@ test() { _nvmet_target_setup - _nvme_connect_subsys "${def_subsysnqn}" + _nvme_connect_subsys local nvmedev nvmedev=$(_find_nvme_dev "${def_subsysnqn}") _check_uuid "${nvmedev}" - _nvme_disconnect_subsys ${def_subsysnqn} + _nvme_disconnect_subsys _nvmet_target_cleanup diff --git a/tests/nvme/005 b/tests/nvme/005 index 80a5359e862e..f17174d40dfc 100755 --- a/tests/nvme/005 +++ b/tests/nvme/005 @@ -25,7 +25,7 @@ test() { _nvmet_target_setup - _nvme_connect_subsys "${def_subsysnqn}" + _nvme_connect_subsys nvmedev=$(_find_nvme_dev "${def_subsysnqn}") diff --git a/tests/nvme/008 b/tests/nvme/008 index fb1726723d43..a5d06818c6e4 100755 --- a/tests/nvme/008 +++ b/tests/nvme/008 @@ -24,12 +24,12 @@ test() { _nvmet_target_setup - _nvme_connect_subsys "${def_subsysnqn}" + _nvme_connect_subsys nvmedev=$(_find_nvme_dev "${def_subsysnqn}") _check_uuid "${nvmedev}" - _nvme_disconnect_subsys "${def_subsysnqn}" + _nvme_disconnect_subsys _nvmet_target_cleanup diff --git a/tests/nvme/009 b/tests/nvme/009 index a9d83b675ba2..a1655d43e56f 100755 --- a/tests/nvme/009 +++ b/tests/nvme/009 @@ -23,12 +23,12 @@ test() { _nvmet_target_setup --blkdev file - _nvme_connect_subsys "${def_subsysnqn}" + _nvme_connect_subsys nvmedev=$(_find_nvme_dev "${def_subsysnqn}") _check_uuid "${nvmedev}" - _nvme_disconnect_subsys "${def_subsysnqn}" + _nvme_disconnect_subsys _nvmet_target_cleanup diff --git a/tests/nvme/010 b/tests/nvme/010 index 496f6e5c6a52..7d875989a01c 100755 --- a/tests/nvme/010 +++ b/tests/nvme/010 @@ -24,7 +24,7 @@ test() { _nvmet_target_setup - _nvme_connect_subsys "${def_subsysnqn}" + _nvme_connect_subsys nvmedev=$(_find_nvme_dev "${def_subsysnqn}") _check_uuid "${nvmedev}" @@ -32,7 +32,7 @@ test() { _run_fio_verify_io --size="${nvme_img_size}" \ --filename="/dev/${nvmedev}n1" - _nvme_disconnect_subsys "${def_subsysnqn}" + _nvme_disconnect_subsys _nvmet_target_cleanup diff --git a/tests/nvme/011 b/tests/nvme/011 index 14a17a774d5f..0acc8b1dbaed 100755 --- a/tests/nvme/011 +++ b/tests/nvme/011 @@ -24,7 +24,7 @@ test() { _nvmet_target_setup --blkdev file - _nvme_connect_subsys "${def_subsysnqn}" + _nvme_connect_subsys nvmedev=$(_find_nvme_dev "${def_subsysnqn}") _check_uuid "${nvmedev}" @@ -32,7 +32,7 @@ test() { _run_fio_verify_io --size="${nvme_img_size}" \ --filename="/dev/${nvmedev}n1" - _nvme_disconnect_subsys "${def_subsysnqn}" + _nvme_disconnect_subsys _nvmet_target_cleanup diff --git a/tests/nvme/012 b/tests/nvme/012 index 8dbf8eb1a9f0..a0bff298ab29 100755 --- a/tests/nvme/012 +++ b/tests/nvme/012 @@ -28,7 +28,7 @@ test() { _nvmet_target_setup - _nvme_connect_subsys "${def_subsysnqn}" + _nvme_connect_subsys nvmedev=$(_find_nvme_dev "${def_subsysnqn}") _check_uuid "${nvmedev}" @@ -37,7 +37,7 @@ test() { echo "FAIL: fio verify failed" fi - _nvme_disconnect_subsys "${def_subsysnqn}" + _nvme_disconnect_subsys _nvmet_target_cleanup diff --git a/tests/nvme/013 b/tests/nvme/013 index eb22933fdec6..5e5026eabe17 100755 --- a/tests/nvme/013 +++ b/tests/nvme/013 @@ -27,7 +27,7 @@ test() { _nvmet_target_setup --blkdev file - _nvme_connect_subsys "${def_subsysnqn}" + _nvme_connect_subsys nvmedev=$(_find_nvme_dev "${def_subsysnqn}") _check_uuid "${nvmedev}" @@ -36,7 +36,7 @@ test() { echo "FAIL: fio verify failed" fi - _nvme_disconnect_subsys "${def_subsysnqn}" + _nvme_disconnect_subsys _nvmet_target_cleanup diff --git a/tests/nvme/014 b/tests/nvme/014 index 20ff69176231..da4b4c13b347 100755 --- a/tests/nvme/014 +++ b/tests/nvme/014 @@ -27,7 +27,7 @@ test() { _nvmet_target_setup - _nvme_connect_subsys "${def_subsysnqn}" + _nvme_connect_subsys nvmedev=$(_find_nvme_dev "${def_subsysnqn}") _check_uuid "${nvmedev}" @@ -41,7 +41,7 @@ test() { nvme flush "/dev/${nvmedev}" --namespace-id 1 - _nvme_disconnect_subsys "${def_subsysnqn}" + _nvme_disconnect_subsys _nvmet_target_cleanup diff --git a/tests/nvme/015 b/tests/nvme/015 index 634c42c07a86..b82f2253c011 100755 --- a/tests/nvme/015 +++ b/tests/nvme/015 @@ -27,7 +27,7 @@ test() { _nvmet_target_setup --blkdev file - _nvme_connect_subsys "${def_subsysnqn}" + _nvme_connect_subsys nvmedev=$(_find_nvme_dev "${def_subsysnqn}") _check_uuid "${nvmedev}" @@ -41,7 +41,7 @@ test() { nvme flush "/dev/${nvmedev}n1" --namespace-id 1 - _nvme_disconnect_subsys "${def_subsysnqn}" + _nvme_disconnect_subsys _nvmet_target_cleanup diff --git a/tests/nvme/018 b/tests/nvme/018 index 9225f7d58377..bd6e5e930e35 100755 --- a/tests/nvme/018 +++ b/tests/nvme/018 @@ -25,7 +25,7 @@ test() { _nvmet_target_setup --blkdev file - _nvme_connect_subsys "${def_subsysnqn}" + _nvme_connect_subsys nvmedev=$(_find_nvme_dev "${def_subsysnqn}") _check_uuid "${nvmedev}" @@ -39,7 +39,7 @@ test() { --block-count 0 --data-size "$bs" &>"$FULL" \ && echo "ERROR: nvme read for out of range LBA was not rejected" - _nvme_disconnect_subsys "${def_subsysnqn}" + _nvme_disconnect_subsys _nvmet_target_cleanup diff --git a/tests/nvme/019 b/tests/nvme/019 index 9cf9f5299305..4d7de8191da7 100755 --- a/tests/nvme/019 +++ b/tests/nvme/019 @@ -26,7 +26,7 @@ test() { _nvmet_target_setup - _nvme_connect_subsys "${def_subsysnqn}" + _nvme_connect_subsys nvmedev=$(_find_nvme_dev "${def_subsysnqn}") _check_uuid "${nvmedev}" @@ -34,7 +34,7 @@ test() { nvme dsm "/dev/${nvmedev}" --namespace-id 1 --ad \ --slbs "${sblk_range}" --blocks "${nblk_range}" - _nvme_disconnect_subsys "${def_subsysnqn}" + _nvme_disconnect_subsys _nvmet_target_cleanup diff --git a/tests/nvme/020 b/tests/nvme/020 index f6a204e6e417..c734210c5bd9 100755 --- a/tests/nvme/020 +++ b/tests/nvme/020 @@ -25,7 +25,7 @@ test() { _nvmet_target_setup --blkdev file - _nvme_connect_subsys "${def_subsysnqn}" + _nvme_connect_subsys nvmedev=$(_find_nvme_dev "${def_subsysnqn}") _check_uuid "${nvmedev}" @@ -33,7 +33,7 @@ test() { nvme dsm "/dev/${nvmedev}" --namespace-id 1 --ad \ --slbs "${sblk_range}" --blocks "${nblk_range}" - _nvme_disconnect_subsys "${def_subsysnqn}" + _nvme_disconnect_subsys _nvmet_target_cleanup diff --git a/tests/nvme/021 b/tests/nvme/021 index 73e414e9db47..358e209d0458 100755 --- a/tests/nvme/021 +++ b/tests/nvme/021 @@ -24,7 +24,7 @@ test() { _nvmet_target_setup --blkdev file - _nvme_connect_subsys "${def_subsysnqn}" + _nvme_connect_subsys nvmedev=$(_find_nvme_dev "${def_subsysnqn}") _check_uuid "${nvmedev}" @@ -33,7 +33,7 @@ test() { echo "ERROR: device not listed" fi - _nvme_disconnect_subsys "${def_subsysnqn}" >> "$FULL" 2>&1 + _nvme_disconnect_subsys >> "$FULL" 2>&1 _nvmet_target_cleanup diff --git a/tests/nvme/022 b/tests/nvme/022 index 31435cd2e9c7..7ce33ddbf006 100755 --- a/tests/nvme/022 +++ b/tests/nvme/022 @@ -24,7 +24,7 @@ test() { _nvmet_target_setup --blkdev file - _nvme_connect_subsys "${def_subsysnqn}" + _nvme_connect_subsys nvmedev=$(_find_nvme_dev "${def_subsysnqn}") _check_uuid "${nvmedev}" @@ -33,7 +33,7 @@ test() { echo "ERROR: reset failed" fi - _nvme_disconnect_subsys "${def_subsysnqn}" >> "$FULL" 2>&1 + _nvme_disconnect_subsys >> "$FULL" 2>&1 _nvmet_target_cleanup diff --git a/tests/nvme/023 b/tests/nvme/023 index c4c292899f32..abbb35a0b580 100755 --- a/tests/nvme/023 +++ b/tests/nvme/023 @@ -24,7 +24,7 @@ test() { _nvmet_target_setup - _nvme_connect_subsys "${def_subsysnqn}" + _nvme_connect_subsys nvmedev=$(_find_nvme_dev "${def_subsysnqn}") _check_uuid "${nvmedev}" @@ -34,7 +34,7 @@ test() { echo "ERROR: smart-log bdev-ns failed" fi - _nvme_disconnect_subsys "${def_subsysnqn}" >> "$FULL" 2>&1 + _nvme_disconnect_subsys >> "$FULL" 2>&1 _nvmet_target_cleanup diff --git a/tests/nvme/024 b/tests/nvme/024 index b0d6f5a3c0b9..3ee18822e26b 100755 --- a/tests/nvme/024 +++ b/tests/nvme/024 @@ -24,7 +24,7 @@ test() { _nvmet_target_setup --blkdev file - _nvme_connect_subsys "${def_subsysnqn}" + _nvme_connect_subsys nvmedev=$(_find_nvme_dev "${def_subsysnqn}") _check_uuid "${nvmedev}" @@ -33,7 +33,7 @@ test() { >> "$FULL" 2>&1; then echo "ERROR: smart-log file-ns failed" fi - _nvme_disconnect_subsys "${def_subsysnqn}" >> "$FULL" 2>&1 + _nvme_disconnect_subsys >> "$FULL" 2>&1 _nvmet_target_cleanup diff --git a/tests/nvme/025 b/tests/nvme/025 index 107eb38ba787..3cd62d0b4e5e 100755 --- a/tests/nvme/025 +++ b/tests/nvme/025 @@ -24,7 +24,7 @@ test() { _nvmet_target_setup --blkdev file - _nvme_connect_subsys "${def_subsysnqn}" + _nvme_connect_subsys nvmedev=$(_find_nvme_dev "${def_subsysnqn}") _check_uuid "${nvmedev}" @@ -33,7 +33,7 @@ test() { echo "ERROR: effects-log failed" fi - _nvme_disconnect_subsys "${def_subsysnqn}" >> "$FULL" 2>&1 + _nvme_disconnect_subsys >> "$FULL" 2>&1 _nvmet_target_cleanup diff --git a/tests/nvme/026 b/tests/nvme/026 index ff4ff91d5d4f..5d54b0ff3d28 100755 --- a/tests/nvme/026 +++ b/tests/nvme/026 @@ -24,7 +24,7 @@ test() { _nvmet_target_setup --blkdev file - _nvme_connect_subsys "${def_subsysnqn}" + _nvme_connect_subsys nvmedev=$(_find_nvme_dev "${def_subsysnqn}") _check_uuid "${nvmedev}" @@ -34,7 +34,7 @@ test() { echo "ERROR: ns-desc failed" fi - _nvme_disconnect_subsys "${def_subsysnqn}" >> "$FULL" 2>&1 + _nvme_disconnect_subsys >> "$FULL" 2>&1 _nvmet_target_cleanup diff --git a/tests/nvme/027 b/tests/nvme/027 index a15e6d6e92d0..053fd58f9369 100755 --- a/tests/nvme/027 +++ b/tests/nvme/027 @@ -24,7 +24,7 @@ test() { _nvmet_target_setup --blkdev file - _nvme_connect_subsys "${def_subsysnqn}" + _nvme_connect_subsys nvmedev=$(_find_nvme_dev "${def_subsysnqn}") _check_uuid "${nvmedev}" @@ -33,7 +33,7 @@ test() { echo "ERROR: ns-rescan failed" fi - _nvme_disconnect_subsys "${def_subsysnqn}" >> "$FULL" 2>&1 + _nvme_disconnect_subsys >> "$FULL" 2>&1 _nvmet_target_cleanup diff --git a/tests/nvme/028 b/tests/nvme/028 index 41dcb6ef7a4f..4710bba1f416 100755 --- a/tests/nvme/028 +++ b/tests/nvme/028 @@ -24,7 +24,7 @@ test() { _nvmet_target_setup --blkdev file - _nvme_connect_subsys "${def_subsysnqn}" + _nvme_connect_subsys nvmedev=$(_find_nvme_dev "${def_subsysnqn}") _check_uuid "${nvmedev}" @@ -33,7 +33,7 @@ test() { echo "ERROR: list-subsys" fi - _nvme_disconnect_subsys "${def_subsysnqn}" >> "$FULL" 2>&1 + _nvme_disconnect_subsys >> "$FULL" 2>&1 _nvmet_target_cleanup diff --git a/tests/nvme/029 b/tests/nvme/029 index 7bde5565b020..8dbe49ba15cc 100755 --- a/tests/nvme/029 +++ b/tests/nvme/029 @@ -58,7 +58,7 @@ test() { _nvmet_target_setup - _nvme_connect_subsys "${def_subsysnqn}" + _nvme_connect_subsys nvmedev=$(_find_nvme_dev "${def_subsysnqn}") _check_uuid "${nvmedev}" @@ -84,7 +84,7 @@ test() { echo 0 > /proc/sys/vm/nr_hugepages fi - _nvme_disconnect_subsys "${def_subsysnqn}" >> "$FULL" 2>&1 + _nvme_disconnect_subsys >> "$FULL" 2>&1 _nvmet_target_cleanup diff --git a/tests/nvme/031 b/tests/nvme/031 index f2a4e817e137..943cac984877 100755 --- a/tests/nvme/031 +++ b/tests/nvme/031 @@ -42,8 +42,8 @@ test() { for ((i = 0; i < iterations; i++)); do _nvmet_target_setup --subsysnqn "${subsys}$i" --blkdev "${loop_dev}" - _nvme_connect_subsys "${subsys}$i" - _nvme_disconnect_subsys "${subsys}$i" >> "${FULL}" 2>&1 + _nvme_connect_subsys --subsysnqn "${subsys}$i" + _nvme_disconnect_subsys --subsysnqn "${subsys}$i" >> "${FULL}" 2>&1 _nvmet_target_cleanup --subsysnqn "${subsys}$i" --blkdev "${loop_dev}" done diff --git a/tests/nvme/040 b/tests/nvme/040 index 06d0d0d47368..f00fc16b643f 100755 --- a/tests/nvme/040 +++ b/tests/nvme/040 @@ -26,7 +26,7 @@ test() { _nvmet_target_setup - _nvme_connect_subsys "${def_subsysnqn}" + _nvme_connect_subsys nvmedev=$(_find_nvme_dev "${def_subsysnqn}") # start fio job diff --git a/tests/nvme/041 b/tests/nvme/041 index 02452fd52628..d6845628726e 100755 --- a/tests/nvme/041 +++ b/tests/nvme/041 @@ -38,20 +38,18 @@ test() { # Test unauthenticated connection (should fail) echo "Test unauthenticated connection (should fail)" - _nvme_connect_subsys "${def_subsysnqn}" \ - --hostnqn "${def_hostnqn}" \ + _nvme_connect_subsys --hostnqn "${def_hostnqn}" \ --hostid "${def_hostid}" - _nvme_disconnect_subsys "${def_subsysnqn}" + _nvme_disconnect_subsys # Test authenticated connection echo "Test authenticated connection" - _nvme_connect_subsys "${def_subsysnqn}" \ - --hostnqn "${def_hostnqn}" \ + _nvme_connect_subsys --hostnqn "${def_hostnqn}" \ --hostid "${def_hostid}" \ --dhchap-secret "${hostkey}" - _nvme_disconnect_subsys "${def_subsysnqn}" + _nvme_disconnect_subsys _nvmet_target_cleanup diff --git a/tests/nvme/042 b/tests/nvme/042 index 961301ff6993..480e1cba9d19 100755 --- a/tests/nvme/042 +++ b/tests/nvme/042 @@ -41,12 +41,11 @@ test() { fi _set_nvmet_hostkey "${def_hostnqn}" "${hostkey}" - _nvme_connect_subsys "${def_subsysnqn}" \ - --hostnqn "${def_hostnqn}" \ + _nvme_connect_subsys --hostnqn "${def_hostnqn}" \ --hostid "${def_hostid}" \ --dhchap-secret "${hostkey}" - _nvme_disconnect_subsys "${def_subsysnqn}" + _nvme_disconnect_subsys done for key_len in 32 48 64; do @@ -58,12 +57,11 @@ test() { fi _set_nvmet_hostkey "${def_hostnqn}" "${hostkey}" - _nvme_connect_subsys "${def_subsysnqn}" \ - --hostnqn "${def_hostnqn}" \ + _nvme_connect_subsys --hostnqn "${def_hostnqn}" \ --hostid "${def_hostid}" \ --dhchap-secret "${hostkey}" - _nvme_disconnect_subsys "${def_subsysnqn}" + _nvme_disconnect_subsys done _nvmet_target_cleanup diff --git a/tests/nvme/043 b/tests/nvme/043 index ed18869a5977..dd48035dd967 100755 --- a/tests/nvme/043 +++ b/tests/nvme/043 @@ -45,12 +45,11 @@ test() { _set_nvmet_hash "${def_hostnqn}" "${hash}" - _nvme_connect_subsys "${def_subsysnqn}" \ - --hostnqn "${def_hostnqn}" \ + _nvme_connect_subsys --hostnqn "${def_hostnqn}" \ --hostid "${def_hostid}" \ --dhchap-secret "${hostkey}" - _nvme_disconnect_subsys "${def_subsysnqn}" + _nvme_disconnect_subsys done for dhgroup in "ffdhe2048" "ffdhe3072" "ffdhe4096" "ffdhe6144" "ffdhe8192" ; do @@ -59,12 +58,11 @@ test() { _set_nvmet_dhgroup "${def_hostnqn}" "${dhgroup}" - _nvme_connect_subsys "${def_subsysnqn}" \ - --hostnqn "${def_hostnqn}" \ + _nvme_connect_subsys --hostnqn "${def_hostnqn}" \ --hostid "${def_hostid}" \ --dhchap-secret "${hostkey}" - _nvme_disconnect_subsys "${def_subsysnqn}" + _nvme_disconnect_subsys done _nvmet_target_cleanup diff --git a/tests/nvme/044 b/tests/nvme/044 index 8e2b4131b969..624b832c0cc6 100755 --- a/tests/nvme/044 +++ b/tests/nvme/044 @@ -49,46 +49,42 @@ test() { # Step 1: Connect with host authentication only echo "Test host authentication" - _nvme_connect_subsys "${def_subsysnqn}" \ - --hostnqn "${def_hostnqn}" \ + _nvme_connect_subsys --hostnqn "${def_hostnqn}" \ --hostid "${def_hostid}" \ --dhchap-secret "${hostkey}" - _nvme_disconnect_subsys "${def_subsysnqn}" + _nvme_disconnect_subsys # Step 2: Connect with host authentication # and invalid ctrl authentication echo "Test invalid ctrl authentication (should fail)" - _nvme_connect_subsys "${def_subsysnqn}" \ - --hostnqn "${def_hostnqn}" \ + _nvme_connect_subsys --hostnqn "${def_hostnqn}" \ --hostid "${def_hostid}" \ --dhchap-secret "${hostkey}" \ --dhchap-ctrl-secret "${hostkey}" - _nvme_disconnect_subsys "${def_subsysnqn}" + _nvme_disconnect_subsys # Step 3: Connect with host authentication # and valid ctrl authentication echo "Test valid ctrl authentication" - _nvme_connect_subsys "${def_subsysnqn}" \ - --hostnqn "${def_hostnqn}" \ + _nvme_connect_subsys --hostnqn "${def_hostnqn}" \ --hostid "${def_hostid}" \ --dhchap-secret "${hostkey}" \ --dhchap-ctrl-secret "${ctrlkey}" - _nvme_disconnect_subsys "${def_subsysnqn}" + _nvme_disconnect_subsys # Step 4: Connect with host authentication # and invalid ctrl key echo "Test invalid ctrl key (should fail)" invkey="DHHC-1:00:Jc/My1o0qtLCWRp+sHhAVafdfaS7YQOMYhk9zSmlatobqB8C:" - _nvme_connect_subsys "${def_subsysnqn}" \ - --hostnqn "${def_hostnqn}" \ + _nvme_connect_subsys --hostnqn "${def_hostnqn}" \ --hostid "${def_hostid}" \ --dhchap-secret "${hostkey}" \ --dhchap-ctrl-secret "${invkey}" - _nvme_disconnect_subsys "${def_subsysnqn}" + _nvme_disconnect_subsys _nvmet_target_cleanup diff --git a/tests/nvme/045 b/tests/nvme/045 index f89378836e67..257898724ca0 100755 --- a/tests/nvme/045 +++ b/tests/nvme/045 @@ -51,8 +51,7 @@ test() { _set_nvmet_dhgroup "${def_hostnqn}" "ffdhe2048" - _nvme_connect_subsys "${def_subsysnqn}" \ - --hostnqn "${def_hostnqn}" \ + _nvme_connect_subsys --hostnqn "${def_hostnqn}" \ --hostid "${def_hostid}" \ --dhchap-secret "${hostkey}" \ --dhchap-ctrl-secret "${ctrlkey}" @@ -108,8 +107,7 @@ test() { rand_io_size="$(_nvme_calc_rand_io_size 4m)" _run_fio_rand_io --size="${rand_io_size}" --filename="/dev/${nvmedev}n1" - _nvme_disconnect_subsys "${def_subsysnqn}" - + _nvme_disconnect_subsys "${subsysnqn}" _nvmet_target_cleanup echo "Test complete" diff --git a/tests/nvme/047 b/tests/nvme/047 index 162bd3bf70fa..7a2432a769e5 100755 --- a/tests/nvme/047 +++ b/tests/nvme/047 @@ -37,13 +37,13 @@ test() { _nvme_disconnect_subsys "${def_subsysnqn}" >> "$FULL" 2>&1 - _nvme_connect_subsys "${def_subsysnqn}" \ + _nvme_connect_subsys \ --nr-write-queues 1 \ --nr-poll-queues 1 || echo FAIL _run_fio_rand_io --filename="/dev/${nvmedev}n1" --size="${rand_io_size}" - _nvme_disconnect_subsys "${def_subsysnqn}" >> "$FULL" 2>&1 + _nvme_disconnect_subsys >> "$FULL" 2>&1 _nvmet_target_cleanup diff --git a/tests/nvme/048 b/tests/nvme/048 index 44fdffe287c8..79620e0d0879 100755 --- a/tests/nvme/048 +++ b/tests/nvme/048 @@ -99,11 +99,10 @@ test() { _nvmet_target_setup --blkdev file if [[ -f "${cfs_path}/attr_qid_max" ]] ; then - _nvme_connect_subsys "${def_subsysnqn}" \ - --hostnqn "${def_hostnqn}" \ - --hostid "${def_hostid}" \ - --keep-alive-tmo 1 \ - --reconnect-delay 2 + _nvme_connect_subsys --hostnqn "${def_hostnqn}" \ + --hostid "${def_hostid}" \ + --keep-alive-tmo 1 \ + --reconnect-delay 2 if ! nvmf_wait_for_state "${def_subsysnqn}" "live" ; then echo FAIL @@ -112,7 +111,7 @@ test() { set_qid_max "${def_subsysnqn}" 2 || echo FAIL fi - _nvme_disconnect_subsys "${def_subsysnqn}" + _nvme_disconnect_subsys else SKIP_REASONS+=("missing attr_qid_max feature") skipped=true diff --git a/tests/nvme/rc b/tests/nvme/rc index 91c80aea59e8..214744edf44e 100644 --- a/tests/nvme/rc +++ b/tests/nvme/rc @@ -400,15 +400,27 @@ _nvme_disconnect_ctrl() { } _nvme_disconnect_subsys() { - local subsysnqn="$1" + local subsysnqn="$def_subsysnqn" + + while [[ $# -gt 0 ]]; do + case $1 in + --subsysnqn) + subsysnqn="$2" + shift 2 + ;; + *) + echo "WARNING: unknown argument: $1" + shift + ;; + esac + done nvme disconnect --nqn "${subsysnqn}" |& tee -a "$FULL" | grep -o "disconnected.*" } _nvme_connect_subsys() { - local positional_args=() - local subsysnqn="" + local subsysnqn="$def_subsysnqn" local hostnqn="$def_hostnqn" local hostid="$def_hostid" local hostkey="" @@ -424,6 +436,10 @@ _nvme_connect_subsys() { while [[ $# -gt 0 ]]; do case $1 in + --subsysnqn) + subsysnqn="$2" + shift 2 + ;; --hostnqn) hostnqn="$2" shift 2 @@ -469,16 +485,12 @@ _nvme_connect_subsys() { shift 1 ;; *) - positional_args+=("$1") + echo "WARNING: unknown argument: $1" shift ;; esac done - set -- "${positional_args[@]}" - - subsysnqn="$1" - ARGS=(--transport "${nvme_trtype}" --nqn "${subsysnqn}") if [[ "${nvme_trtype}" == "fc" ]] ; then ARGS+=(--traddr "${def_traddr}" --host-traddr "${def_host_traddr}") From patchwork Thu Mar 21 09:47:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Wagner X-Patchwork-Id: 13598568 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A6F395677C for ; Thu, 21 Mar 2024 09:47:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711014463; cv=none; b=copuWP9PfflMh0FCq9A5vfq6deCsARPC0OMJRhjmHiLuJdNfBE5iN+ZGRuW8tD4x2lLVaKuym914aftum0yotMqUHSk5kjuFPHQXttO9XNZRMcDWAwW23Ts+7/HqF2wXNSxLn7v5tPBjttRFBaU3LBSKBIpqmh8FRAJAYQrzTNQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711014463; c=relaxed/simple; bh=GPh/b5Yj4VT4znQOSdVxrn1nzxgvULja6G93t9FYclE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=DfuA/pFXZbcAt9EF5QLWdljAfSn8C/bcFgWn2NqdZyQy4Eg/5OlUiW5PjeFvEYjsVbMF3u6WQlyXzNd6c/daa2fIXfLs2qOzvjUAUZ3qE7kcChLCbkiZEcmk9Jm4wwVJokW8C486w2JCldoeomDLxV4gNPNTpclUtBywk9yx4wc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=KU9XoXRS; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=Z9CjUzyx; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=KU9XoXRS; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=Z9CjUzyx; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="KU9XoXRS"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="Z9CjUzyx"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="KU9XoXRS"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="Z9CjUzyx" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 2DAF55CBCB; Thu, 21 Mar 2024 09:47:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1711014460; 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=3nix2qVmvxSUoWdkjAYqws6e2g+BUh2++k+pzkffUz0=; b=KU9XoXRSvKrcthmxdKxBeX7Jmc4K152+bDU4pm3XRtzZxfVIZgbrbV+QCkE7JCs4bh0Z3t 484tHE5a8WvKPthlyQRsEQXLuQ8JCfRy8bGYU0BNoSaWE3oCWD+0DKrd6Mhhwh+3Enla4h gFCqqsbxVmlIy05z9sI7syvEJPvOoDI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1711014460; 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=3nix2qVmvxSUoWdkjAYqws6e2g+BUh2++k+pzkffUz0=; b=Z9CjUzyxiwXr8/ALSo2Apj32nJieiDFh/9fssPL0KBl58eVvdOaqwM2AluJeKstgfJRv1P f1BF31bSceDouKAQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1711014460; 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=3nix2qVmvxSUoWdkjAYqws6e2g+BUh2++k+pzkffUz0=; b=KU9XoXRSvKrcthmxdKxBeX7Jmc4K152+bDU4pm3XRtzZxfVIZgbrbV+QCkE7JCs4bh0Z3t 484tHE5a8WvKPthlyQRsEQXLuQ8JCfRy8bGYU0BNoSaWE3oCWD+0DKrd6Mhhwh+3Enla4h gFCqqsbxVmlIy05z9sI7syvEJPvOoDI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1711014460; 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=3nix2qVmvxSUoWdkjAYqws6e2g+BUh2++k+pzkffUz0=; b=Z9CjUzyxiwXr8/ALSo2Apj32nJieiDFh/9fssPL0KBl58eVvdOaqwM2AluJeKstgfJRv1P f1BF31bSceDouKAQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 1A3A513976; Thu, 21 Mar 2024 09:47:40 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id oh/0BDwC/GXsDwAAD6G6ig (envelope-from ); Thu, 21 Mar 2024 09:47:40 +0000 From: Daniel Wagner To: Shin'ichiro Kawasaki Cc: linux-block@vger.kernel.org, linux-nvme@lists.infradead.org, Chaitanya Kulkarni , Hannes Reinecke , Daniel Wagner Subject: [PATCH blktests v1 16/18] nvme/{041,042,043,044,045,048}: do not pass default host{nqn|id} to _nvme_connect_subsys Date: Thu, 21 Mar 2024 10:47:25 +0100 Message-ID: <20240321094727.6503-17-dwagner@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240321094727.6503-1-dwagner@suse.de> References: <20240321094727.6503-1-dwagner@suse.de> Precedence: bulk X-Mailing-List: linux-block@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Score: 0.70 X-Spamd-Result: default: False [0.70 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_MISSING_CHARSET(2.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; BROKEN_CONTENT_TYPE(1.50)[]; RCPT_COUNT_FIVE(0.00)[6]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_RATELIMIT(0.00)[to_ip_from(RLm9s6cmri9k4spo5w97m8fq33)]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MID_CONTAINS_FROM(1.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-3.00)[100.00%] X-Spam-Level: Authentication-Results: smtp-out2.suse.de; none X-Spam-Flag: NO There is no point in passing the default values to _nvme_connect_subsys, thus drop these arguments. Signed-off-by: Daniel Wagner --- tests/nvme/041 | 7 ++----- tests/nvme/042 | 8 ++------ tests/nvme/043 | 8 ++------ tests/nvme/044 | 16 ++++------------ tests/nvme/045 | 4 +--- tests/nvme/048 | 4 +--- 6 files changed, 12 insertions(+), 35 deletions(-) diff --git a/tests/nvme/041 b/tests/nvme/041 index d6845628726e..f1fa00c0f420 100755 --- a/tests/nvme/041 +++ b/tests/nvme/041 @@ -38,16 +38,13 @@ test() { # Test unauthenticated connection (should fail) echo "Test unauthenticated connection (should fail)" - _nvme_connect_subsys --hostnqn "${def_hostnqn}" \ - --hostid "${def_hostid}" + _nvme_connect_subsys _nvme_disconnect_subsys # Test authenticated connection echo "Test authenticated connection" - _nvme_connect_subsys --hostnqn "${def_hostnqn}" \ - --hostid "${def_hostid}" \ - --dhchap-secret "${hostkey}" + _nvme_connect_subsys --dhchap-secret "${hostkey}" _nvme_disconnect_subsys diff --git a/tests/nvme/042 b/tests/nvme/042 index 480e1cba9d19..a9e79c6a13b4 100755 --- a/tests/nvme/042 +++ b/tests/nvme/042 @@ -41,9 +41,7 @@ test() { fi _set_nvmet_hostkey "${def_hostnqn}" "${hostkey}" - _nvme_connect_subsys --hostnqn "${def_hostnqn}" \ - --hostid "${def_hostid}" \ - --dhchap-secret "${hostkey}" + _nvme_connect_subsys --dhchap-secret "${hostkey}" _nvme_disconnect_subsys done @@ -57,9 +55,7 @@ test() { fi _set_nvmet_hostkey "${def_hostnqn}" "${hostkey}" - _nvme_connect_subsys --hostnqn "${def_hostnqn}" \ - --hostid "${def_hostid}" \ - --dhchap-secret "${hostkey}" + _nvme_connect_subsys --dhchap-secret "${hostkey}" _nvme_disconnect_subsys done diff --git a/tests/nvme/043 b/tests/nvme/043 index dd48035dd967..4589423d4335 100755 --- a/tests/nvme/043 +++ b/tests/nvme/043 @@ -45,9 +45,7 @@ test() { _set_nvmet_hash "${def_hostnqn}" "${hash}" - _nvme_connect_subsys --hostnqn "${def_hostnqn}" \ - --hostid "${def_hostid}" \ - --dhchap-secret "${hostkey}" + _nvme_connect_subsys --dhchap-secret "${hostkey}" _nvme_disconnect_subsys done @@ -58,9 +56,7 @@ test() { _set_nvmet_dhgroup "${def_hostnqn}" "${dhgroup}" - _nvme_connect_subsys --hostnqn "${def_hostnqn}" \ - --hostid "${def_hostid}" \ - --dhchap-secret "${hostkey}" + _nvme_connect_subsys --dhchap-secret "${hostkey}" _nvme_disconnect_subsys done diff --git a/tests/nvme/044 b/tests/nvme/044 index 624b832c0cc6..8b8859068660 100755 --- a/tests/nvme/044 +++ b/tests/nvme/044 @@ -49,18 +49,14 @@ test() { # Step 1: Connect with host authentication only echo "Test host authentication" - _nvme_connect_subsys --hostnqn "${def_hostnqn}" \ - --hostid "${def_hostid}" \ - --dhchap-secret "${hostkey}" + _nvme_connect_subsys --dhchap-secret "${hostkey}" _nvme_disconnect_subsys # Step 2: Connect with host authentication # and invalid ctrl authentication echo "Test invalid ctrl authentication (should fail)" - _nvme_connect_subsys --hostnqn "${def_hostnqn}" \ - --hostid "${def_hostid}" \ - --dhchap-secret "${hostkey}" \ + _nvme_connect_subsys --dhchap-secret "${hostkey}" \ --dhchap-ctrl-secret "${hostkey}" _nvme_disconnect_subsys @@ -68,9 +64,7 @@ test() { # Step 3: Connect with host authentication # and valid ctrl authentication echo "Test valid ctrl authentication" - _nvme_connect_subsys --hostnqn "${def_hostnqn}" \ - --hostid "${def_hostid}" \ - --dhchap-secret "${hostkey}" \ + _nvme_connect_subsys --dhchap-secret "${hostkey}" \ --dhchap-ctrl-secret "${ctrlkey}" _nvme_disconnect_subsys @@ -79,9 +73,7 @@ test() { # and invalid ctrl key echo "Test invalid ctrl key (should fail)" invkey="DHHC-1:00:Jc/My1o0qtLCWRp+sHhAVafdfaS7YQOMYhk9zSmlatobqB8C:" - _nvme_connect_subsys --hostnqn "${def_hostnqn}" \ - --hostid "${def_hostid}" \ - --dhchap-secret "${hostkey}" \ + _nvme_connect_subsys --dhchap-secret "${hostkey}" \ --dhchap-ctrl-secret "${invkey}" _nvme_disconnect_subsys diff --git a/tests/nvme/045 b/tests/nvme/045 index 257898724ca0..adc86b89ccc5 100755 --- a/tests/nvme/045 +++ b/tests/nvme/045 @@ -51,9 +51,7 @@ test() { _set_nvmet_dhgroup "${def_hostnqn}" "ffdhe2048" - _nvme_connect_subsys --hostnqn "${def_hostnqn}" \ - --hostid "${def_hostid}" \ - --dhchap-secret "${hostkey}" \ + _nvme_connect_subsys --dhchap-secret "${hostkey}" \ --dhchap-ctrl-secret "${ctrlkey}" echo "Re-authenticate with original host key" diff --git a/tests/nvme/048 b/tests/nvme/048 index 79620e0d0879..0b299a91288b 100755 --- a/tests/nvme/048 +++ b/tests/nvme/048 @@ -99,9 +99,7 @@ test() { _nvmet_target_setup --blkdev file if [[ -f "${cfs_path}/attr_qid_max" ]] ; then - _nvme_connect_subsys --hostnqn "${def_hostnqn}" \ - --hostid "${def_hostid}" \ - --keep-alive-tmo 1 \ + _nvme_connect_subsys --keep-alive-tmo 1 \ --reconnect-delay 2 if ! nvmf_wait_for_state "${def_subsysnqn}" "live" ; then From patchwork Thu Mar 21 09:47:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Wagner X-Patchwork-Id: 13598572 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 751E156B73 for ; Thu, 21 Mar 2024 09:47:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711014464; cv=none; b=oCFvPR/Qe8ZC7Jz7ZZnOD4ivSN1J0USHpFzsmtSPt1KT9d6vRgacGjj9edhHpnVuy7QZIoRf9peStXaDl1kIzA6v6VSa7Sug0s6sjDjsrkuzs/xZ7N/2gOPmsgMgPXydlf/P5ZDL/dbXMhTtWEtVAMzwOeAkAhewLzBRFHDdDW0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711014464; c=relaxed/simple; bh=I25EVxZDqeK0WU/KcN2NYrvBUDOm3rfbi8APLxz1qgo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=LX/WYKIyKvfRP9MEiezzl/+AHTq3HWw+Mzb7bWk145xCZSt95GswobEtJoOXG0r2xNK0LW1sUyRMEcFYUY7wLOx/Qyz6mG00bk8vVUp1E9YD5bfK6IwlRcaiYlHDJssRxvGuQhdBIFakDYc2lJPY2wbfPnkCwD3xQsdjlVHekmQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=raCEbAH+; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=D8dWpXLi; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=raCEbAH+; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=D8dWpXLi; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="raCEbAH+"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="D8dWpXLi"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="raCEbAH+"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="D8dWpXLi" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id BED8C37158; Thu, 21 Mar 2024 09:47:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1711014460; 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=67HVMvJK3GCy6ZWEmBH383KO8R9IcQw6JS6WJICjgWc=; b=raCEbAH+rQl7Huh93CsaPrOO0NiiyGiAWoiWSyf3jPR5FblCNa1jibUZQS1XPYcC+g8Vzq s6Na04CsxMJlixd9gooudbn/np0UY1G5TeXp6QRlbJVTtQsXWWf1+cZaHIFcf4C0aya2+N RbuqgF7FLUed2Pvxn7Jm/PaUkInreBs= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1711014460; 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=67HVMvJK3GCy6ZWEmBH383KO8R9IcQw6JS6WJICjgWc=; b=D8dWpXLiewHNLJxvHf6NCmGgL7XiE3o2HXIY1SSk6eNuORjxCrX+R2l3LT2VsI2uK/Fs3D 1z4fB6XbO1cL8fDA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1711014460; 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=67HVMvJK3GCy6ZWEmBH383KO8R9IcQw6JS6WJICjgWc=; b=raCEbAH+rQl7Huh93CsaPrOO0NiiyGiAWoiWSyf3jPR5FblCNa1jibUZQS1XPYcC+g8Vzq s6Na04CsxMJlixd9gooudbn/np0UY1G5TeXp6QRlbJVTtQsXWWf1+cZaHIFcf4C0aya2+N RbuqgF7FLUed2Pvxn7Jm/PaUkInreBs= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1711014460; 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=67HVMvJK3GCy6ZWEmBH383KO8R9IcQw6JS6WJICjgWc=; b=D8dWpXLiewHNLJxvHf6NCmGgL7XiE3o2HXIY1SSk6eNuORjxCrX+R2l3LT2VsI2uK/Fs3D 1z4fB6XbO1cL8fDA== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id ACC8F13976; Thu, 21 Mar 2024 09:47:40 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id iXnCKDwC/GXvDwAAD6G6ig (envelope-from ); Thu, 21 Mar 2024 09:47:40 +0000 From: Daniel Wagner To: Shin'ichiro Kawasaki Cc: linux-block@vger.kernel.org, linux-nvme@lists.infradead.org, Chaitanya Kulkarni , Hannes Reinecke , Daniel Wagner Subject: [PATCH blktests v1 17/18] nvme: don't assume namespace id Date: Thu, 21 Mar 2024 10:47:26 +0100 Message-ID: <20240321094727.6503-18-dwagner@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240321094727.6503-1-dwagner@suse.de> References: <20240321094727.6503-1-dwagner@suse.de> Precedence: bulk X-Mailing-List: linux-block@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Score: 0.49 Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=raCEbAH+; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=D8dWpXLi X-Spamd-Bar: / X-Spam-Flag: NO X-Spamd-Result: default: False [0.49 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_MISSING_CHARSET(2.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; BROKEN_CONTENT_TYPE(1.50)[]; RCPT_COUNT_FIVE(0.00)[6]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; DKIM_TRACE(0.00)[suse.de:+]; MX_GOOD(-0.01)[]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-3.00)[100.00%]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from] X-Spam-Level: X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Rspamd-Queue-Id: BED8C37158 The tests assume that the namespace id is always 1. This might not be correct in future (e.g. running real targets), thus harden the test by using the uuid to lookup the correct namespace id. The passthru test already do this, so it makes also sense to update the other tests as well. Signed-off-by: Daniel Wagner --- tests/nvme/010 | 7 +++---- tests/nvme/011 | 7 +++---- tests/nvme/012 | 7 +++---- tests/nvme/013 | 7 +++---- tests/nvme/014 | 13 ++++++------- tests/nvme/015 | 13 ++++++------- tests/nvme/018 | 15 +++++++-------- tests/nvme/019 | 8 +++----- tests/nvme/020 | 7 +++---- tests/nvme/021 | 7 +++---- tests/nvme/023 | 8 +++----- tests/nvme/024 | 9 ++++----- tests/nvme/025 | 7 +++---- tests/nvme/026 | 8 +++----- tests/nvme/029 | 6 +----- tests/nvme/040 | 4 +++- tests/nvme/045 | 5 +++-- tests/nvme/047 | 10 +++++----- tests/nvme/rc | 18 ++++++++++++++++++ 19 files changed, 83 insertions(+), 83 deletions(-) diff --git a/tests/nvme/010 b/tests/nvme/010 index 7d875989a01c..6feb39153e99 100755 --- a/tests/nvme/010 +++ b/tests/nvme/010 @@ -20,17 +20,16 @@ test() { _setup_nvmet - local nvmedev + local ns _nvmet_target_setup _nvme_connect_subsys - nvmedev=$(_find_nvme_dev "${def_subsysnqn}") - _check_uuid "${nvmedev}" + ns=$(_find_nvme_ns "${def_subsys_uuid}") _run_fio_verify_io --size="${nvme_img_size}" \ - --filename="/dev/${nvmedev}n1" + --filename="/dev/${ns}" _nvme_disconnect_subsys diff --git a/tests/nvme/011 b/tests/nvme/011 index 0acc8b1dbaed..eee044cbb4f8 100755 --- a/tests/nvme/011 +++ b/tests/nvme/011 @@ -20,17 +20,16 @@ test() { _setup_nvmet - local nvmedev + local ns _nvmet_target_setup --blkdev file _nvme_connect_subsys - nvmedev=$(_find_nvme_dev "${def_subsysnqn}") - _check_uuid "${nvmedev}" + ns=$(_find_nvme_ns "${def_subsys_uuid}") _run_fio_verify_io --size="${nvme_img_size}" \ - --filename="/dev/${nvmedev}n1" + --filename="$/dev/{ns}" _nvme_disconnect_subsys diff --git a/tests/nvme/012 b/tests/nvme/012 index a0bff298ab29..64cb6ecf0191 100755 --- a/tests/nvme/012 +++ b/tests/nvme/012 @@ -24,16 +24,15 @@ test() { _setup_nvmet - local nvmedev + local ns _nvmet_target_setup _nvme_connect_subsys - nvmedev=$(_find_nvme_dev "${def_subsysnqn}") - _check_uuid "${nvmedev}" + ns=$(_find_nvme_ns "${def_subsys_uuid}") - if ! _xfs_run_fio_verify_io "/dev/${nvmedev}n1"; then + if ! _xfs_run_fio_verify_io "/dev/${ns}"; then echo "FAIL: fio verify failed" fi diff --git a/tests/nvme/013 b/tests/nvme/013 index 5e5026eabe17..68d07cbc4afa 100755 --- a/tests/nvme/013 +++ b/tests/nvme/013 @@ -23,16 +23,15 @@ test() { _setup_nvmet - local nvmedev + local ns _nvmet_target_setup --blkdev file _nvme_connect_subsys - nvmedev=$(_find_nvme_dev "${def_subsysnqn}") - _check_uuid "${nvmedev}" + ns=$(_find_nvme_ns "${def_subsys_uuid}") - if ! _xfs_run_fio_verify_io "/dev/${nvmedev}n1"; then + if ! _xfs_run_fio_verify_io "$/dev/{ns}"; then echo "FAIL: fio verify failed" fi diff --git a/tests/nvme/014 b/tests/nvme/014 index da4b4c13b347..e56e3212cf28 100755 --- a/tests/nvme/014 +++ b/tests/nvme/014 @@ -20,7 +20,7 @@ test() { _setup_nvmet - local nvmedev + local ns local size local bs local count @@ -29,17 +29,16 @@ test() { _nvme_connect_subsys - nvmedev=$(_find_nvme_dev "${def_subsysnqn}") - _check_uuid "${nvmedev}" + ns=$(_find_nvme_ns "${def_subsys_uuid}") - size="$(blockdev --getsize64 "/dev/${nvmedev}n1")" - bs="$(blockdev --getbsz "/dev/${nvmedev}n1")" + size="$(blockdev --getsize64 "/dev/${ns}")" + bs="$(blockdev --getbsz "/dev/${ns}")" count=$((size / bs)) - dd if=/dev/urandom of="/dev/${nvmedev}n1" \ + dd if=/dev/urandom of="$/dev/{ns}" \ count="${count}" bs="${bs}" status=none - nvme flush "/dev/${nvmedev}" --namespace-id 1 + nvme flush "/dev/${ns}" _nvme_disconnect_subsys diff --git a/tests/nvme/015 b/tests/nvme/015 index b82f2253c011..f0621dab681b 100755 --- a/tests/nvme/015 +++ b/tests/nvme/015 @@ -20,7 +20,7 @@ test() { _setup_nvmet - local nvmedev + local ns local size local bs local count @@ -29,17 +29,16 @@ test() { _nvme_connect_subsys - nvmedev=$(_find_nvme_dev "${def_subsysnqn}") - _check_uuid "${nvmedev}" + ns=$(_find_nvme_ns "${def_subsys_uuid}") - size="$(blockdev --getsize64 "/dev/${nvmedev}n1")" - bs="$(blockdev --getbsz "/dev/${nvmedev}n1")" + size="$(blockdev --getsize64 "/dev/${ns}")" + bs="$(blockdev --getbsz "/dev/${ns}")" count=$((size / bs)) - dd if=/dev/urandom of="/dev/${nvmedev}n1" \ + dd if=/dev/urandom of="/dev/${ns}" \ count="${count}" bs="${bs}" status=none - nvme flush "/dev/${nvmedev}n1" --namespace-id 1 + nvme flush "/dev/${ns}" _nvme_disconnect_subsys diff --git a/tests/nvme/018 b/tests/nvme/018 index bd6e5e930e35..b8c16354a01b 100755 --- a/tests/nvme/018 +++ b/tests/nvme/018 @@ -21,21 +21,20 @@ test() { _setup_nvmet - local nvmedev + local ns + local sectors + local bs _nvmet_target_setup --blkdev file _nvme_connect_subsys - nvmedev=$(_find_nvme_dev "${def_subsysnqn}") - _check_uuid "${nvmedev}" + ns=$(_find_nvme_ns "${def_subsys_uuid}") - local sectors - local bs - sectors="$(blockdev --getsz "/dev/${nvmedev}n1")" - bs="$(blockdev --getbsz "/dev/${nvmedev}n1")" + sectors="$(blockdev --getsz "/dev/${ns}")" + bs="$(blockdev --getbsz "/dev/${ns}")" - nvme read "/dev/${nvmedev}n1" --start-block "$sectors" \ + nvme read "/dev/${ns}" --start-block "$sectors" \ --block-count 0 --data-size "$bs" &>"$FULL" \ && echo "ERROR: nvme read for out of range LBA was not rejected" diff --git a/tests/nvme/019 b/tests/nvme/019 index 4d7de8191da7..1cd5378e9dd4 100755 --- a/tests/nvme/019 +++ b/tests/nvme/019 @@ -20,7 +20,7 @@ test() { _setup_nvmet - local nvmedev + local ns local nblk_range="10,10,10,10,10,10,10,10,10,10" local sblk_range="100,200,300,400,500,600,700,800,900,1000" @@ -28,10 +28,8 @@ test() { _nvme_connect_subsys - nvmedev=$(_find_nvme_dev "${def_subsysnqn}") - _check_uuid "${nvmedev}" - - nvme dsm "/dev/${nvmedev}" --namespace-id 1 --ad \ + ns=$(_find_nvme_ns "${def_subsys_uuid}") + nvme dsm "/dev/${ns}" --ad \ --slbs "${sblk_range}" --blocks "${nblk_range}" _nvme_disconnect_subsys diff --git a/tests/nvme/020 b/tests/nvme/020 index c734210c5bd9..0364c4e0dd4f 100755 --- a/tests/nvme/020 +++ b/tests/nvme/020 @@ -19,7 +19,7 @@ test() { _setup_nvmet - local nvmedev + local ns local nblk_range="10,10,10,10,10,10,10,10,10,10" local sblk_range="100,200,300,400,500,600,700,800,900,1000" @@ -27,10 +27,9 @@ test() { _nvme_connect_subsys - nvmedev=$(_find_nvme_dev "${def_subsysnqn}") - _check_uuid "${nvmedev}" + ns=$(_find_nvme_ns "${def_subsys_uuid}") - nvme dsm "/dev/${nvmedev}" --namespace-id 1 --ad \ + nvme dsm "/dev/${ns}" --ad \ --slbs "${sblk_range}" --blocks "${nblk_range}" _nvme_disconnect_subsys diff --git a/tests/nvme/021 b/tests/nvme/021 index 358e209d0458..7ee1f078cd60 100755 --- a/tests/nvme/021 +++ b/tests/nvme/021 @@ -20,16 +20,15 @@ test() { _setup_nvmet - local nvmedev + local ns _nvmet_target_setup --blkdev file _nvme_connect_subsys - nvmedev=$(_find_nvme_dev "${def_subsysnqn}") - _check_uuid "${nvmedev}" + ns=$(_find_nvme_ns "${def_subsys_uuid}") - if ! nvme list 2>> "$FULL" | grep -q "${nvmedev}n1"; then + if ! nvme list 2>> "$FULL" | grep -q "/dev/${ns}"; then echo "ERROR: device not listed" fi diff --git a/tests/nvme/023 b/tests/nvme/023 index abbb35a0b580..d8f17ae7a8ea 100755 --- a/tests/nvme/023 +++ b/tests/nvme/023 @@ -20,17 +20,15 @@ test() { _setup_nvmet - local nvmedev + local ns _nvmet_target_setup _nvme_connect_subsys - nvmedev=$(_find_nvme_dev "${def_subsysnqn}") - _check_uuid "${nvmedev}" + ns=$(_find_nvme_ns "${def_subsys_uuid}") - if ! nvme smart-log "/dev/${nvmedev}" --namespace-id 1 \ - >> "$FULL" 2>&1; then + if ! nvme smart-log "/dev/${ns}" >> "$FULL" 2>&1; then echo "ERROR: smart-log bdev-ns failed" fi diff --git a/tests/nvme/024 b/tests/nvme/024 index 3ee18822e26b..a5121940a543 100755 --- a/tests/nvme/024 +++ b/tests/nvme/024 @@ -20,19 +20,18 @@ test() { _setup_nvmet - local nvmedev + local ns _nvmet_target_setup --blkdev file _nvme_connect_subsys - nvmedev=$(_find_nvme_dev "${def_subsysnqn}") - _check_uuid "${nvmedev}" + ns=$(_find_nvme_ns ${def_subsys_uuid}) - if ! nvme smart-log "/dev/${nvmedev}" --namespace-id 1 \ - >> "$FULL" 2>&1; then + if ! nvme smart-log "/dev/${ns}" >> "$FULL" 2>&1; then echo "ERROR: smart-log file-ns failed" fi + _nvme_disconnect_subsys >> "$FULL" 2>&1 _nvmet_target_cleanup diff --git a/tests/nvme/025 b/tests/nvme/025 index 3cd62d0b4e5e..3f9a615e542e 100755 --- a/tests/nvme/025 +++ b/tests/nvme/025 @@ -20,16 +20,15 @@ test() { _setup_nvmet - local nvmedev + local ns _nvmet_target_setup --blkdev file _nvme_connect_subsys - nvmedev=$(_find_nvme_dev "${def_subsysnqn}") - _check_uuid "${nvmedev}" + ns=$(_find_nvme_ns "${def_subsys_uuid}") - if ! nvme effects-log "/dev/${nvmedev}" >> "$FULL" 2>&1; then + if ! nvme effects-log "/dev/${ns}" >> "$FULL" 2>&1; then echo "ERROR: effects-log failed" fi diff --git a/tests/nvme/026 b/tests/nvme/026 index 5d54b0ff3d28..28fd151d9a77 100755 --- a/tests/nvme/026 +++ b/tests/nvme/026 @@ -20,17 +20,15 @@ test() { _setup_nvmet - local nvmedev + local ns _nvmet_target_setup --blkdev file _nvme_connect_subsys - nvmedev=$(_find_nvme_dev "${def_subsysnqn}") - _check_uuid "${nvmedev}" + ns=$(_find_nvme_ns "${def_subsys_uuid}") - if ! nvme ns-descs "/dev/${nvmedev}" --namespace-id 1 \ - >> "$FULL" 2>&1; then + if ! nvme ns-descs "/dev/${ns}" >> "$FULL" 2>&1; then echo "ERROR: ns-desc failed" fi diff --git a/tests/nvme/029 b/tests/nvme/029 index 8dbe49ba15cc..f3c79bf0451c 100755 --- a/tests/nvme/029 +++ b/tests/nvme/029 @@ -53,16 +53,12 @@ test() { _setup_nvmet - local nvmedev local reset_nr_hugepages=false _nvmet_target_setup _nvme_connect_subsys - nvmedev=$(_find_nvme_dev "${def_subsysnqn}") - _check_uuid "${nvmedev}" - # nvme-cli may fail to allocate linear memory for rather large IO buffers. # Increase nr_hugepages to allow nvme-cli to try the linear memory allocation # from HugeTLB pool. @@ -72,7 +68,7 @@ test() { reset_nr_hugepages=true fi - local dev="/dev/${nvmedev}n1" + local dev="/dev/$(_find_nvme_ns "${def_subsys_uuid}")" test_user_io "$dev" 1 512 > "$FULL" 2>&1 || echo FAIL test_user_io "$dev" 1 511 > "$FULL" 2>&1 || echo FAIL test_user_io "$dev" 1 513 > "$FULL" 2>&1 || echo FAIL diff --git a/tests/nvme/040 b/tests/nvme/040 index f00fc16b643f..bb9ed5ef57e9 100755 --- a/tests/nvme/040 +++ b/tests/nvme/040 @@ -23,15 +23,17 @@ test() { local nvmedev local fio_pid + local ns _nvmet_target_setup _nvme_connect_subsys nvmedev=$(_find_nvme_dev "${def_subsysnqn}") + ns=$(_find_nvme_ns "${def_subsys_uuid}") # start fio job echo "starting background fio" - _run_fio_rand_io --filename="/dev/${nvmedev}n1" \ + _run_fio_rand_io --filename="/dev/${ns}" \ --group_reporting --ramp_time=5 \ --time_based --runtime=1d &> /dev/null & fio_pid=$! diff --git a/tests/nvme/045 b/tests/nvme/045 index adc86b89ccc5..5c074be7e3a8 100755 --- a/tests/nvme/045 +++ b/tests/nvme/045 @@ -33,6 +33,7 @@ test() { local new_ctrlkey local ctrldev local rand_io_size + local ns hostkey="$(nvme gen-dhchap-key -n ${def_subsysnqn} 2> /dev/null)" if [ -z "$hostkey" ] ; then @@ -100,10 +101,10 @@ test() { echo "${new_hostkey}" > "${hostkey_file}" - nvmedev=$(_find_nvme_dev "${def_subsysnqn}") + ns=$(_find_nvme_ns "${def_subsys_uuid}") rand_io_size="$(_nvme_calc_rand_io_size 4m)" - _run_fio_rand_io --size="${rand_io_size}" --filename="/dev/${nvmedev}n1" + _run_fio_rand_io --size="${rand_io_size}" --filename="/dev/${ns}" _nvme_disconnect_subsys "${subsysnqn}" _nvmet_target_cleanup diff --git a/tests/nvme/047 b/tests/nvme/047 index 7a2432a769e5..9bbe84d4f145 100755 --- a/tests/nvme/047 +++ b/tests/nvme/047 @@ -22,7 +22,7 @@ test() { _setup_nvmet - local nvmedev + local ns local rand_io_size _nvmet_target_setup @@ -30,18 +30,18 @@ test() { _nvme_connect_subsys \ --nr-write-queues 1 || echo FAIL - nvmedev=$(_find_nvme_dev "${def_subsysnqn}") + ns=$(_find_nvme_ns "${def_subsys_uuid}") rand_io_size="$(_nvme_calc_rand_io_size 4M)" - _run_fio_rand_io --filename="/dev/${nvmedev}n1" --size="${rand_io_size}" + _run_fio_rand_io --filename="/dev/${ns}" --size="${rand_io_size}" - _nvme_disconnect_subsys "${def_subsysnqn}" >> "$FULL" 2>&1 + _nvme_disconnect_subsys >> "$FULL" 2>&1 _nvme_connect_subsys \ --nr-write-queues 1 \ --nr-poll-queues 1 || echo FAIL - _run_fio_rand_io --filename="/dev/${nvmedev}n1" --size="${rand_io_size}" + _run_fio_rand_io --filename="/dev/${ns}" --size="${rand_io_size}" _nvme_disconnect_subsys >> "$FULL" 2>&1 diff --git a/tests/nvme/rc b/tests/nvme/rc index 214744edf44e..e7a59093a867 100644 --- a/tests/nvme/rc +++ b/tests/nvme/rc @@ -797,6 +797,24 @@ _find_nvme_dev() { done } +_find_nvme_ns() { + local subsys_uuid=$1 + local uuid + local ns + + for ns in "/sys/block/nvme"* ; do + # ignore nvme channel block devices + if ! [[ "${ns}" =~ nvme[0-9]+n[0-9]+ ]]; then + continue + fi + [ -e "${ns}/uuid" ] || continue + uuid=$(cat "${ns}/uuid") + if [[ "${subsys_uuid}" == "${uuid}" ]]; then + echo "$(basename ${ns})" + fi + done +} + _find_nvme_passthru_loop_dev() { local subsys=$1 local nsid From patchwork Thu Mar 21 09:47:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Wagner X-Patchwork-Id: 13598571 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F0EED56B76 for ; Thu, 21 Mar 2024 09:47:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711014464; cv=none; b=mPO0tTaf3oUQ828mV+wVWUE5nnEc3Me33QDj6ssD9mwD1hwP8mnLJyvENHMj/E4vh+kVHRbcv48yuGgwZCQY7Nf2DKQZJGQ5vIPvms/OPIVmVRzqPvEqaaOmU1dLoE+VkDQu4IGi0lMhJEWZ0U0BJ910mPaS0OK5mLIMb2zB8H4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711014464; c=relaxed/simple; bh=JqKE2N8SMV1Emk1mDNVMBkXmRjUMBJQkCJuJmbGqV9I=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=EKgtSv85EivdcPaR9bodMVKpwvTubGtHyVomRaDgh+fAON41hkgGCzta1SmmrxbS7ZSvgR79jVZfvnJZb2u2rhVzryB4Syu2Ip8oFkcySdXtPXxqtgw/NP9taZXZRxnoYeK8Jgr4hbmM3xb/oJkKs+vWztc8FpGj4grB9d2GA38= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=RVslSzAr; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=//TN9HGf; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=RVslSzAr; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=//TN9HGf; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="RVslSzAr"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="//TN9HGf"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="RVslSzAr"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="//TN9HGf" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 58C385CBCC; Thu, 21 Mar 2024 09:47:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1711014461; 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=a63muCPZYWeAQkA9FtpSeKqkvj6LphOGjlZs+vXd+mQ=; b=RVslSzArKJDfiohV2a64oRr66E2t9iyYVMre+McVXgiFpE1lYG9GwzbffINPUXq0EQgw2x tH5oXgSZ5atahwqt+HhKpejs5RFKNGaRksQDaAm16x599pPYfvkGImZp27bhUiHi5AU8rE 7pEF2aNlBeGv4Nt8tY1TVezDnQs/uKA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1711014461; 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=a63muCPZYWeAQkA9FtpSeKqkvj6LphOGjlZs+vXd+mQ=; b=//TN9HGfmgPwoXTbvT7zWssKCS+o3+Xd0GfTV9fOKY/DUwJoRwmU1H4WacIAtemWyUmVnk 1oV2WKSB1EeErvBQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1711014461; 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=a63muCPZYWeAQkA9FtpSeKqkvj6LphOGjlZs+vXd+mQ=; b=RVslSzArKJDfiohV2a64oRr66E2t9iyYVMre+McVXgiFpE1lYG9GwzbffINPUXq0EQgw2x tH5oXgSZ5atahwqt+HhKpejs5RFKNGaRksQDaAm16x599pPYfvkGImZp27bhUiHi5AU8rE 7pEF2aNlBeGv4Nt8tY1TVezDnQs/uKA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1711014461; 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=a63muCPZYWeAQkA9FtpSeKqkvj6LphOGjlZs+vXd+mQ=; b=//TN9HGfmgPwoXTbvT7zWssKCS+o3+Xd0GfTV9fOKY/DUwJoRwmU1H4WacIAtemWyUmVnk 1oV2WKSB1EeErvBQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 481F113976; Thu, 21 Mar 2024 09:47:41 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id LSgqED0C/GXxDwAAD6G6ig (envelope-from ); Thu, 21 Mar 2024 09:47:41 +0000 From: Daniel Wagner To: Shin'ichiro Kawasaki Cc: linux-block@vger.kernel.org, linux-nvme@lists.infradead.org, Chaitanya Kulkarni , Hannes Reinecke , Daniel Wagner Subject: [PATCH blktests v1 18/18] nvme/028: drop unused nvmedev Date: Thu, 21 Mar 2024 10:47:27 +0100 Message-ID: <20240321094727.6503-19-dwagner@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240321094727.6503-1-dwagner@suse.de> References: <20240321094727.6503-1-dwagner@suse.de> Precedence: bulk X-Mailing-List: linux-block@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=RVslSzAr; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b="//TN9HGf" X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Spamd-Result: default: False [-2.95 / 50.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; TO_DN_SOME(0.00)[]; R_MISSING_CHARSET(2.50)[]; BROKEN_CONTENT_TYPE(1.50)[]; RCPT_COUNT_FIVE(0.00)[6]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[suse.de:+]; MX_GOOD(-0.01)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; BAYES_HAM(-2.94)[99.73%]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-0.997]; MIME_GOOD(-0.10)[text/plain]; DWL_DNSWL_HI(-3.50)[suse.de:dkim]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; MID_CONTAINS_FROM(1.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_TLS_ALL(0.00)[]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from] X-Spam-Score: -2.95 X-Rspamd-Queue-Id: 58C385CBCC X-Spam-Flag: NO Nothing uses nvmedev, so just remove it. Signed-off-by: Daniel Wagner --- tests/nvme/028 | 5 ----- 1 file changed, 5 deletions(-) diff --git a/tests/nvme/028 b/tests/nvme/028 index 4710bba1f416..9f4a90581984 100755 --- a/tests/nvme/028 +++ b/tests/nvme/028 @@ -20,15 +20,10 @@ test() { _setup_nvmet - local nvmedev - _nvmet_target_setup --blkdev file _nvme_connect_subsys - nvmedev=$(_find_nvme_dev "${def_subsysnqn}") - _check_uuid "${nvmedev}" - if ! nvme list-subsys 2>> "$FULL" | grep -q "${nvme_trtype}"; then echo "ERROR: list-subsys" fi