From patchwork Fri Mar 22 13:49:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Wagner X-Patchwork-Id: 13600128 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 88D0D46546 for ; Fri, 22 Mar 2024 13:50:21 +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=1711115423; cv=none; b=NS1FcjAw5qyx9dZlLtNwptliccXkrExI6pwIC+18WT5/ufSqc3ltWE1+XU0KYlOLfT5ThYXViVmmqS55OZ6HPgHJ7/dmRhKO3o4JeuwR5WpCPCO/GjXe8aanluvsIzFwaScPr2hV1WSPMnTtLaDLcOYgumdA5gRRkw6kAI5OmDA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711115423; c=relaxed/simple; bh=427UI0q+gFxS02r9zeJ677KQIVMVpQvHECRYTSpZaxA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=BLh83kbosxP7Al1B/hSExvCMs+3P8wGJItDLZR1AY5wrm+Qo9GyrVKItPO0Rgtf+T7+Lq4vvM4w+0vYCYgup/mCK56Wl0HAaxUCxElicGVm4pTzMrMsbyMkld4eArEaq9/ps/Zowvg3QIbNab5l1w0te0ar+dQQckRXWCOyrgBQ= 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=w4YR8eKh; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=4GOKSuBO; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=w4YR8eKh; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=4GOKSuBO; 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="w4YR8eKh"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="4GOKSuBO"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="w4YR8eKh"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="4GOKSuBO" 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 A486938566; Fri, 22 Mar 2024 13:50:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1711115419; 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=w4YR8eKhxIiZYeHFCV5s+ujMJVMaPa/ucQT98HW137Za9+dMITcn/tSkycqmxD3RKGLHtd DFYWByHp0YFAv5GjjjuV2/jIOJtQ5kopF4E98lWB+5cU2rBRbEA8QzpowZz1kDAETmk3VH mngD+cavPSsE+3yOLobowgWp8MhtsT8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1711115419; 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=4GOKSuBOcabJQ7DiRdVAvVvEkGok366qPSyd7V5+cDXRpZ4F8s+d46ANBV2lPy8NQGGR5g bKtxQcYMVMzs0qCA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1711115419; 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=w4YR8eKhxIiZYeHFCV5s+ujMJVMaPa/ucQT98HW137Za9+dMITcn/tSkycqmxD3RKGLHtd DFYWByHp0YFAv5GjjjuV2/jIOJtQ5kopF4E98lWB+5cU2rBRbEA8QzpowZz1kDAETmk3VH mngD+cavPSsE+3yOLobowgWp8MhtsT8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1711115419; 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=4GOKSuBOcabJQ7DiRdVAvVvEkGok366qPSyd7V5+cDXRpZ4F8s+d46ANBV2lPy8NQGGR5g bKtxQcYMVMzs0qCA== 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 937FB136AD; Fri, 22 Mar 2024 13:50:19 +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 uUWSIpuM/WV7JAAAD6G6ig (envelope-from ); Fri, 22 Mar 2024 13:50:19 +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 v2 01/18] nvme/rc: silence error on module unload for fc Date: Fri, 22 Mar 2024 14:49:58 +0100 Message-ID: <20240322135015.14712-2-dwagner@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240322135015.14712-1-dwagner@suse.de> References: <20240322135015.14712-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: 1.65 X-Spamd-Result: default: False [1.65 / 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]; REPLY(-4.00)[]; BROKEN_CONTENT_TYPE(1.50)[]; RCPT_COUNT_FIVE(0.00)[6]; 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)[-0.998]; NEURAL_SPAM_LONG(3.50)[1.000]; MID_CONTAINS_FROM(1.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-2.55)[98.00%] X-Spam-Level: * Authentication-Results: smtp-out1.suse.de; none 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 Fri Mar 22 13:49:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Wagner X-Patchwork-Id: 13600129 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 DB10646558 for ; Fri, 22 Mar 2024 13:50:21 +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=1711115423; cv=none; b=EnE+iBjhSGBfDJHZa0u2GT0yDGqsEsZt08J96B59Am+WTFA4NyrA52EwHv6doTLhw8tRsTTS35n8bl2/QLAfT18zKc9GrGOY5A2Z6YxNeO1sxEFqktBOung8zgNGTp084q8RjjQkcgsd6Irk32y1WcQhnLn92N30WIeGCjMkm7g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711115423; c=relaxed/simple; bh=yxJTSy44pomhLuSDVY/mRkxYY7Xj8swq2I/e8ZsN748=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ITuAzEJbyHDJx7DXzVw+ggiZP+yX59UCiGW2Q3/5VqH0wRt9jQ+x0ZIAQwp+t0c66HZ1Fo3/3zrZl8uh7Ss6N9njBK3qX/AbRU2hN1W2g1kN14dui5kJs4+jPgX+MCtnz7tU6DBdQ7IYUMyC6sXY8t1ykXK/Foyf3BIYymJLYqU= 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; 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 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 48ECD3855D; Fri, 22 Mar 2024 13:50:20 +0000 (UTC) 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 38AFC136AD; Fri, 22 Mar 2024 13:50:20 +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 8EyEDJyM/WV+JAAAD6G6ig (envelope-from ); Fri, 22 Mar 2024 13:50:20 +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 v2 02/18] nvme/rc: silence fcloop cleanup failures Date: Fri, 22 Mar 2024 14:49:59 +0100 Message-ID: <20240322135015.14712-3-dwagner@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240322135015.14712-1-dwagner@suse.de> References: <20240322135015.14712-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-out1.suse.de; none X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Spam-Score: -4.00 X-Rspamd-Queue-Id: 48ECD3855D X-Spam-Flag: NO 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. Also it's not possible to redirect the 'echo' error to /dev/null, because it's a builtin command which escapes the stderr redirect operator (why?). Anyway, the simplest way to catch this error is to first check if the control file exists before attempting to write to it. 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..865c8c351159 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 "${loopctl}/del_remote_port" ]]; then + return + fi + echo "wwnn=${remote_wwnn},wwpn=${remote_wwpn}" > "${loopctl}/del_remote_port" } _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 "${loopctl}/del_local_port" ]]; then + return + fi + echo "wwnn=${wwnn},wwpn=${wwpn}" > "${loopctl}/del_local_port" } _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 "${loopctl}/del_target_port" ]]; then + return + fi + echo "wwnn=${wwnn},wwpn=${wwpn}" > "${loopctl}/del_target_port" } _cleanup_fcloop() { From patchwork Fri Mar 22 13:50:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Wagner X-Patchwork-Id: 13600130 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 B946247A55 for ; Fri, 22 Mar 2024 13:50:23 +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=1711115425; cv=none; b=fybEpnDlv/inBZ8Bdl18G54KHvnUvUVMTOJeQYUJEXg38lxeinBkk6W3Vfs9fK+4vHhFD7GWQkATj/OG/b5yNCxz4nUQU37dlJBVd7qEvLKcD8q6eVa9KXnu929qAKNJgYSoSW0wvCFqfMaDm+RjToqvUWbhjZY37A5CN6x6uGs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711115425; c=relaxed/simple; bh=DnVwCt5EWeuVuNmxdizQCr7Wj4BTezqAxCx2nVwmcu8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TcdsGghy8/uzXvG3L1ivcDQma3Wr4F9ZCaPpmYLX4Wgf0f1drcanBjMe552bN7pEhsjG+HiLrOL22b+FsPkmIbc1qHq/TlxEvSKeFGrx1Y76DXFfjXI1dbQMI3S/bHI6iQlaC9U+hJ3qK1VLYKfh8j2mIJravP+Mc/01wmI1STo= 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=F11eDfqa; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=xNR7D7Su; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=F11eDfqa; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=xNR7D7Su; 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="F11eDfqa"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="xNR7D7Su"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="F11eDfqa"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="xNR7D7Su" 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 DCFFB5FE1B; Fri, 22 Mar 2024 13:50:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1711115420; 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=1LciYTeStZ185FK8QBYDz5Vn9SOmgKuJB3FpoJGzxkA=; b=F11eDfqa9I33Gq/KFQGIN64y6G+xrIB+C4yXoKjNFJCCS0W6pYmqhsn/grJA9JIYs0UaUk 8PIL2OwIEPqV6SajDdDq/y0Yvq2XLQ5P+9L21PKKDB89nCpl+fFemxzBbCNJpOdV2Kyj/4 ZmA5194nvXQXK1QoL6vIh9JZ2zlfeVQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1711115420; 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=1LciYTeStZ185FK8QBYDz5Vn9SOmgKuJB3FpoJGzxkA=; b=xNR7D7SuF6974Cqsat31O9ynJAjzScF//Tf+rZvUINs6YMGrBynGyllMQH/kUuqKmpvWcx tsOjpg88sCy3TiCg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1711115420; 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=1LciYTeStZ185FK8QBYDz5Vn9SOmgKuJB3FpoJGzxkA=; b=F11eDfqa9I33Gq/KFQGIN64y6G+xrIB+C4yXoKjNFJCCS0W6pYmqhsn/grJA9JIYs0UaUk 8PIL2OwIEPqV6SajDdDq/y0Yvq2XLQ5P+9L21PKKDB89nCpl+fFemxzBbCNJpOdV2Kyj/4 ZmA5194nvXQXK1QoL6vIh9JZ2zlfeVQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1711115420; 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=1LciYTeStZ185FK8QBYDz5Vn9SOmgKuJB3FpoJGzxkA=; b=xNR7D7SuF6974Cqsat31O9ynJAjzScF//Tf+rZvUINs6YMGrBynGyllMQH/kUuqKmpvWcx tsOjpg88sCy3TiCg== 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 CCA47136AD; Fri, 22 Mar 2024 13:50:20 +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 AfmiMJyM/WWAJAAAD6G6ig (envelope-from ); Fri, 22 Mar 2024 13:50:20 +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 v2 03/18] nvme/rc: log error if stale configuration is found Date: Fri, 22 Mar 2024 14:50:00 +0100 Message-ID: <20240322135015.14712-4-dwagner@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240322135015.14712-1-dwagner@suse.de> References: <20240322135015.14712-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.82 X-Spamd-Result: default: False [-0.82 / 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]; REPLY(-4.00)[]; 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)[-0.997]; MID_CONTAINS_FROM(1.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-0.52)[80.41%] 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 865c8c351159..e67bb846ab77 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 Fri Mar 22 13:50:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Wagner X-Patchwork-Id: 13600134 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 B943747A53 for ; Fri, 22 Mar 2024 13:50:23 +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=1711115426; cv=none; b=BcIrne3l7Sgz8cHD8kMlbId5rEc1/zdxFvLowvFBGmlxKgryW8awybFXPHGeX3rinNj2/RM7k7uGXpymW5Clxn1J9Gcbcsx3E1jHKXrhskK9TxAYG1Z82KnHN9eqodUdfWdL67KORHtCje28FTcI64i3S7OrKcPiT6AzKMM8Ah4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711115426; c=relaxed/simple; bh=YCIGqzbnuxgRiH5eRqLpdZkhi+BH1RJ1HrRmb/vej8A=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=fkEYcvT2Ni3xriPg9qN4A/v1cXw7MwMV2MBJP2LS6Ys6pbv/Sso5UJHxoG/C2oyf5eu+c4c41so2CGPCUrhaNg5A1Og0Ll5q6KRY2xj1exNW5QHcbNhYNzMrVO6Mwoxzma5QXhdG6oHw2nhYTGw/1I4IG6oeb8VHz+r3Xl+2qb4= 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=DPz+J9vQ; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=NDUZYCjo; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=DPz+J9vQ; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=NDUZYCjo; 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="DPz+J9vQ"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="NDUZYCjo"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="DPz+J9vQ"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="NDUZYCjo" 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 86C2720C1C; Fri, 22 Mar 2024 13:50:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1711115421; 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=DPz+J9vQ2SIFz13KNQjbb4eFlI2PYgS1vg4T5f6V83g7KS0x59fqzfKgcVv56JCwZpus2T Cb/del0YL6wgT6LR6J3JAtJlTO2sQnBXmaCx/4Pmtu55fhwpvJWTeBbgXnWQosJS+MBdZ9 xXtR8hmXkPoLgS7ViO0hDi5mdLGajlg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1711115421; 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=NDUZYCjodylMnD6VNRK/1R414nnkqaJHoJjBf5a/3U9pGU8mYmU2wHnXIkvrvkxLnTnd0F iJMjPahAj6dz38Dg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1711115421; 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=DPz+J9vQ2SIFz13KNQjbb4eFlI2PYgS1vg4T5f6V83g7KS0x59fqzfKgcVv56JCwZpus2T Cb/del0YL6wgT6LR6J3JAtJlTO2sQnBXmaCx/4Pmtu55fhwpvJWTeBbgXnWQosJS+MBdZ9 xXtR8hmXkPoLgS7ViO0hDi5mdLGajlg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1711115421; 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=NDUZYCjodylMnD6VNRK/1R414nnkqaJHoJjBf5a/3U9pGU8mYmU2wHnXIkvrvkxLnTnd0F iJMjPahAj6dz38Dg== 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 7504B136AD; Fri, 22 Mar 2024 13:50:21 +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 WjEfG52M/WWCJAAAD6G6ig (envelope-from ); Fri, 22 Mar 2024 13:50:21 +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 v2 04/18] common/xfs: propagate errors from _xfs_run_fio_verify_io Date: Fri, 22 Mar 2024 14:50:01 +0100 Message-ID: <20240322135015.14712-5-dwagner@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240322135015.14712-1-dwagner@suse.de> References: <20240322135015.14712-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: -1.21 X-Spamd-Result: default: False [-1.21 / 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]; REPLY(-4.00)[]; 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)[-0.997]; MID_CONTAINS_FROM(1.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-0.91)[86.20%] X-Spam-Flag: NO 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 Fri Mar 22 13:50:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Wagner X-Patchwork-Id: 13600131 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 E53EA47A58 for ; Fri, 22 Mar 2024 13:50:23 +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=1711115425; cv=none; b=k3HITMvL/+rShEe1qVQEESVjpPeTAFIOOxXEAknCYDafRKvQP0qVgOQ7NoI3Ker35ysOyqU0tSci0e3JnS908maG1+eH0640Mhgv8AE+52uxI1n5lZFhJiKzaZzbW/iTvvutrkEmC4oZIRLKg/uWKMhYuwDLMK0Ff4b274PKtGs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711115425; c=relaxed/simple; bh=IMn6efD3rHdfHVxXztU+oxf/9Izh+7UABCTIhY13dI8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=o3nmMeucJxpZpFYbbQUQxKetrIN6wxz2WG5TCGZ1v2u2/wZS3D36cIyGLtoCEE1/zJFYKp7tWKwDCu4x/B53kzqtor+tnq3Cb9NtJ2phq4P3lVtNJZCZgq5x/PQVp4iPmsA0O+LOtx+3+lC3eLG/7jGqcampR79T+tCcSlICXvA= 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=mS0rRmio; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=Hz3tVoOn; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=mS0rRmio; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=Hz3tVoOn; 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="mS0rRmio"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="Hz3tVoOn"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="mS0rRmio"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="Hz3tVoOn" 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 315815FE1D; Fri, 22 Mar 2024 13:50:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1711115422; 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=mS0rRmio57w6wXAFM4gWTvA1IizpBPnc13lrhiCLIbaZvGe9f1UWMaiP26FQcE8xT1+zMw 5qj6OyUIWcU3vQwNhJh9BBZtVXZPJt35KazAR5z2k41l9IpjYD4Ss+lRBUXD1M676HagNK +9T+ESN2CyZhRelwUL+PEgKm7sW3WB8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1711115422; 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=Hz3tVoOn3ZynuVf0DQZHgXwPDUlAsyrk5IjnFzzB2Nu5PkKWAEFZZEzaJSEcuDoCr0Yxov FYm5xBJwqsvnMuCQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1711115422; 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=mS0rRmio57w6wXAFM4gWTvA1IizpBPnc13lrhiCLIbaZvGe9f1UWMaiP26FQcE8xT1+zMw 5qj6OyUIWcU3vQwNhJh9BBZtVXZPJt35KazAR5z2k41l9IpjYD4Ss+lRBUXD1M676HagNK +9T+ESN2CyZhRelwUL+PEgKm7sW3WB8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1711115422; 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=Hz3tVoOn3ZynuVf0DQZHgXwPDUlAsyrk5IjnFzzB2Nu5PkKWAEFZZEzaJSEcuDoCr0Yxov FYm5xBJwqsvnMuCQ== 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 15131136AD; Fri, 22 Mar 2024 13:50:22 +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 dNjRA56M/WWEJAAAD6G6ig (envelope-from ); Fri, 22 Mar 2024 13:50:22 +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 v2 05/18] nvme/{012,013,035}: check return value of _xfs_run_fio_verify_io Date: Fri, 22 Mar 2024 14:50:02 +0100 Message-ID: <20240322135015.14712-6-dwagner@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240322135015.14712-1-dwagner@suse.de> References: <20240322135015.14712-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: 1.20 X-Spamd-Result: default: False [1.20 / 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]; REPLY(-4.00)[]; BROKEN_CONTENT_TYPE(1.50)[]; RCPT_COUNT_FIVE(0.00)[6]; 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)[-0.998]; NEURAL_SPAM_LONG(3.50)[1.000]; MID_CONTAINS_FROM(1.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email]; 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 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 Fri Mar 22 13:50:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Wagner X-Patchwork-Id: 13600132 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 6991447A5C for ; Fri, 22 Mar 2024 13:50:24 +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=1711115426; cv=none; b=Zb0s4tT/vwya4icVMB0E4kEZCJ6ooxzkmi3kFiirc3bYgOM8cDbYA//vpHvfzSJSOk8xrnMRAVtnd7NzsrQGxdObkrqfzbST1kjG4UGPklUwLgqzD3R1yUE6a4azW+yRKxDZ8iHKUehcDEH2PmmSm+umiCcH0IStTfEpq0jDouU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711115426; c=relaxed/simple; bh=aRAzDTd6GCU3/nhsdEv7HiRGUV5nf9n66G14txiEZCY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YkMiV6S4x8ue7V6hNPE1RTzkOSTTpkUhy6P9X7RMeX+NtGkOAPSBl03ZTD01D+K/noBV/aeacLf0999qO7/2hyWBHO7iMw2cVWkLFZQ78pD/e1ceqiz9d3iX6wJVRDC5pD0HXFFDVRpJeS+C/hS2dJzk47wW3l1pOUXAWHCrP80= 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; 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 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 C22C65FE21; Fri, 22 Mar 2024 13:50:22 +0000 (UTC) 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 B0EBA136AD; Fri, 22 Mar 2024 13:50:22 +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 +BG9KZ6M/WWHJAAAD6G6ig (envelope-from ); Fri, 22 Mar 2024 13:50:22 +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 v2 06/18] nvme/rc: use long command line option for nvme Date: Fri, 22 Mar 2024 14:50:03 +0100 Message-ID: <20240322135015.14712-7-dwagner@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240322135015.14712-1-dwagner@suse.de> References: <20240322135015.14712-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: -4.00 X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Spam-Flag: NO X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Spam-Level: Authentication-Results: smtp-out2.suse.de; none X-Rspamd-Queue-Id: C22C65FE21 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 e67bb846ab77..6bf2e3ae37c5 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 Fri Mar 22 13:50:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Wagner X-Patchwork-Id: 13600133 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 28BCF47A5D for ; Fri, 22 Mar 2024 13:50:24 +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=1711115426; cv=none; b=G5Wmrgp76geQi37CKt+rOnZw2+E1rIyVU/zNSNl8vaD14tUfEvNThNo8BWRUh8244abgXLII1ZpiUaTvPonX0TOjEzGV1FFlzUyCeolgrr7W880fDRxCW1Ip1byWTS5hFsZUYoi9ifbS9EpPiNRCcHSa9S6YfbGA/J24oX/mrH4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711115426; c=relaxed/simple; bh=YgSpOJUhuslLqtJpLkfqrgcyN6ob7taJHidtybp2OoU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=a8KG1FF0sOKBE2uSwE4IyIWCikPKyXxPc50BjlzhpNBoy3lUXHwMy9cxGUV4REykUwWtrMpt4txCw04T9zyvIdz8Em4GaGF60XpfyCsyWOX4+TZH8BU72rBEOe1eprECKYGm+HZlWun2vNFJnWZK1KbwhOv4Hm+NCT77/hbhAqo= 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; 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 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 6C86838565; Fri, 22 Mar 2024 13:50:23 +0000 (UTC) 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 5A061136AD; Fri, 22 Mar 2024 13:50:23 +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 6g2KFJ+M/WWJJAAAD6G6ig (envelope-from ); Fri, 22 Mar 2024 13:50:23 +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 v2 07/18] nvme/{014,015,018,019,020,023,024,026,045,046}: use long command line option for nvme Date: Fri, 22 Mar 2024 14:50:04 +0100 Message-ID: <20240322135015.14712-8-dwagner@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240322135015.14712-1-dwagner@suse.de> References: <20240322135015.14712-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: -4.00 X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Spam-Flag: NO X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Spam-Level: Authentication-Results: smtp-out1.suse.de; none X-Rspamd-Queue-Id: 6C86838565 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 Fri Mar 22 13:50:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Wagner X-Patchwork-Id: 13600135 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 94AD145BED for ; Fri, 22 Mar 2024 13:50:25 +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=1711115427; cv=none; b=twhYK7h1N5oURX3ho+zPoqjeIi85hBC5ly0Xm4/ymL+ILBZ5LsfPiKqz4whikKeLcAL6BVgx6q0u/UGEwy2qd+bux6mwjVNa1B5sabcTM7V1MiaGCGsyv7JWueGESeQ9Sn4KcJjYiRGg9jgQDAvSaGD1UQpPDmjp1aI33RLtgVk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711115427; c=relaxed/simple; bh=5KiipQ64s/I5PBbKNSKuLWLNW4oveJRJ3hohF8wMQzw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VI2wU1TusCCiWahUi959OmaWQF6ViSY0EtxSAiXr41vDty70eZ71ZIRdeEsaggTbVcnuTr46HTOGSE511h+HJQb9MdPTlW9DTcFzuVRGm7cuiqt/f+wW2oGJhkumMxNhMV/0ItI8BpVSqANTJoxilYDDqhRArWWyqLSQHyIDTNY= 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=jVs2g5/A; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=CLDTc1QI; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=jVs2g5/A; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=CLDTc1QI; 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="jVs2g5/A"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="CLDTc1QI"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="jVs2g5/A"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="CLDTc1QI" 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 19D2538568; Fri, 22 Mar 2024 13:50:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1711115424; 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=1exT17DU8HZ1V3VVIR43LcqgZanC+D5kbkzjJRcLqa4=; b=jVs2g5/Az+QkzcaRPXyirH6Czfh4lvQwtchsxnMJndsPgHijwxmQ6iLQy2M2aRaDQKuBf5 F9/UQEVd0Q/8PAkoLEiNbMw5dZQKyDHKDrOgUz3BkiJOec2INlemNmy0gPn6ZjAkcnyVqd yVlPgMmKmazH/ihlU0UL05P3YoLutI8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1711115424; 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=1exT17DU8HZ1V3VVIR43LcqgZanC+D5kbkzjJRcLqa4=; b=CLDTc1QIC0nZHGp3F9Ie2JUxbbGdhxAYKgrOX/cFyEbrc/5Rs3XXARiLwUw0+7KML3J/TI bgaJ2pTcGJUEPGBg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1711115424; 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=1exT17DU8HZ1V3VVIR43LcqgZanC+D5kbkzjJRcLqa4=; b=jVs2g5/Az+QkzcaRPXyirH6Czfh4lvQwtchsxnMJndsPgHijwxmQ6iLQy2M2aRaDQKuBf5 F9/UQEVd0Q/8PAkoLEiNbMw5dZQKyDHKDrOgUz3BkiJOec2INlemNmy0gPn6ZjAkcnyVqd yVlPgMmKmazH/ihlU0UL05P3YoLutI8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1711115424; 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=1exT17DU8HZ1V3VVIR43LcqgZanC+D5kbkzjJRcLqa4=; b=CLDTc1QIC0nZHGp3F9Ie2JUxbbGdhxAYKgrOX/cFyEbrc/5Rs3XXARiLwUw0+7KML3J/TI bgaJ2pTcGJUEPGBg== 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 086EE136AD; Fri, 22 Mar 2024 13:50:24 +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 FpbuAKCM/WWLJAAAD6G6ig (envelope-from ); Fri, 22 Mar 2024 13:50:24 +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 v2 08/18] nvme/rc: connect subsys only support long options Date: Fri, 22 Mar 2024 14:50:05 +0100 Message-ID: <20240322135015.14712-9-dwagner@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240322135015.14712-1-dwagner@suse.de> References: <20240322135015.14712-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: 1.20 X-Spamd-Result: default: False [1.20 / 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]; REPLY(-4.00)[]; BROKEN_CONTENT_TYPE(1.50)[]; RCPT_COUNT_FIVE(0.00)[6]; 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)[-0.998]; NEURAL_SPAM_LONG(3.50)[1.000]; MID_CONTAINS_FROM(1.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email]; 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-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 6bf2e3ae37c5..535bd869bf58 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 Fri Mar 22 13:50:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Wagner X-Patchwork-Id: 13600136 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 3FD6347A55 for ; Fri, 22 Mar 2024 13:50:26 +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=1711115427; cv=none; b=s01bTPRHVB2HEgR/g6YRtD6+TIPFEFTRBaxdlWbxFctEVuN+N3eB4BjuT9QGIjpgQGwg3WTONCGG8kA+6D7zZruQ7S9ZRYB2RFt6sFfTYL/TMpM8CSb9r5LTZUJlx5fTzyn1ZEc762KdqkYipEW9ccynwCLsOB5Uu8o2R9GU9DE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711115427; c=relaxed/simple; bh=GEjPRz6vL1/OvGYymjZ5R9fkHwzMYkM7obaX3AnPhpU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ZT6IO2119sCiwxwvfFtM5IipD+R4junqqdUU00p3AwHl3u1ptrzaP6AvivmV0zp3gpwsLRf70tyAQFr+/yXkVTLLIZGRyUykXWu2+lCYOKvJhO5APd34nZuI9BZoV4qwMMJQyF4AHAvDv15DerHLC9IsWpOCsnhKFJu4ORkEAqE= 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=mAmjeNwm; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=HJV9VLvZ; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=mAmjeNwm; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=HJV9VLvZ; 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="mAmjeNwm"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="HJV9VLvZ"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="mAmjeNwm"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="HJV9VLvZ" 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 B2A8138567; Fri, 22 Mar 2024 13:50:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1711115424; 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=qvDOBADFmDw+aOPrwhzt2BHMoHBf/CgZuKxG1LnfDio=; b=mAmjeNwmWK5HGVEazm2DBP9/INP1vIFarCO582u6orntLSVLHaoZmKr3abTJiRZuVycs5I M+OQUGRuAe/0+zus2GZUmUELIFKSnKn8HLY7Qr4sTc8vfsJTfpj1PhYttF3Ja+L0D0ucve eYVJ0VbetqKUplD9ytaqBIiJ9Kn+9D4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1711115424; 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=qvDOBADFmDw+aOPrwhzt2BHMoHBf/CgZuKxG1LnfDio=; b=HJV9VLvZkouRD/rk1iKn2A+52iDuUHjMwvV2HEq+BJ2hjZ+QEsCk2VWQFmhH28vTJxzJ66 /l330EupERTnDtBw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1711115424; 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=qvDOBADFmDw+aOPrwhzt2BHMoHBf/CgZuKxG1LnfDio=; b=mAmjeNwmWK5HGVEazm2DBP9/INP1vIFarCO582u6orntLSVLHaoZmKr3abTJiRZuVycs5I M+OQUGRuAe/0+zus2GZUmUELIFKSnKn8HLY7Qr4sTc8vfsJTfpj1PhYttF3Ja+L0D0ucve eYVJ0VbetqKUplD9ytaqBIiJ9Kn+9D4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1711115424; 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=qvDOBADFmDw+aOPrwhzt2BHMoHBf/CgZuKxG1LnfDio=; b=HJV9VLvZkouRD/rk1iKn2A+52iDuUHjMwvV2HEq+BJ2hjZ+QEsCk2VWQFmhH28vTJxzJ66 /l330EupERTnDtBw== 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 A11FB136AD; Fri, 22 Mar 2024 13:50:24 +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 JWnkJaCM/WWQJAAAD6G6ig (envelope-from ); Fri, 22 Mar 2024 13:50:24 +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 v2 09/18] nvme/rc: add nqn/uuid args to target setup/cleanup helper Date: Fri, 22 Mar 2024 14:50:06 +0100 Message-ID: <20240322135015.14712-10-dwagner@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240322135015.14712-1-dwagner@suse.de> References: <20240322135015.14712-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.18 X-Spamd-Result: default: False [-3.18 / 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]; REPLY(-4.00)[]; 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)[-0.997]; MID_CONTAINS_FROM(1.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-2.88)[99.49%] 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 | 38 +++++++++++++++++++++++++++++++------- 1 file changed, 31 insertions(+), 7 deletions(-) diff --git a/tests/nvme/rc b/tests/nvme/rc index 535bd869bf58..7f436037eb94 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 + _get_nvmet_ports "${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 Fri Mar 22 13:50:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Wagner X-Patchwork-Id: 13600137 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 E1F7847A66 for ; Fri, 22 Mar 2024 13:50:26 +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=1711115428; cv=none; b=MeT4NKHZUuVd69FRzzQZH3YLX/HSOF/6SqZHr3rvNiwyruGKSrXuG4uP6pDbQhcOvRexx6fPSbQBjwXCCz0GRsg/t3+VcOXlsCb6GMJHdMuSnzzR7Svwx7pXwPCZR09bzysBL/E7P5DTKpXtOLfPVINH8C/4SPKgOsy1r8e00rU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711115428; c=relaxed/simple; bh=LfoyrayKYoLkggjYpp5l1i4X8Pq3zks8nbttMhfpi3c=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=JpFEcWKmMH21fVpSRNnGODlgR7btgBZy/A2pjy+lOmHuGFSEeaRR98/Bl9bLSrpeBPB7VWB8xDvZxXUMynvlC9Clxmcld8jXd4VqfHHxhfwlnfC0zO1Yjc5IYPHfg7j0UWik/oYxU5OsIQu4bJqv85g9FzLO1IX1PTcbJxmgDQU= 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; 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 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 53E2C5FE26; Fri, 22 Mar 2024 13:50:25 +0000 (UTC) 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 4294C136AD; Fri, 22 Mar 2024 13:50:25 +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 aGPoDqGM/WWSJAAAD6G6ig (envelope-from ); Fri, 22 Mar 2024 13:50:25 +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 v2 10/18] nvme/rc: remove unused connect options Date: Fri, 22 Mar 2024 14:50:07 +0100 Message-ID: <20240322135015.14712-11-dwagner@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240322135015.14712-1-dwagner@suse.de> References: <20240322135015.14712-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; none X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Spam-Score: -4.00 X-Rspamd-Queue-Id: 53E2C5FE26 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 7f436037eb94..4ad6cb640627 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 Fri Mar 22 13:50:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Wagner X-Patchwork-Id: 13600138 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 A7C7347A7A for ; Fri, 22 Mar 2024 13:50:27 +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=1711115429; cv=none; b=jeAWrhrq4i0VY9aca44k/tRNoXX4+mPAqqlzkPRoHPsAQ2Kv20cG5UZKH0NdsUHZisSY65hPGJ0ZloLsoCOzANk0Hg8i8royr0hPCV5faB7de1AY63+qjRiZojZeAzc1UVC5CCrNSQT+d2WvACZf+Xfs8touAOPZ7Kpqkp/TIRY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711115429; c=relaxed/simple; bh=gsNU7h7keSEkO72yj8qqSUmR9M8p6D1Zx0HQ1kQW7Ng=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=pwkBAfOFP+noU/HwAA/PoDCB4tfjN5tOt7CEAkoMbjn9LyDavPMpuJy38ae99it9N5R0uxQFi8dpX53InDHS8gqfEtZT3QlglRmRDrgefI1RR3sZqChSgXA5uuZLFKUyuzIm3aUoubGfcBcboKN9IGhaLPpPiaL5sv304ZMY5YA= 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=ME82K/oW; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=Q/VTt3Yz; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=SmRpG85B; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=zBnM+US+; 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="ME82K/oW"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="Q/VTt3Yz"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="SmRpG85B"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="zBnM+US+" 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 EBAA33856B; Fri, 22 Mar 2024 13:50:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1711115426; 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=dRtGljXeRkizLPTdH8AL2v73BEIVmW5EhhtY7H/qPk0=; b=ME82K/oWdiEFfq87+g255APUS3QSdhh1jH6c+ZDOB/Frf+o2qU1eZJ04wOCqvhrPX0Vn7v 9xOPV8kd+O2RHCmm67ljSmF9UHhsYbS+shwV3K2vY+Dz0j9yOti17iQiynM2SPp+RZT29+ XcJj1vxUdH/xLnFwWiPs9yLZV5jltM4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1711115426; 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=dRtGljXeRkizLPTdH8AL2v73BEIVmW5EhhtY7H/qPk0=; b=Q/VTt3YzrGchJYhCVbFGhWC4cEjW19vyzSpjPp3n53lmNv5tGQsNWQ+UF+eijQTIxrxGXI V/FUoyRSCrHwyBDg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1711115425; 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=dRtGljXeRkizLPTdH8AL2v73BEIVmW5EhhtY7H/qPk0=; b=SmRpG85BUV4/V1Dy3DVTosobvKku+rKtonnVpTVepZ0Pl8pETl0c/K3re74+3T61Xa2Il5 wOixFWIX7xPt2ihUdUGDct5qHQG8EFBlYvegNbJNZ3xLcq4WS78EjRIhCFpmgLvilzRZ7E 8ejG8Zw0QisLGuojTB89rzdCAzV1kIg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1711115425; 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=dRtGljXeRkizLPTdH8AL2v73BEIVmW5EhhtY7H/qPk0=; b=zBnM+US+C3q+rIElXZj+EWOhstxsQt0+tu4O6fqbaMFow/Kt680Zfsgz5rou1+jtri+PaY LP6yeZHkxG085xDg== 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 DAF5F136AD; Fri, 22 Mar 2024 13:50:25 +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 YxobNKGM/WWUJAAAD6G6ig (envelope-from ); Fri, 22 Mar 2024 13:50:25 +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 v2 11/18] nvme/rc: do not cleanup external managed loop device Date: Fri, 22 Mar 2024 14:50:08 +0100 Message-ID: <20240322135015.14712-12-dwagner@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240322135015.14712-1-dwagner@suse.de> References: <20240322135015.14712-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.04 X-Spamd-Result: default: False [3.04 / 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]; REPLY(-4.00)[]; BROKEN_CONTENT_TYPE(1.50)[]; RCPT_COUNT_FIVE(0.00)[6]; 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)[-0.998]; NEURAL_SPAM_LONG(3.50)[1.000]; MID_CONTAINS_FROM(1.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-1.16)[88.80%] X-Spam-Level: *** Authentication-Results: smtp-out1.suse.de; none X-Spam-Flag: NO If the test setups a loop device itself (not created by _nvmet_target_setup), _nvmet_target_cleanup should not cleanup the block device automatically. Because _nvmet_target_cleanup has no way to figure this out by itself if it is managed or not, the caller needs to pass in the block device type. Signed-off-by: Daniel Wagner --- tests/nvme/rc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/nvme/rc b/tests/nvme/rc index 4ad6cb640627..9d47c737f9b0 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 Fri Mar 22 13:50:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Wagner X-Patchwork-Id: 13600139 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 4125046435 for ; Fri, 22 Mar 2024 13:50:28 +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=1711115429; cv=none; b=tgt6D7BpVqdqLxDqpU2p7z6AHj2IVNUSKbl1XLy0/8rCDIp3vdL1iPcP/vwcmU6RiQkrz39ga8H1oONNxnE2aYSvNvwcUf6jpy8v+k9o7sKGlhsxwnJ9cRD66BeORiQrM4xXSZ+nUa4PH/NlBD7qHG73nvMChK1HFMetztC2iSM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711115429; c=relaxed/simple; bh=5MRnSWLpW8hj/Oqu2KDlVtApORbWtKK+RCzEKYe7gzk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=K8unuBT8ssw0sc/kqTGJWy/Dr942hGxZKrT8ItdrYoUjP4mZBagr8dZGWEvVx6cBU54v1ZJg4tRiwiMO/J0qVNOK5DTTEMUQh2sM82KtEKwkCjJ9VfDCW8rni8p/Y+DCLzXXTlCRmFJTaP4jteJfo8gqCQg601CWq9d0/EphI0s= 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=GYCLQaAC; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=6+XqR3yW; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=GYCLQaAC; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=6+XqR3yW; 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="GYCLQaAC"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="6+XqR3yW"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="GYCLQaAC"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="6+XqR3yW" 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 95D6238563; Fri, 22 Mar 2024 13:50:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1711115426; 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=WGxxqfi5Ng/DrXSdCBEaIZL1gVtEAJyeAtVHnguQ9pk=; b=GYCLQaACP+BibsfMIHwOXYAA4iNTO9oXfhNwQYzc4qSeqGDa4NWylWH4UGVqhOupWuNq79 VYDJJCFiLFQpwu13E1+N14ZSW0rOygvh5MHZOYzUqMV2GjgBhysy8Bveo7EgDOISGmFZcI c+QdkOcp9gC9AUv7BVAoMgHyVllJXyk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1711115426; 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=WGxxqfi5Ng/DrXSdCBEaIZL1gVtEAJyeAtVHnguQ9pk=; b=6+XqR3yWByZGy8zfxZIIeSK5+msfFEitTGQDUo6Bocgp2Nrz95avj2P2esjz46eRFGQCpl r3H2118qtn00/wBw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1711115426; 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=WGxxqfi5Ng/DrXSdCBEaIZL1gVtEAJyeAtVHnguQ9pk=; b=GYCLQaACP+BibsfMIHwOXYAA4iNTO9oXfhNwQYzc4qSeqGDa4NWylWH4UGVqhOupWuNq79 VYDJJCFiLFQpwu13E1+N14ZSW0rOygvh5MHZOYzUqMV2GjgBhysy8Bveo7EgDOISGmFZcI c+QdkOcp9gC9AUv7BVAoMgHyVllJXyk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1711115426; 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=WGxxqfi5Ng/DrXSdCBEaIZL1gVtEAJyeAtVHnguQ9pk=; b=6+XqR3yWByZGy8zfxZIIeSK5+msfFEitTGQDUo6Bocgp2Nrz95avj2P2esjz46eRFGQCpl r3H2118qtn00/wBw== 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 8344B136AD; Fri, 22 Mar 2024 13:50:26 +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 BI+JHqKM/WWWJAAAD6G6ig (envelope-from ); Fri, 22 Mar 2024 13:50:26 +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 v2 12/18] nvme/031: do not open code target setup/cleanup Date: Fri, 22 Mar 2024 14:50:09 +0100 Message-ID: <20240322135015.14712-13-dwagner@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240322135015.14712-1-dwagner@suse.de> References: <20240322135015.14712-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: 1.88 X-Spamd-Result: default: False [1.88 / 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]; REPLY(-4.00)[]; BROKEN_CONTENT_TYPE(1.50)[]; RCPT_COUNT_FIVE(0.00)[6]; 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)[-0.998]; NEURAL_SPAM_LONG(3.50)[1.000]; MID_CONTAINS_FROM(1.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-2.32)[96.83%] X-Spam-Level: * Authentication-Results: smtp-out1.suse.de; none 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 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/nvme/031 b/tests/nvme/031 index ed5f19668674..204ba7d2892f 100755 --- a/tests/nvme/031 +++ b/tests/nvme/031 @@ -40,14 +40,14 @@ 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" \ + --blkdev "${loop_dev}" done _remove_nvmet_port "${port}" From patchwork Fri Mar 22 13:50: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: 13600141 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 B8F5147F64 for ; Fri, 22 Mar 2024 13:50:28 +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=1711115430; cv=none; b=A+k/3EjL8PyX3uGcGFLoIU5Q6yPw7izaJuQRjctPEGtIIynYpmvLozBH781I5UdayiwB/WdGJGwUGrgNvBCMFZgALPTS8nXf5o396rX0ZGHf/vhPZE4p7kXWmhdausEhVyY44yomkzONsLGXc8CFF6wqSWGNqVrtrQPawW3l3NY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711115430; c=relaxed/simple; bh=nC1Z8r9h1BS0mcj4lfaaXNh9wfsizDu508EXT8BxN9Y=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=mJPNP80axCqoRfOVl9ugwASV8gDN7qhmkU5Lrihq+jV6aNVkE+8le5VqhrnWpQWi98p7fBfU09FMTA34KGxQ6AmPsr6J2OWe2LJ1CIMzL2j9BCHVDQNSPpMnBogB99rNxPPik08VnACrT1GAZOBXl9COGdYjI7iV4aHd013Pp8g= 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=fLO8R3MO; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=QDkpCI5+; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=fLO8R3MO; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=QDkpCI5+; 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="fLO8R3MO"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="QDkpCI5+"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="fLO8R3MO"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="QDkpCI5+" 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 3AAD95FE21; Fri, 22 Mar 2024 13:50:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1711115427; 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=spm9GVdaOI8UR8nt1GPJV7b8HcAmOe2bSVnBngDjipw=; b=fLO8R3MO3Z5O5wyS3pYnoCvs3qbO+7X8IFSBdh2HsD9LsC5KGkWBlfxw9NA+TeXmOAKlxF 667JaT2rhBb+9zPELmmaxh52pYDCcUrUkND80bN0IFkop/h/HoW0OFnuQGZBk5htTRcVzC y++OQRha3ZGKbCF97irCoknX1VXGQ7I= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1711115427; 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=spm9GVdaOI8UR8nt1GPJV7b8HcAmOe2bSVnBngDjipw=; b=QDkpCI5+skzl7kuAStcRxTaT53gySZiEc7S+9gtxt3mzv8s3yLAmVCyvCGByYmEudWeiLe HbljDdiq861UqbAw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1711115427; 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=spm9GVdaOI8UR8nt1GPJV7b8HcAmOe2bSVnBngDjipw=; b=fLO8R3MO3Z5O5wyS3pYnoCvs3qbO+7X8IFSBdh2HsD9LsC5KGkWBlfxw9NA+TeXmOAKlxF 667JaT2rhBb+9zPELmmaxh52pYDCcUrUkND80bN0IFkop/h/HoW0OFnuQGZBk5htTRcVzC y++OQRha3ZGKbCF97irCoknX1VXGQ7I= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1711115427; 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=spm9GVdaOI8UR8nt1GPJV7b8HcAmOe2bSVnBngDjipw=; b=QDkpCI5+skzl7kuAStcRxTaT53gySZiEc7S+9gtxt3mzv8s3yLAmVCyvCGByYmEudWeiLe HbljDdiq861UqbAw== 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 272D7136AD; Fri, 22 Mar 2024 13:50:27 +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 U10vCKOM/WWYJAAAD6G6ig (envelope-from ); Fri, 22 Mar 2024 13:50:27 +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 v2 13/18] nvme: drop default trtype argument for _nvmet_connect_subsys Date: Fri, 22 Mar 2024 14:50:10 +0100 Message-ID: <20240322135015.14712-14-dwagner@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240322135015.14712-1-dwagner@suse.de> References: <20240322135015.14712-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: 1.20 X-Spamd-Result: default: False [1.20 / 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]; REPLY(-4.00)[]; BROKEN_CONTENT_TYPE(1.50)[]; RCPT_COUNT_FIVE(0.00)[6]; 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)[-0.999]; NEURAL_SPAM_LONG(3.50)[1.000]; MID_CONTAINS_FROM(1.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email]; 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 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 | 12 +++++------- 33 files changed, 44 insertions(+), 47 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 204ba7d2892f..19854ccb903f 100755 --- a/tests/nvme/031 +++ b/tests/nvme/031 @@ -43,7 +43,7 @@ test() { _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" \ 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 9d47c737f9b0..9ce2fd787f8d 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}") @@ -902,7 +900,7 @@ _nvmet_passthru_target_connect() { local trtype=$1 local subsys_name=$2 - _nvme_connect_subsys "${trtype}" "${subsys_name}" --no-wait || return + _nvme_connect_subsys "${subsys_name}" --no-wait || return nsdev=$(_find_nvme_passthru_loop_dev "${subsys_name}") # The following tests can race with the creation From patchwork Fri Mar 22 13:50: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: 13600140 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 5C16A47A66 for ; Fri, 22 Mar 2024 13:50:29 +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=1711115430; cv=none; b=kUiwDAnG6xgjFNpQtxDBqqdusiVa2EbusYmkAV6flbTy5xZp/R/i4YdC6hrazBkCsTng4bt44k4n7BeucTLAZnvNS3QB2iX4DsV4P9gvMuke+Dn8FChRnKbCnF7nf/h45h9M/eMJZqjRojMIKWNwHvhhOdMuEV7nZxZQx0LLe4M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711115430; c=relaxed/simple; bh=8FTG64vvVBMMD6INy+QP3ubqYs6kS2IGcvffk6/eX18=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=r8Xd1SMO+rUeZX0bmotZaehWFMCFOOQUZGCR4E5AsbZ8eG6xoHWxX0O76G2M9ynM/BmaQKj41/7V6BHVRE+q+quHPJ3cP/uxIRCBm79ro/0MeCFrKD0vvnahvv1+rBdLNc0WZ4aWLNnv/+pzOQORjTmocA3IOqu/o25kqY0byAo= 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; 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 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 D387E3855D; Fri, 22 Mar 2024 13:50:27 +0000 (UTC) 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 C271C136AD; Fri, 22 Mar 2024 13:50:27 +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 KzAILqOM/WWcJAAAD6G6ig (envelope-from ); Fri, 22 Mar 2024 13:50:27 +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 v2 14/18] nvme: drop default trtype argument for _nvmet_passthru_target_connect Date: Fri, 22 Mar 2024 14:50:11 +0100 Message-ID: <20240322135015.14712-15-dwagner@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240322135015.14712-1-dwagner@suse.de> References: <20240322135015.14712-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: -4.00 X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Spam-Flag: NO X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Spam-Level: Authentication-Results: smtp-out1.suse.de; none X-Rspamd-Queue-Id: D387E3855D Every invocation of _nvmet_passthru_target_connect passes in the default nvme_trtype argument. The argument is not evaluated anymore, thus just remove it. Signed-off-by: Daniel Wagner --- tests/nvme/033 | 2 +- tests/nvme/034 | 2 +- tests/nvme/035 | 2 +- tests/nvme/036 | 2 +- tests/nvme/037 | 3 +-- tests/nvme/rc | 3 +-- 6 files changed, 6 insertions(+), 8 deletions(-) diff --git a/tests/nvme/033 b/tests/nvme/033 index 6cc4f57e6d60..cb120e20b573 100755 --- a/tests/nvme/033 +++ b/tests/nvme/033 @@ -53,7 +53,7 @@ test_device() { _nvmet_passthru_target_setup "${def_subsysnqn}" - nsdev=$(_nvmet_passthru_target_connect "${nvme_trtype}" "${def_subsysnqn}") + nsdev=$(_nvmet_passthru_target_connect "${def_subsysnqn}") compare_dev_info "${nsdev}" diff --git a/tests/nvme/034 b/tests/nvme/034 index 3bd1c3ad2f61..98a7db859b36 100755 --- a/tests/nvme/034 +++ b/tests/nvme/034 @@ -23,7 +23,7 @@ test_device() { local nsdev _nvmet_passthru_target_setup "${def_subsysnqn}" - nsdev=$(_nvmet_passthru_target_connect "${nvme_trtype}" "${def_subsysnqn}") + nsdev=$(_nvmet_passthru_target_connect "${def_subsysnqn}") _run_fio_verify_io --size="${nvme_img_size}" --filename="${nsdev}" diff --git a/tests/nvme/035 b/tests/nvme/035 index 01aa09077d6a..c17e8be6ce46 100755 --- a/tests/nvme/035 +++ b/tests/nvme/035 @@ -29,7 +29,7 @@ test_device() { local nsdev _nvmet_passthru_target_setup "${def_subsysnqn}" - nsdev=$(_nvmet_passthru_target_connect "${nvme_trtype}" "${def_subsysnqn}") + nsdev=$(_nvmet_passthru_target_connect "${def_subsysnqn}") if ! _xfs_run_fio_verify_io "${nsdev}" "${nvme_img_size}"; then echo "FAIL: fio verify failed" diff --git a/tests/nvme/036 b/tests/nvme/036 index 89ccd256a67c..a1ae74fa95ea 100755 --- a/tests/nvme/036 +++ b/tests/nvme/036 @@ -21,7 +21,7 @@ test_device() { local ctrldev _nvmet_passthru_target_setup "${def_subsysnqn}" - nsdev=$(_nvmet_passthru_target_connect "${nvme_trtype}" "${def_subsysnqn}") + nsdev=$(_nvmet_passthru_target_connect "${def_subsysnqn}") ctrldev=$(_find_nvme_dev "${def_subsysnqn}") diff --git a/tests/nvme/037 b/tests/nvme/037 index a2815b3ff2d7..eb47839a4289 100755 --- a/tests/nvme/037 +++ b/tests/nvme/037 @@ -23,8 +23,7 @@ test_device() { for ((i = 0; i < iterations; i++)); do _nvmet_passthru_target_setup "${subsys}${i}" - nsdev=$(_nvmet_passthru_target_connect "${nvme_trtype}" \ - "${subsys}${i}") + nsdev=$(_nvmet_passthru_target_connect "${subsys}${i}") _nvme_disconnect_subsys "${subsys}${i}" >>"${FULL}" 2>&1 _nvmet_passthru_target_cleanup "${subsys}${i}" diff --git a/tests/nvme/rc b/tests/nvme/rc index 9ce2fd787f8d..1dd1072f9ffb 100644 --- a/tests/nvme/rc +++ b/tests/nvme/rc @@ -897,8 +897,7 @@ _nvmet_passthru_target_setup() { } _nvmet_passthru_target_connect() { - local trtype=$1 - local subsys_name=$2 + local subsys_name=$1 _nvme_connect_subsys "${subsys_name}" --no-wait || return nsdev=$(_find_nvme_passthru_loop_dev "${subsys_name}") From patchwork Fri Mar 22 13:50: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: 13600142 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 1DA5E481B3 for ; Fri, 22 Mar 2024 13:50:29 +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=1711115432; cv=none; b=GIt4xP5Tue0xNZ0On3noUWcBCvTXSfYDue4iMr/GZapsuWKnIn4hDP4Uc4umsPOIYld52IQjMGLK7UGooA/xbSNaWjbUOh9mq+XyP3ucR+TTamvVvpXlcj0z/A197t8vxN/HnRhmY+C7wrlk5MQyOIJuBRbreSB9COFRmSXjxWs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711115432; c=relaxed/simple; bh=G0Pm0ALJJOjfSpg47KOmFsArxk8CMYzfyTxecRSDt9Y=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VcFinD0RdLt6QidgGXCp7OUP1zWCI7fnvV5NCUJ0TXiPUXYk0/fduW4GLU6EfPcgnvofDd0suiVMzl8SZNlYxMAxULaT6s3W8Zs6mmaVr0eEweG2WJUxkiB7PV7OFpYxYalk9Gu9bZ6LwMhg5w/lFvDB5OCDFWx2wDSkB+ruUJo= 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; 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 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 819675FE24; Fri, 22 Mar 2024 13:50:28 +0000 (UTC) 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 698C7136AD; Fri, 22 Mar 2024 13:50:28 +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 VfdWGKSM/WWhJAAAD6G6ig (envelope-from ); Fri, 22 Mar 2024 13:50:28 +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 v2 15/18] nvme: drop default subsysnqn argument from _nvme_{connect|disconnect}_subsys Date: Fri, 22 Mar 2024 14:50:12 +0100 Message-ID: <20240322135015.14712-16-dwagner@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240322135015.14712-1-dwagner@suse.de> References: <20240322135015.14712-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; none X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Spam-Score: -4.00 X-Rspamd-Queue-Id: 819675FE24 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 | 6 +++--- tests/nvme/048 | 11 +++++------ tests/nvme/rc | 28 ++++++++++++++++++++-------- 33 files changed, 98 insertions(+), 99 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 19854ccb903f..0bf823dbbb0d 100755 --- a/tests/nvme/031 +++ b/tests/nvme/031 @@ -43,8 +43,8 @@ test() { _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}" 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..3a5df7c0946c 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 _nvmet_target_cleanup echo "Test complete" diff --git a/tests/nvme/047 b/tests/nvme/047 index 162bd3bf70fa..75aad7d06a36 100755 --- a/tests/nvme/047 +++ b/tests/nvme/047 @@ -35,15 +35,15 @@ test() { rand_io_size="$(_nvme_calc_rand_io_size 4M)" _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 - _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 1dd1072f9ffb..225314ea055c 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 Fri Mar 22 13:50: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: 13600144 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 6E997481DD for ; Fri, 22 Mar 2024 13:50:30 +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=1711115433; cv=none; b=lpTrHkA8IqgzSI4M3ux8joNUSgXYJRqWKgVkRU5m+cNBrCrR7QU9pur8HMpA/rwtW9PSYdZsGYY/Qr9RmZ70MalbRIX08qIH7fWnUbyY1TR0FbsfmIbC3AkWDloxIHIAVTJZaqsXSaBMbOtQDuh2J/CSIi4Qx3v3k8ETPAEOb90= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711115433; c=relaxed/simple; bh=4bpSVLZdZpyIxbCq/ZqQb9QaMFYJMevz+2v3LoSG2kE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=rdLkRVFy48pZ47lAO3w1UGq4y9baIoHSODnT8XepYq5GB7+zTyOUYuuyiFhsOFQ6lLF5DaTY/uxypUScb50qUGzNnF5HEXSIt7tkHXsbBiuoif5vkVYDSk8ZU5wfgNoN3HQ5h/mi1VySyrdCxW2EBP+C9PzDA7PF34pugyKEzzw= 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=N8mZ5YOk; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=14eIX+dU; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=N8mZ5YOk; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=14eIX+dU; 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="N8mZ5YOk"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="14eIX+dU"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="N8mZ5YOk"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="14eIX+dU" 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 272285FE2A; Fri, 22 Mar 2024 13:50:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1711115429; 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=RRwxPcjUmT+sgVYhBELtu/T0gPthLZogcmVoqBFq7L4=; b=N8mZ5YOkfi5ntma4oGIYB0BsjpBNrHe0o111WzWzWpEvjp3WsCfb1DmfykvD69aahnMqPd 0F5/BnGG4zBWAMx2SHFpTuSkwqJYoAgvU71BnIg1FXd60W4GSkuPfOAksoUBz5l9bvkpBf 4WZ9b8nKu+R9tUpY4dYAnTyW7HbIR3E= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1711115429; 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=RRwxPcjUmT+sgVYhBELtu/T0gPthLZogcmVoqBFq7L4=; b=14eIX+dUDFhggQqNl2/y1BwuPJnR4XtHJ7hiFpBTEwRrTMAlmo3p/e+T1AQIFfxp796beg 1TnKz30rHfkkgiBg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1711115429; 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=RRwxPcjUmT+sgVYhBELtu/T0gPthLZogcmVoqBFq7L4=; b=N8mZ5YOkfi5ntma4oGIYB0BsjpBNrHe0o111WzWzWpEvjp3WsCfb1DmfykvD69aahnMqPd 0F5/BnGG4zBWAMx2SHFpTuSkwqJYoAgvU71BnIg1FXd60W4GSkuPfOAksoUBz5l9bvkpBf 4WZ9b8nKu+R9tUpY4dYAnTyW7HbIR3E= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1711115429; 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=RRwxPcjUmT+sgVYhBELtu/T0gPthLZogcmVoqBFq7L4=; b=14eIX+dUDFhggQqNl2/y1BwuPJnR4XtHJ7hiFpBTEwRrTMAlmo3p/e+T1AQIFfxp796beg 1TnKz30rHfkkgiBg== 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 159B9136AD; Fri, 22 Mar 2024 13:50:29 +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 O9nPA6WM/WWnJAAAD6G6ig (envelope-from ); Fri, 22 Mar 2024 13:50:29 +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 v2 16/18] nvme/{041,042,043,044,045,048}: do not pass default host{nqn|id} to _nvme_connect_subsys Date: Fri, 22 Mar 2024 14:50:13 +0100 Message-ID: <20240322135015.14712-17-dwagner@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240322135015.14712-1-dwagner@suse.de> References: <20240322135015.14712-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.30 X-Spamd-Result: default: False [-3.30 / 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]; REPLY(-4.00)[]; 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)[-0.997]; MID_CONTAINS_FROM(1.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email]; 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 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 3a5df7c0946c..87ac3c019970 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 Fri Mar 22 13:50: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: 13600145 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 40BC5481D0 for ; Fri, 22 Mar 2024 13:50:31 +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=1711115434; cv=none; b=ZXZG7SwyMiGTCthekwBJQz95JnvcvtqVCQ5O3k8VWwTgLTBYlK1Ku5T29BlFmApdKYx/Vq31swx9fl7SXwUGBBqfE3Po2GHM4V4jK1HgYL1yivW8QGVDvD7sDgllVrg5bR0YUCWAUAXsmSTrD6p9wcYNMKLYUZPUz4KAKrJ6jUE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711115434; c=relaxed/simple; bh=1TgkEM8ICVzXsfc037Aq1jbLbaeiogdCsfUm388ih9E=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=l9w80LYPYYqd6kUEjhtaoAEJPI+n3RI3Huge8D2x00eSqpwQxluPZluOrd4zclzwOa3IGi6jmnXfS4f6yBmugC3xBMWi90HabWVGzUdjYv9ktRMROXs9uivSL80GK4DMUFdL7BKGwdPtzdQmFKMhLMHDDnlS7rdTNi8NQMGavx8= 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; 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 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 C76CB3856A; Fri, 22 Mar 2024 13:50:29 +0000 (UTC) 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 B4C7B136AD; Fri, 22 Mar 2024 13:50:29 +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 TTuyKqWM/WWsJAAAD6G6ig (envelope-from ); Fri, 22 Mar 2024 13:50:29 +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 v2 17/18] nvme: don't assume namespace id Date: Fri, 22 Mar 2024 14:50:14 +0100 Message-ID: <20240322135015.14712-18-dwagner@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240322135015.14712-1-dwagner@suse.de> References: <20240322135015.14712-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-out1.suse.de; none X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Spam-Score: -4.00 X-Rspamd-Queue-Id: C76CB3856A X-Spam-Flag: NO 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 | 7 ++----- tests/nvme/040 | 4 +++- tests/nvme/045 | 5 +++-- tests/nvme/047 | 8 ++++---- tests/nvme/rc | 18 ++++++++++++++++++ 19 files changed, 83 insertions(+), 82 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..559c0b4feabe 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,8 @@ test() { reset_nr_hugepages=true fi - local dev="/dev/${nvmedev}n1" + local dev + 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 87ac3c019970..f387eadcbda3 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 _nvmet_target_cleanup diff --git a/tests/nvme/047 b/tests/nvme/047 index 75aad7d06a36..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,10 +30,10 @@ 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 >> "$FULL" 2>&1 @@ -41,7 +41,7 @@ test() { --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 225314ea055c..29eabfb917e9 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 + basename "${ns}" + fi + done +} + _find_nvme_passthru_loop_dev() { local subsys=$1 local nsid From patchwork Fri Mar 22 13:50: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: 13600143 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 0B285482CA for ; Fri, 22 Mar 2024 13:50:31 +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=1711115433; cv=none; b=kaHe/oHQQT/JBnrortrbRilkaaoTcKdRmUlF+9VO33Jfno3/9pgsgOtAzqOG2G5SBBT2uAGXvXqlvUGGX8Gt77ISqSO24x1M+lQiZ3ylT5Ko/HItjpK/RpDnuO2xH33Xy8xkxNg+acpKufPDh+XGUh4ffUDLB6Uh9Wwz4CKxZ7w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711115433; c=relaxed/simple; bh=JqKE2N8SMV1Emk1mDNVMBkXmRjUMBJQkCJuJmbGqV9I=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=rl8JWA6n6u+AJ+cbIqnnLGQ3sRQNbX5UrQRhp1bXm+X+Xrz5xxumodhNgoi1ml05kqSA92Qt0HdjAYVZpA4ac2vEzj9HXo+3fOsNK5KOkBzlydmPjXllNUrW4qA97q84tRWxidDviSoI/RB1bDbyMeDgtViOD3xr6S9NoXnnEbY= 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; 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 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 744913856D; Fri, 22 Mar 2024 13:50:30 +0000 (UTC) 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 62B32136AD; Fri, 22 Mar 2024 13:50: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 k8CrFqaM/WWvJAAAD6G6ig (envelope-from ); Fri, 22 Mar 2024 13:50: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 v2 18/18] nvme/028: drop unused nvmedev Date: Fri, 22 Mar 2024 14:50:15 +0100 Message-ID: <20240322135015.14712-19-dwagner@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240322135015.14712-1-dwagner@suse.de> References: <20240322135015.14712-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-out1.suse.de; none X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Spam-Score: -4.00 X-Rspamd-Queue-Id: 744913856D 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