From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AB745C47DD9 for ; Fri, 22 Mar 2024 13:51:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=WGxxqfi5Ng/DrXSdCBEaIZL1gVtEAJyeAtVHnguQ9pk=; b=vJzl1HlJL7VlXQbtIM+As8jVRc B3QuypNGqMgEQmWWgs0ShoKNQs+owS1yMZBUqIGZKpsVvz7OWmEY2OKFZloYu8aR4g49+apgca4wt 9DwAJ+07G3StVxy6PX1EPDIEbOKG+YmE1nAdeFgjVr0zOuJcqZiQko8PciK/AI15WY38y2FWLvI2X E19rxpV0L8FQzlUoVVWoQX9RnFGTXqN9j/joPd3uVLm+JxuW2CS/W4DWPxJ/AFJYkj6GdZYx8hMC3 nW89VIvuaS56gluZnYmRs2HoHkvijZ5zg2qqQorfWeVt4DU8TzkIxGcw4qMXU5ZJsCZHl663cabsF kaTBlDxA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rnfIl-00000007QMg-0L4C; Fri, 22 Mar 2024 13:51:19 +0000 Received: from smtp-out1.suse.de ([195.135.223.130]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rnfHw-00000007Prd-1MxP for linux-nvme@lists.infradead.org; Fri, 22 Mar 2024 13:51:06 +0000 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> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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%] Authentication-Results: smtp-out1.suse.de; none X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240322_065028_659625_2A6FD3F3 X-CRM114-Status: UNSURE ( 9.81 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-nvme@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-nvme" Errors-To: linux-nvme-bounces+linux-nvme=archiver.kernel.org@lists.infradead.org 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}" -- 2.44.0