From patchwork Mon Mar 18 09:38:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Wagner X-Patchwork-Id: 13595120 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 93ACF2C1AF for ; Mon, 18 Mar 2024 09:39:06 +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=1710754748; cv=none; b=GXN1B9KjD9ZeFwcAZ0Ko4n5M0KzAc2vuJNj/1elCzOoVBuzOtguYPXUC0ZI0SpRwvvHncIdEQK0tdzLVd8KLkJIs16gcWIxec3/jKxRKBJ4M6m/fEAt122OTI6YgLMMtZA5gHQIgt/agyYH0GuTG030RP5NIolmw69hqBBm9cQo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710754748; c=relaxed/simple; bh=YCIGqzbnuxgRiH5eRqLpdZkhi+BH1RJ1HrRmb/vej8A=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=DB7I3/t9FZmrw6ruws+C8drc5eU+2OrIgiQk6wq0P4vQjrR6OKOv7OrQTNa2AcB0nkysz107JhdkEOO5rTGSG7uH1cn2KhRcTfIAXIki6cRLjnM5WmqIoHor7mtEi8/g6585isHd9a6Ep03jI1NJd3jm1r9J8U0djeI1rZMoScw= 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 ED0C25C336; Mon, 18 Mar 2024 09:39:04 +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 DB2431349D; Mon, 18 Mar 2024 09:39:04 +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 oOoPNLgL+GWlUAAAD6G6ig (envelope-from ); Mon, 18 Mar 2024 09:39:04 +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: [RFC blktests v1 01/10] common/xfs: propagate errors from _xfs_run_fio_verify_io Date: Mon, 18 Mar 2024 10:38:46 +0100 Message-ID: <20240318093856.22307-2-dwagner@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240318093856.22307-1-dwagner@suse.de> References: <20240318093856.22307-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: ED0C25C336 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 Mon Mar 18 09:38:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Wagner X-Patchwork-Id: 13595121 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 6001E2C1B6 for ; Mon, 18 Mar 2024 09:39:07 +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=1710754748; cv=none; b=MqYXHdHFHRUIaN00aXZ/ZVewiihziCr5bt4vDi1f6I+iaWhWI672m8RfEWx35m0CwokqFmiguQYgxJvL2QA/YPs8HAWvi8H2qsPmeVOO26rOgpBo8tCjXC1awcF3xubi7HrH7eJV5OzLejcvNQLOcts+pJ6WTJv4um46+1ZmSuk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710754748; c=relaxed/simple; bh=IMn6efD3rHdfHVxXztU+oxf/9Izh+7UABCTIhY13dI8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=uFCyZOLqxbtQwLxasxUeSqwDWNI+FNmBUXktlE9l7MCFCRqfCqt94pjZArjHdnNQgom0oDjW4fbFFSFR04YzVw5lJEUO3e6EsdtdQsnBuZi3hhWoWyhp8pOJSodlhYcF7F63wbB5b4bJKLkwSeNBYDqpAjDCyewIqUsKg3zwgMs= 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=UmUVZYdV; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=Nv6Nkm3E; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=UmUVZYdV; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=Nv6Nkm3E; 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="UmUVZYdV"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="Nv6Nkm3E"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="UmUVZYdV"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="Nv6Nkm3E" 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 93A8B5C339; Mon, 18 Mar 2024 09:39:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710754745; 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=UmUVZYdVjkX1ZVWthvtPIDQov4iAiwZ9ykfv5AYl6PKkGAn+BTXOeQv8uUOeDypPLYoZYF RzF5vbG4DvHGU8z7RjshCSHX7YDlCv+lyQ/Zy3SSzxq6wjcBKbYww4leV6JGezp6iVWkTA SbGp12Da/xxaCU20FSsR2MglFQQFU6A= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710754745; 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=Nv6Nkm3E7yyC//gBzLZsaXUPUH61U9dyrDAnlmJ8xim5abR6P0KEm5RrHMuPpqrRFaRTav bBtD0NuVqDVeW8BA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710754745; 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=UmUVZYdVjkX1ZVWthvtPIDQov4iAiwZ9ykfv5AYl6PKkGAn+BTXOeQv8uUOeDypPLYoZYF RzF5vbG4DvHGU8z7RjshCSHX7YDlCv+lyQ/Zy3SSzxq6wjcBKbYww4leV6JGezp6iVWkTA SbGp12Da/xxaCU20FSsR2MglFQQFU6A= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710754745; 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=Nv6Nkm3E7yyC//gBzLZsaXUPUH61U9dyrDAnlmJ8xim5abR6P0KEm5RrHMuPpqrRFaRTav bBtD0NuVqDVeW8BA== 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 815CC1349D; Mon, 18 Mar 2024 09:39:05 +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 bBMiHrkL+GWoUAAAD6G6ig (envelope-from ); Mon, 18 Mar 2024 09:39:05 +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: [RFC blktests v1 02/10] nvme/{012,013,035}: check return value of _xfs_run_fio_verify_io Date: Mon, 18 Mar 2024 10:38:47 +0100 Message-ID: <20240318093856.22307-3-dwagner@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240318093856.22307-1-dwagner@suse.de> References: <20240318093856.22307-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.29 X-Spamd-Result: default: False [-3.29 / 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)[-0.998]; 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.980]; MID_CONTAINS_FROM(1.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-3.00)[100.00%] X-Spam-Flag: NO When _xfs_run_fio_verify_io fails we should log the error. Currently, no failure is detected when this function fails. Signed-off-by: Daniel Wagner --- tests/nvme/012 | 4 +++- tests/nvme/013 | 4 +++- tests/nvme/035 | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/nvme/012 b/tests/nvme/012 index c5e0eb9c5e23..f0914ce3206b 100755 --- a/tests/nvme/012 +++ b/tests/nvme/012 @@ -33,7 +33,9 @@ test() { nvmedev=$(_find_nvme_dev "${def_subsysnqn}") _check_uuid "${nvmedev}" - _xfs_run_fio_verify_io "/dev/${nvmedev}n1" + if ! _xfs_run_fio_verify_io "/dev/${nvmedev}n1"; then + echo "FAIL: fio verify failed" + fi _nvme_disconnect_subsys "${def_subsysnqn}" diff --git a/tests/nvme/013 b/tests/nvme/013 index 3ec280ff24cf..3cef009cb9f4 100755 --- a/tests/nvme/013 +++ b/tests/nvme/013 @@ -32,7 +32,9 @@ test() { nvmedev=$(_find_nvme_dev "${def_subsysnqn}") _check_uuid "${nvmedev}" - _xfs_run_fio_verify_io "/dev/${nvmedev}n1" + if ! _xfs_run_fio_verify_io "/dev/${nvmedev}n1"; then + echo "FAIL: fio verify failed" + fi _nvme_disconnect_subsys "${def_subsysnqn}" diff --git a/tests/nvme/035 b/tests/nvme/035 index 712fe1dbcfb8..01aa09077d6a 100755 --- a/tests/nvme/035 +++ b/tests/nvme/035 @@ -31,7 +31,9 @@ test_device() { _nvmet_passthru_target_setup "${def_subsysnqn}" nsdev=$(_nvmet_passthru_target_connect "${nvme_trtype}" "${def_subsysnqn}") - _xfs_run_fio_verify_io "${nsdev}" "${nvme_img_size}" + if ! _xfs_run_fio_verify_io "${nsdev}" "${nvme_img_size}"; then + echo "FAIL: fio verify failed" + fi _nvme_disconnect_subsys "${def_subsysnqn}" _nvmet_passthru_target_cleanup "${def_subsysnqn}" From patchwork Mon Mar 18 09:38:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Wagner X-Patchwork-Id: 13595122 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 0946F2C1B8 for ; Mon, 18 Mar 2024 09:39:07 +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=1710754749; cv=none; b=EXmugIcguAW2Y3DSHZu5jMzdFXvdkV8M/rAy/N7ESCgH+tfaIqV98V8LLn0M4pgJjakAk4LJAib1/FnIMaStGDjVtCLoIOBs4bU6BPuQHEzLEC6BRocQ9IA0NxY1XL9KNIIUO03j8lcjmWGx/lM6n4Qv6of7fc0Jfa7/wV00S1I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710754749; c=relaxed/simple; bh=wsq2bZz9+TSvTX/f+sMqNxBK1MvYYjYTAPKkIk7cvyA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=oYTUVreUp9PO8tRfKvAlXQVAW5stD7ZsE4f47LSacoQzfJKGIcCKGxYYq0Ff4RKl0Ot1ycd++ilV988c6ykylZV176wZWbCVIwlwHTg1NX93KNgBuMjrxWlmMRxzLHy5tEqecrRbQu4dgkgyG2+fkBmDCYLiVO4zalc3DQGAJJs= 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 3CE0E5C33A; Mon, 18 Mar 2024 09:39:06 +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 291AF1349D; Mon, 18 Mar 2024 09:39:06 +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 RswHCroL+GWqUAAAD6G6ig (envelope-from ); Mon, 18 Mar 2024 09:39:06 +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: [RFC blktests v1 03/10] nvme/rc: use long command line option for nvme Date: Mon, 18 Mar 2024 10:38:48 +0100 Message-ID: <20240318093856.22307-4-dwagner@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240318093856.22307-1-dwagner@suse.de> References: <20240318093856.22307-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: 3CE0E5C33A 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 961364055733..c8f13819ca21 100644 --- a/tests/nvme/rc +++ b/tests/nvme/rc @@ -160,7 +160,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 @@ -408,13 +408,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.*" } @@ -508,11 +508,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}") @@ -578,13 +578,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 Mon Mar 18 09:38:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Wagner X-Patchwork-Id: 13595124 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 C137A2C19E for ; Mon, 18 Mar 2024 09:39:08 +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=1710754750; cv=none; b=uIcEbg28ygUnGklofH4yM/l1I6GGWZfWOZvebirH1v1Q3XT/U9407JrmaXNHeFIyYMsrlarRAnJUw3CbPplNGLwOXwC58TcdajfoS3svQ+bZTEKUSzpNKuPSe2hlNU/v8yU6wnE1rGfaKMzsNsoPkXJsvL6Xb5lRj+63ddk5Gl0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710754750; c=relaxed/simple; bh=7Gt9uKk7uaBBfNUbinxtojwSmc2+ScptKQctcn5wuX0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=h1csinuQVw1H3gilyfV72wJu4WzYfuYWRE1ZPGdtwoR8+lMvH8BfHHvgAqamK5XA8UNIMr1FfgryUj62zVFiDXseMhPtVy35hx1+FV3kdhAU1YztOGfkqTJpQH9riH4sV+2YwwC9itsDvB/TPH/JJGqQbOE3+s2tctY9fZb12EY= 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=JsP2HI7y; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=x7C4lZ/0; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=RW6fmR6v; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=E3REViix; 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="JsP2HI7y"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="x7C4lZ/0"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="RW6fmR6v"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="E3REViix" 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 EF9DC3487E; Mon, 18 Mar 2024 09:39:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710754747; 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=kQPsGRpz4CLonHUcOOyovUXi8TxY05mEmXJFZu2uhG8=; b=JsP2HI7yuCBMyUJmFm4s9yZYdcbd6mYHMz8WDyHqlCl2NECJHcW95X1XEp+u+N3hjLMWJa JrR+NdYn2UHzsYv1uePdFmT1gOdndSfBL6DgjY7fHcpjc31H6ZEaq41zqebdVSmRywP2tu iHwvApEVRIFvwdLrg1vvhIwT7cnVixA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710754747; 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=kQPsGRpz4CLonHUcOOyovUXi8TxY05mEmXJFZu2uhG8=; b=x7C4lZ/0zUnfUgjEAnnHbp7YU5DRFN/tjvJFuDRbXd+nTL72Hnwt0ln1AFbWHEiO1gJTVu PFmUVL1r2IKQXpAw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710754746; 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=kQPsGRpz4CLonHUcOOyovUXi8TxY05mEmXJFZu2uhG8=; b=RW6fmR6vFctaVoeJXw80zI+a4IJb4I2Ljgua8ZG+NRnE8GpmXl9Sb81XiQgxzJKGVWiRBQ en+PMtz7eMpb7ac+mdhz+hhQsbk3QaH0VkvqvxHk+U40Ly1dphLhYKq7iLtqfb8PHQrQT3 UAsS8B7RE337+bOHPCpRJw8ZQ7e6G1g= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710754746; 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=kQPsGRpz4CLonHUcOOyovUXi8TxY05mEmXJFZu2uhG8=; b=E3REViix27YJyzzG/quVh115yw21jdSolvRR8mXdlWhXistkjuWYVBEAbzj9RPK5Rl7g1W m+2H81maHP80+NCw== 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 DD5621349D; Mon, 18 Mar 2024 09:39:06 +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 iNOLNLoL+GWvUAAAD6G6ig (envelope-from ); Mon, 18 Mar 2024 09:39:06 +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: [RFC blktests v1 04/10] nvme/{014,015,018,019,020,023,024,026,045,046}: use long command line option for nvme Date: Mon, 18 Mar 2024 10:38:49 +0100 Message-ID: <20240318093856.22307-5-dwagner@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240318093856.22307-1-dwagner@suse.de> References: <20240318093856.22307-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.29 X-Spamd-Result: default: False [-3.29 / 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)[-0.998]; 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.980]; MID_CONTAINS_FROM(1.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-3.00)[100.00%] X-Spam-Flag: NO 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 | 6 +++--- tests/nvme/046 | 7 ++++--- 10 files changed, 21 insertions(+), 14 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 30c45df8ed18..ceec59979928 100755 --- a/tests/nvme/045 +++ b/tests/nvme/045 @@ -90,7 +90,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}" @@ -100,7 +100,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}" @@ -132,7 +132,7 @@ test() { echo "Renew host key on the controller and force reconnect" - 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}" 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 Mon Mar 18 09:38:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Wagner X-Patchwork-Id: 13595125 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 5489E2C694 for ; Mon, 18 Mar 2024 09:39:09 +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=1710754750; cv=none; b=L85pXNR5Cr66FkqL9BY1+nNawwqLdbSUy3F1hkyZlthefuEQ7UX/5CqSacqS6lCwvrJJhiXkoCxYKXzF/8iD+3rwnsUDeVo3CcnVurdVLkgnF+92xObt+bMm01nhldgf80qt3OydmHbwsDEWi0ZnfnA2ol3K7/4Vh0FIIRmbJaI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710754750; c=relaxed/simple; bh=AdQhlXtycaex1GnAKMFbJe/VA7Epry+rTX60hL5kemA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ZlJzDkibVi5SJYRK9J0RjwI6YjZZrJGkhnDIgbXoaIk7q3v2I3cJBl5ZxNNyL/5Ly1dXIwhchAloYZExaavQnIiRrifcpBtI55qGDWLEb74Urc/fU1i1I4cbSC87h4p6cARScP7ToJ2YpV+/IDvb+XiUUqR5mXwzc6Tf/FbuDoM= 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=xiYgOH4m; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=0j2RX4bF; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=xiYgOH4m; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=0j2RX4bF; 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="xiYgOH4m"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="0j2RX4bF"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="xiYgOH4m"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="0j2RX4bF" 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 8DB223487F; Mon, 18 Mar 2024 09:39:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710754747; 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=cHI4Fbsyv4s/TL+dwOLd6KnCcwke45wlOjVFHWgJ2F8=; b=xiYgOH4mGYA9F9KrHQOvkcwgYSlJQNYlb2dT85ljR74d77MJkGlYr1zsOIs9AnKO4h4fhl us4KbCVk7cfpvGT4LiwtuQ0V+nGduhlas+KxOioSBeg4awQO7gisNBKsw1U+BYn1TKoviJ EyGPSy4jmHwwiub1dANswdfAhGBZ26s= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710754747; 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=cHI4Fbsyv4s/TL+dwOLd6KnCcwke45wlOjVFHWgJ2F8=; b=0j2RX4bFMuB4nJnnfLzyDeAdp11bWBUkoXpstEoHxqvRL2E7ofBshKQQQtZDTAxAZkGxvC VPFweqmB4y0CjUAw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710754747; 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=cHI4Fbsyv4s/TL+dwOLd6KnCcwke45wlOjVFHWgJ2F8=; b=xiYgOH4mGYA9F9KrHQOvkcwgYSlJQNYlb2dT85ljR74d77MJkGlYr1zsOIs9AnKO4h4fhl us4KbCVk7cfpvGT4LiwtuQ0V+nGduhlas+KxOioSBeg4awQO7gisNBKsw1U+BYn1TKoviJ EyGPSy4jmHwwiub1dANswdfAhGBZ26s= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710754747; 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=cHI4Fbsyv4s/TL+dwOLd6KnCcwke45wlOjVFHWgJ2F8=; b=0j2RX4bFMuB4nJnnfLzyDeAdp11bWBUkoXpstEoHxqvRL2E7ofBshKQQQtZDTAxAZkGxvC VPFweqmB4y0CjUAw== 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 7D6211349D; Mon, 18 Mar 2024 09:39:07 +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 p5wtHbsL+GW4UAAAD6G6ig (envelope-from ); Mon, 18 Mar 2024 09:39:07 +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: [RFC blktests v1 05/10] nvme/rc: connect subsys only support long options Date: Mon, 18 Mar 2024 10:38:50 +0100 Message-ID: <20240318093856.22307-6-dwagner@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240318093856.22307-1-dwagner@suse.de> References: <20240318093856.22307-1-dwagner@suse.de> Precedence: bulk X-Mailing-List: linux-block@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Authentication-Results: smtp-out1.suse.de; none X-Spam-Level: X-Spam-Score: -0.29 X-Spamd-Result: default: False [-0.29 / 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)[-0.998]; 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.977]; MID_CONTAINS_FROM(1.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-0.00)[12.89%] 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 c8f13819ca21..c23f6fe09b6a 100644 --- a/tests/nvme/rc +++ b/tests/nvme/rc @@ -440,55 +440,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 Mon Mar 18 09:38:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Wagner X-Patchwork-Id: 13595126 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 ACF902C6A8 for ; Mon, 18 Mar 2024 09:39:09 +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=1710754751; cv=none; b=kdipoqXpGf3V/wxilJ7Lbh58/lzhaVkll1CVZ70QhcfuOUJVvjJFIuff8Jy3TVgZMA5ZnN3fBfPeGASQNFlG7ek8QPZ9LVXJE0bR7RzoFPMXjieAcqbWFVJeEd2RhZWWBLZu6kqOMeDqWk28oLYCcfYdycHDCLq5MR7HhgjdOZk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710754751; c=relaxed/simple; bh=kHPfNXEhuMPCDiYIuRhkw+jYzPfJZ6HRWqE5dOZXYnY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=OkXKZLaQ8EicIjBq0MHaORcZKwfQ2gJLkAD3zvIlTTAoGRVCxZPvNTWU4ph2lrDeAYSM625ZIs7RXCDoA+I6Rsr4RHr82zW6wCPW/45E7k9NgbR+6vYUhqcHezK5fMdzSSk4f/iymEYldAArWtdpn0+LV41QLG5GWI3YXNVX0G4= 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=DfoZ1Zog; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=n2WDy+rI; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=DfoZ1Zog; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=n2WDy+rI; 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="DfoZ1Zog"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="n2WDy+rI"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="DfoZ1Zog"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="n2WDy+rI" 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 2EEA55C33B; Mon, 18 Mar 2024 09:39:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710754748; 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=H4PSsr4X2cIGMy5fwcBg3lof96My0QkkEzHK6F7hK6w=; b=DfoZ1ZogbBk/d2ycutjx7n+5axl1h0k2u2pHtUDAd4fn6j0T+Jsy1KzoogsYLNtvsWBl0G FnK4VuxbwbmkhdsXnKLESWkmqOEgMxFWL6g2CddnKIHov0Ru6wfaxmA2XFAHHpoJv+IAKM eJTE8/521riXhEmSc4oXSm22qzcsh9w= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710754748; 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=H4PSsr4X2cIGMy5fwcBg3lof96My0QkkEzHK6F7hK6w=; b=n2WDy+rIPic1RQJmjNx3B7FPb1ovPOLuDZaUoWDfSI0GFkGIAzrVpISG/RKGWDef3FlThf A6JCZRDp/GvxbeCQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710754748; 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=H4PSsr4X2cIGMy5fwcBg3lof96My0QkkEzHK6F7hK6w=; b=DfoZ1ZogbBk/d2ycutjx7n+5axl1h0k2u2pHtUDAd4fn6j0T+Jsy1KzoogsYLNtvsWBl0G FnK4VuxbwbmkhdsXnKLESWkmqOEgMxFWL6g2CddnKIHov0Ru6wfaxmA2XFAHHpoJv+IAKM eJTE8/521riXhEmSc4oXSm22qzcsh9w= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710754748; 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=H4PSsr4X2cIGMy5fwcBg3lof96My0QkkEzHK6F7hK6w=; b=n2WDy+rIPic1RQJmjNx3B7FPb1ovPOLuDZaUoWDfSI0GFkGIAzrVpISG/RKGWDef3FlThf A6JCZRDp/GvxbeCQ== 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 1CBF91349D; Mon, 18 Mar 2024 09:39:08 +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 vHqSBbwL+GW6UAAAD6G6ig (envelope-from ); Mon, 18 Mar 2024 09:39:08 +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: [RFC blktests v1 06/10] nvme/rc: remove unused connect options Date: Mon, 18 Mar 2024 10:38:51 +0100 Message-ID: <20240318093856.22307-7-dwagner@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240318093856.22307-1-dwagner@suse.de> References: <20240318093856.22307-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.29 X-Spamd-Result: default: False [-0.29 / 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)[-0.998]; 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.979]; MID_CONTAINS_FROM(1.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[] X-Spam-Flag: NO These options are not used, thus remove them. Signed-off-by: Daniel Wagner --- tests/nvme/rc | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/tests/nvme/rc b/tests/nvme/rc index c23f6fe09b6a..af48593e2cb7 100644 --- a/tests/nvme/rc +++ b/tests/nvme/rc @@ -422,9 +422,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="" @@ -440,18 +437,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 @@ -510,9 +495,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 Mon Mar 18 09:38:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Wagner X-Patchwork-Id: 13595128 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 E5AA42C6BD for ; Mon, 18 Mar 2024 09:39:10 +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=1710754752; cv=none; b=aIy+wyyaKOAmC8NUc6qlAoYpP/uPyMM0JzwvY79jOPLm7WaCsToWnD4PAUpixOohLKK8b0YIL0LgmCintDUS/0fCqcgtE9fw9QYfc4sVPWknferfs8CkYEU+Axr8KyPOensezVfIjmUHzhwl6cqkr1O3hPORGp5GKbijjT5aaVU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710754752; c=relaxed/simple; bh=OKzMb5ozxqRR6CUtmkUsBmnnROUUQv42L0MiInZGNaM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=uKgeMg2x8hkPuwbJyZKGXXDKQLBBz+JhrawmzNRmXYfREUW2iLtORV5oxSuVrylS5kvsoa1uVKWgrDSsNc3m9H0ep5dYsHsNpAz530TXq4tnUvQ7fE6isCPy05A3YWd/8Hl7kbfZU3/fXtkMgh3k8wnGnfBuwiJIZ6oyzLTbNXc= 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=gVPRvdEr; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=mTvV69dE; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=gVPRvdEr; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=mTvV69dE; 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="gVPRvdEr"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="mTvV69dE"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="gVPRvdEr"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="mTvV69dE" 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 611CA5C33F; Mon, 18 Mar 2024 09:39:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710754749; 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=oNdgZ0KOXj5YcXW3/Y+UBg6zuD6sXcymWHlu4OqOa/U=; b=gVPRvdErrFPa76fM1f+4opOHgU2BI42ArX0rUaZdzan8DH2GDIKUAy7+HRKK8dQQU0jWCI 9KuAP/ukhFUni2ooiT/nUXWoUu0k5/3qwWCC3KbF8sctgSSUjWThkYI3zZ78KozD0AhNMu 0G1f5wbK38SgrMu0/mgKQnoaeStl/UY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710754749; 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=oNdgZ0KOXj5YcXW3/Y+UBg6zuD6sXcymWHlu4OqOa/U=; b=mTvV69dE9kCu/3Hff5hIkOLRY9aQd0Q30le7aB081wCmP+mmHYw09dXOVkGwqOgifjDtA5 H7CUqHOWSCHUOSAQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710754749; 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=oNdgZ0KOXj5YcXW3/Y+UBg6zuD6sXcymWHlu4OqOa/U=; b=gVPRvdErrFPa76fM1f+4opOHgU2BI42ArX0rUaZdzan8DH2GDIKUAy7+HRKK8dQQU0jWCI 9KuAP/ukhFUni2ooiT/nUXWoUu0k5/3qwWCC3KbF8sctgSSUjWThkYI3zZ78KozD0AhNMu 0G1f5wbK38SgrMu0/mgKQnoaeStl/UY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710754749; 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=oNdgZ0KOXj5YcXW3/Y+UBg6zuD6sXcymWHlu4OqOa/U=; b=mTvV69dE9kCu/3Hff5hIkOLRY9aQd0Q30le7aB081wCmP+mmHYw09dXOVkGwqOgifjDtA5 H7CUqHOWSCHUOSAQ== 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 4F8141349D; Mon, 18 Mar 2024 09:39:09 +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 Pc4xEr0L+GXAUAAAD6G6ig (envelope-from ); Mon, 18 Mar 2024 09:39:09 +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: [RFC blktests v1 07/10] nvme/rc: add nqn/uuid args to target setup/cleanup helper Date: Mon, 18 Mar 2024 10:38:53 +0100 Message-ID: <20240318093856.22307-9-dwagner@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240318093856.22307-1-dwagner@suse.de> References: <20240318093856.22307-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: 6.88 X-Spamd-Result: default: False [6.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]; NEURAL_SPAM_SHORT(2.49)[0.830]; REPLY(-4.00)[]; BROKEN_CONTENT_TYPE(1.50)[]; RCPT_COUNT_FIVE(0.00)[6]; R_RATELIMIT(0.00)[to_ip_from(RLm9s6cmri9k4spo5w97m8fq33)]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_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(-0.01)[47.48%] X-Spam-Level: ****** Authentication-Results: smtp-out2.suse.de; none X-Spam-Flag: NO Make these helper a bit more flexible, so that the caller can setup not just the default subsysnqn. Signed-off-by: Daniel Wagner --- tests/nvme/rc | 36 ++++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/tests/nvme/rc b/tests/nvme/rc index af48593e2cb7..2e9a0860c0e7 100644 --- a/tests/nvme/rc +++ b/tests/nvme/rc @@ -823,6 +823,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 @@ -839,6 +841,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 @@ -853,11 +863,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}" } @@ -865,14 +875,28 @@ _nvmet_target_cleanup() { local ports local port local blkdev + local subsysnqn="${def_subsysnqn}" + + while [[ $# -gt 0 ]]; do + case $1 in + --subsysnqn) + subsysnqn="$2" + shift 2 + ;; + *) + echo "WARNING: unknown argument: $1" + shift + ;; + esac + done _get_nvmet_ports "${def_subsysnqn}" ports for port in "${ports[@]}"; do - _remove_nvmet_subsystem_from_port "${port}" "${def_subsysnqn}" + _remove_nvmet_subsystem_from_port "${port}" "${subsysnqn}" _remove_nvmet_port "${port}" done - _remove_nvmet_subsystem "${def_subsysnqn}" + _remove_nvmet_subsystem "${subsysnqn}" _remove_nvmet_host "${def_hostnqn}" _cleanup_blkdev From patchwork Mon Mar 18 09:38:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Wagner X-Patchwork-Id: 13595129 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 B86F72CCB3 for ; Mon, 18 Mar 2024 09:39:11 +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=1710754753; cv=none; b=V8j8UCsdI67+PifUpsQMbVun1W9TWK/pkd3k0llc76L9FnETHl8rNkdk3VXxrv6wPxON+vCVAYxmnk88ZVh5PW3Lceb2nbpq9vudHKqVLlkjuvW1xx5Ab2G+IyH4q31EJfqlzKTN8jP+A27pKVYemHojEhjBtNICXG46o0RwbtY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710754753; c=relaxed/simple; bh=ePQEE4FlagJFJPTNc1c+7l36gxxdHk2H1DGNV7IhTcA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=IU0m6ot1ntedkFMG5wzcIBON4VqvTZrBcQ+puwKYoMVmY0XvKICqUuuZEV8h0rg8Vc6xA0U/yoxPlwemJO2okLr3/K6bVfPPnNCGvGey+dUV1EsoQ34zEqayFZhsDUVtVM6WHutUu3Ci1sij+zUKo+qudfB4ecKGNrKmlEvPxBo= 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=NlJr2Qf3; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=iGBZS/B5; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=NlJr2Qf3; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=iGBZS/B5; 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="NlJr2Qf3"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="iGBZS/B5"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="NlJr2Qf3"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="iGBZS/B5" 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 033F634880; Mon, 18 Mar 2024 09:39:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710754750; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vyzDDp3p3lrp1DsUfN/vs/oKyxmll6oQP8NBXF15qX8=; b=NlJr2Qf3YeogvOMi8IwuzUlxL2PU9NpdK6h7jBMaDbN0/kqxADEdi0AMH34C7bJJIBLsKh rcfgM+8G6FruR0pjbPK1L4UKJu/jUBHb8i6eF5d8aLKYWMBRwLin9wztmZ9JWWdKGCRAhq x4hr9wc5k7bf2DIOe/CJTbta/jJkZRs= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710754750; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vyzDDp3p3lrp1DsUfN/vs/oKyxmll6oQP8NBXF15qX8=; b=iGBZS/B5BPrEVXUMCQAl9gpZm/zSorlXZh1gt259ZP428ocuDK2HjJl6ITH9O2XTsPPLMQ TySliGGt+Uza9QCw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710754750; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vyzDDp3p3lrp1DsUfN/vs/oKyxmll6oQP8NBXF15qX8=; b=NlJr2Qf3YeogvOMi8IwuzUlxL2PU9NpdK6h7jBMaDbN0/kqxADEdi0AMH34C7bJJIBLsKh rcfgM+8G6FruR0pjbPK1L4UKJu/jUBHb8i6eF5d8aLKYWMBRwLin9wztmZ9JWWdKGCRAhq x4hr9wc5k7bf2DIOe/CJTbta/jJkZRs= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710754750; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vyzDDp3p3lrp1DsUfN/vs/oKyxmll6oQP8NBXF15qX8=; b=iGBZS/B5BPrEVXUMCQAl9gpZm/zSorlXZh1gt259ZP428ocuDK2HjJl6ITH9O2XTsPPLMQ TySliGGt+Uza9QCw== 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 E57651349D; Mon, 18 Mar 2024 09:39:09 +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 a052Nr0L+GXCUAAAD6G6ig (envelope-from ); Mon, 18 Mar 2024 09:39:09 +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: [RFC blktests v1 08/10] nvme/031: do not open code target setup/cleanup Date: Mon, 18 Mar 2024 10:38:54 +0100 Message-ID: <20240318093856.22307-10-dwagner@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240318093856.22307-1-dwagner@suse.de> References: <20240318093856.22307-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: -1.38 X-Spamd-Result: default: False [-1.38 / 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)[-0.998]; R_RATELIMIT(0.00)[to_ip_from(RLm9s6cmri9k4spo5w97m8fq33)]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-0.979]; MID_CONTAINS_FROM(1.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-1.09)[88.09%] X-Spam-Flag: NO No need to open code the target setup and cleanup step. Just use the common helper to setup and cleanup the target. Signed-off-by: Daniel Wagner --- tests/nvme/031 | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tests/nvme/031 b/tests/nvme/031 index ed5f19668674..892a52170ce9 100755 --- a/tests/nvme/031 +++ b/tests/nvme/031 @@ -40,14 +40,12 @@ test() { port="$(_create_nvmet_port "${nvme_trtype}")" for ((i = 0; i < iterations; i++)); do - _create_nvmet_subsystem "${subsys}$i" "${loop_dev}" - _add_nvmet_subsys_to_port "${port}" "${subsys}$i" - _create_nvmet_host "${subsys}$i" "${def_hostnqn}" + _nvmet_target_setup --subsysnqn "${subsys}$i" --blkdev "${loop_dev}" + _nvme_connect_subsys "${nvme_trtype}" "${subsys}$i" _nvme_disconnect_subsys "${subsys}$i" >> "${FULL}" 2>&1 - _remove_nvmet_subsystem_from_port "${port}" "${subsys}$i" - _remove_nvmet_subsystem "${subsys}$i" - _remove_nvmet_host "${def_hostnqn}" + + _nvmet_target_cleanup --subsysnqn "${subsys}$i" done _remove_nvmet_port "${port}" From patchwork Mon Mar 18 09:38:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Wagner X-Patchwork-Id: 13595130 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 30D522D022 for ; Mon, 18 Mar 2024 09:39:12 +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=1710754753; cv=none; b=bNPvZAYe2PE5AyGHiBY2jNXbqFt3YHRRrAxAhjYeOwsbRMcXn8hz4bzxcEuX7AkR1wt7n7x1mPeVghgl1rovywVejdCcCiPZILJhbtVGzuSTEAPWstYciwUyZFI5lTAAx5F3AldBFtOBrZrxs194GmzWb/5RLOf6VYwHej2o0gA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710754753; c=relaxed/simple; bh=iGvq6ePUEwqPZ//tjHLfEsgTV1a0793RRAPwiIaaUQ4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Ql8LkqGMYS4hdqi6AUC+1blH1DNk85Bsbz5zqYv8GpUoEapfQwrLRsBh8kPAhPOKmvnk+wY80i65+G1YxfQD05VdpOWLWymFd3FOtugKaOfoJf0/bj9oysEKxFLvpZpsugwSh4bDRNWIZUABxj/HKnV8pfi+E0rsARclN7jStj4= 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=JmG6qZR0; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=L58CayZC; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=JmG6qZR0; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=L58CayZC; 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="JmG6qZR0"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="L58CayZC"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="JmG6qZR0"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="L58CayZC" 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 95A2534881; Mon, 18 Mar 2024 09:39:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710754750; 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=AkjVtUMWwJ1rBkwMVdD32WaQ4UJ0NgnLZeel8d3RvV4=; b=JmG6qZR0l+sGNd8cbAPLHM3vf8BSQUfutnC2VvzBkXON2AlEthTWfNYkcZvFldkbapXI+A JHyTkFiS+PbbQzDC44MD+Krcn4OUrwOPfDW7j4eha0sXcozWHSroA2YsVG8DhiDg3rfDrz gQyL0MF/2HPq7bR9AZSIeJCQSIrJE7k= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710754750; 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=AkjVtUMWwJ1rBkwMVdD32WaQ4UJ0NgnLZeel8d3RvV4=; b=L58CayZCFX2tjXA1ujFOHvJl5eYYaLCCo09pH+xh081ojyhoQQKEBBWXP9kc377eYU46Z3 xecBJBCk7LvaYRAw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710754750; 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=AkjVtUMWwJ1rBkwMVdD32WaQ4UJ0NgnLZeel8d3RvV4=; b=JmG6qZR0l+sGNd8cbAPLHM3vf8BSQUfutnC2VvzBkXON2AlEthTWfNYkcZvFldkbapXI+A JHyTkFiS+PbbQzDC44MD+Krcn4OUrwOPfDW7j4eha0sXcozWHSroA2YsVG8DhiDg3rfDrz gQyL0MF/2HPq7bR9AZSIeJCQSIrJE7k= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710754750; 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=AkjVtUMWwJ1rBkwMVdD32WaQ4UJ0NgnLZeel8d3RvV4=; b=L58CayZCFX2tjXA1ujFOHvJl5eYYaLCCo09pH+xh081ojyhoQQKEBBWXP9kc377eYU46Z3 xecBJBCk7LvaYRAw== 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 835DF1349D; Mon, 18 Mar 2024 09:39:10 +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 BFigHr4L+GXHUAAAD6G6ig (envelope-from ); Mon, 18 Mar 2024 09:39:10 +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: [RFC blktests v1 09/10] nvme/rc: introduce remote target support Date: Mon, 18 Mar 2024 10:38:55 +0100 Message-ID: <20240318093856.22307-11-dwagner@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240318093856.22307-1-dwagner@suse.de> References: <20240318093856.22307-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.29 X-Spamd-Result: default: False [-3.29 / 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)[-0.998]; R_RATELIMIT(0.00)[to_ip_from(RLm9s6cmri9k4spo5w97m8fq33)]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-0.979]; MID_CONTAINS_FROM(1.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-3.00)[100.00%] X-Spam-Flag: NO Most of the NVMEeoF tests are exercising the host code of the nvme subsystem. There is no real reason not to run these against a real target. We just have to skip the soft target setup and make it possible to setup a remote target. Because all tests use now the common setup/cleanup helpers we just need to intercept this call and forward it to an external component. As we already have various nvme variables to setup the target, extend this part with 'nvme_target_control' which is expected to be script which setups the remote target accordingly. Signed-off-by: Daniel Wagner --- tests/nvme/rc | 49 ++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 44 insertions(+), 5 deletions(-) diff --git a/tests/nvme/rc b/tests/nvme/rc index 2e9a0860c0e7..35eb4cc5e954 100644 --- a/tests/nvme/rc +++ b/tests/nvme/rc @@ -7,9 +7,10 @@ . common/rc . common/multipath-over-rdma -def_traddr="127.0.0.1" +def_traddr="${nvme_traddr:-127.0.0.1}" +def_host_traddr="${nvme_host_traddr:-}" def_adrfam="ipv4" -def_trsvcid="4420" +def_trsvcid="${nvme_trsvcid:-4420}" def_remote_wwnn="0x10001100aa000001" def_remote_wwpn="0x20001100aa000001" def_local_wwnn="0x10001100aa000002" @@ -19,6 +20,7 @@ def_hostnqn="nqn.2014-08.org.nvmexpress:uuid:${def_hostid}" export def_subsysnqn="blktests-subsystem-1" export def_subsys_uuid="91fdba0d-f87b-4c25-b80f-db7be1418b9e" nvme_trtype=${nvme_trtype:-"loop"} +nvme_target_control="${nvme_target_control:-}" nvme_img_size=${nvme_img_size:-"1G"} nvme_num_iter=${nvme_num_iter:-"1000"} @@ -325,6 +327,10 @@ _cleanup_nvmet() { fi done + if [[ -n "${nvme_target_control}" ]]; then + return + fi + for port in "${NVMET_CFS}"/ports/*; do name=$(basename "${port}") echo "WARNING: Test did not clean up port: ${name}" @@ -369,11 +375,19 @@ _cleanup_nvmet() { _setup_nvmet() { _register_test_cleanup _cleanup_nvmet + + if [[ -n "${nvme_target_control}" ]]; then + return + fi + modprobe -q nvmet + if [[ "${nvme_trtype}" != "loop" ]]; then modprobe -q nvmet-"${nvme_trtype}" fi + modprobe -q nvme-"${nvme_trtype}" + if [[ "${nvme_trtype}" == "rdma" ]]; then start_soft_rdma for i in $(rdma_network_interfaces) @@ -391,6 +405,7 @@ _setup_nvmet() { fi done fi + if [[ "${nvme_trtype}" = "fc" ]]; then modprobe -q nvme-fcloop _setup_fcloop "${def_local_wwnn}" "${def_local_wwpn}" \ @@ -819,12 +834,13 @@ _find_nvme_passthru_loop_dev() { } _nvmet_target_setup() { + local subsys_uuid="${def_subsys_uuid}" + local subsysnqn="${def_subsysnqn}" local blkdev_type="device" - local blkdev + local ARGS=() local ctrlkey="" local hostkey="" - local subsysnqn="${def_subsysnqn}" - local subsys_uuid="${def_subsys_uuid}" + local blkdev local port while [[ $# -gt 0 ]]; do @@ -856,6 +872,22 @@ _nvmet_target_setup() { esac done + if [[ -n "${hostkey}" ]]; then + ARGS+=(--hostkey "${hostkey}") + fi + if [[ -n "${ctrlkey}" ]]; then + ARGS+=(--ctrkey "${ctrlkey}") + fi + + if [[ -n "${nvme_target_control}" ]]; then + eval "${nvme_target_control}" setup \ + --subsysnqn "${subsysnqn}" \ + --subsys-uuid "${subsys_uuid}" \ + --hostnqn "${def_hostnqn}" \ + "${ARGS[@]}" > /dev/null 2>&1 + return + fi + truncate -s "${nvme_img_size}" "$(_nvme_def_file_path)" if [[ "${blkdev_type}" == "device" ]]; then blkdev="$(losetup -f --show "$(_nvme_def_file_path)")" @@ -890,6 +922,13 @@ _nvmet_target_cleanup() { esac done + if [[ -n "${nvme_target_control}" ]]; then + eval "${nvme_target_control}" cleanup \ + --subsysnqn "${subsysnqn}" \ + > /dev/null + return + fi + _get_nvmet_ports "${def_subsysnqn}" ports for port in "${ports[@]}"; do From patchwork Mon Mar 18 09:38:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Wagner X-Patchwork-Id: 13595131 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 AEFF12D043 for ; Mon, 18 Mar 2024 09:39:12 +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=1710754754; cv=none; b=VzNsr7f0ZDwWLUfEshTynJon1Cxu9FgnS7Q7p+RdJuxmYDEketn4sjsSN1BA+8Im+Xta3o+H5zj1v5ZSuzv6Ru9YFYErzKTEgQJVKlkt6caEot8ku8IexGByq/fKU9YfqEFl4OgOQ++abYXjob+21D8jydYWBHgPqvH210RCx/A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710754754; c=relaxed/simple; bh=Quic52JaxahkASnvqi0v7mHdMYzimRmyk2u1RB9VgK8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=HGRZBR5cB5xEcleTZhHEVxHj0DbZrahhtHicBt5aH80Y2Mzybe38nKIZQMDB/n7pqxUzGjH3MbfFdOHjNJABzzWgarSSC2S24Lb/LckzUju2kEnltI3rSBz2qiCeNbfV6xcBQuR9P12QAJNWDJTEb2so71kpCiVO64JJI5O4+CA= 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=uK/9Q4iw; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=F4f3UHsk; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=uK/9Q4iw; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=F4f3UHsk; 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="uK/9Q4iw"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="F4f3UHsk"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="uK/9Q4iw"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="F4f3UHsk" 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 3A8325C33A; Mon, 18 Mar 2024 09:39:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710754751; 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=ihE/ZmLSZBt2P9PqVkuN+IyPeedmfxE4zSjNnO6UW7A=; b=uK/9Q4iwyelsxoetRQBPSDL/NJsL6yyLbnSXoQN+zksJLJc6lUUv1Q6QkWHm17USMze42F zaX76iG60a4KcYcx+MagV09fHbGCBsuHZomGAXgcg7wdaRkjTOcge4ixjFs+eqbNl8jf0B wzU04ZYgG4DLHnHHd2E3Ho2v0GUxBUU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710754751; 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=ihE/ZmLSZBt2P9PqVkuN+IyPeedmfxE4zSjNnO6UW7A=; b=F4f3UHsk+QVoNVSdbhDgAe7Qm4QCoJg3YfLOQBj2Dgfl30rH8URh7fDJv+vOjlfhaqPnA9 xB8jCt2RjAba4OBw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710754751; 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=ihE/ZmLSZBt2P9PqVkuN+IyPeedmfxE4zSjNnO6UW7A=; b=uK/9Q4iwyelsxoetRQBPSDL/NJsL6yyLbnSXoQN+zksJLJc6lUUv1Q6QkWHm17USMze42F zaX76iG60a4KcYcx+MagV09fHbGCBsuHZomGAXgcg7wdaRkjTOcge4ixjFs+eqbNl8jf0B wzU04ZYgG4DLHnHHd2E3Ho2v0GUxBUU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710754751; 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=ihE/ZmLSZBt2P9PqVkuN+IyPeedmfxE4zSjNnO6UW7A=; b=F4f3UHsk+QVoNVSdbhDgAe7Qm4QCoJg3YfLOQBj2Dgfl30rH8URh7fDJv+vOjlfhaqPnA9 xB8jCt2RjAba4OBw== 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 25B27139A1; Mon, 18 Mar 2024 09:39:11 +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 bP8zCL8L+GXMUAAAD6G6ig (envelope-from ); Mon, 18 Mar 2024 09:39:11 +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: [RFC blktests v1 10/10] nvme/030: only run against kernel soft target Date: Mon, 18 Mar 2024 10:38:56 +0100 Message-ID: <20240318093856.22307-12-dwagner@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240318093856.22307-1-dwagner@suse.de> References: <20240318093856.22307-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.29 X-Spamd-Result: default: False [-0.29 / 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)[-0.998]; R_RATELIMIT(0.00)[to_ip_from(RLm9s6cmri9k4spo5w97m8fq33)]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-0.979]; MID_CONTAINS_FROM(1.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-0.00)[36.68%] X-Spam-Flag: NO This tests is exercising the target code and not so much the host side. Thus just skip it when we run against a remote target. Signed-off-by: Daniel Wagner merge --- tests/nvme/030 | 1 + tests/nvme/rc | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/tests/nvme/030 b/tests/nvme/030 index 9251e1744f61..6d51e0ada07c 100755 --- a/tests/nvme/030 +++ b/tests/nvme/030 @@ -13,6 +13,7 @@ requires() { _nvme_requires _have_loop _require_nvme_trtype_is_fabrics + _require_kernel_target } test() { diff --git a/tests/nvme/rc b/tests/nvme/rc index 35eb4cc5e954..41ec30af7787 100644 --- a/tests/nvme/rc +++ b/tests/nvme/rc @@ -185,6 +185,14 @@ _require_kernel_nvme_fabrics_feature() { return 0 } +_require_kernel_target() { + if [[ -n "${nvme_target_control}" ]]; then + SKIP_REASONS+=("Linux kernel soft target not available") + return 1; + fi + return 0 +} + _test_dev_nvme_ctrl() { echo "/dev/char/$(cat "${TEST_DEV_SYSFS}/device/dev")" }