Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp498878rwr; Wed, 3 May 2023 01:39:57 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4y3boQD9yOTFV7zwn5TIiHSVCP+NGIAjWnOtOEVpHx7B8/wpc7Hh9px0otg4F/CiHoINZE X-Received: by 2002:a17:90a:ee89:b0:24e:1ca3:7279 with SMTP id i9-20020a17090aee8900b0024e1ca37279mr6258421pjz.38.1683103197421; Wed, 03 May 2023 01:39:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683103197; cv=none; d=google.com; s=arc-20160816; b=Chjm9ePxNbHeFPSDqW6P73RaBz50F4yb7UTDguKXr1m0LeMZhX82mmu90N9ZSnZrHQ w/Fvs6LtzWykfS7dYhF9iQaOBuYeNsBUCdwJTDsU6bKr8D8T5FnrMGGIKU4ZiSg3BvmT mLyXD0nS8BOP/XGxyyG5z1Z+PWfw7gPghCREHvZvJ8ZHlcbMa5zLFveqjcJleuN5vZZ3 V9HuoC3WC60UbPQxdbO1WsTArG/21KsDEILJoo5j9qzh4awgCMPVlm0kEbz40OwmSDeF t2iZ/s8JC9WTvj9G6ci+Bal/wDA0LYgV9et3KXCMhCzv1N/BDql+emfcoll056Rooiz6 fudQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=3QiWi7xEJCHdkqRRP7ZvqBGwdGpiUG8vH8kiotRokzk=; b=VFE4e3swTd7LmNN42IY0tdvDnXfif123rze/g80j0+xOz6e3OInyDgAiXVjsgdFlch H6asgGUH324oHQe3gWcaQOxRecovgPR6zdwUFU4QVOXQrFIFRqFOcyVwryB7OLfleXZF cNdIsfYo5K2kDJQ5B776+yBbzx3QhJnKW34zuA7RvY+z9P0+nDCE/X/BxScghXpRsPQH PUtLy9r/6VbAQY6E9td2e4QHon0H1/sMNb2XUK61jn0ZXllMmF3E+9OC/6xF07eTRUWV ekDHIZBvnx/cJggY9EtZg1QZHJ4hkezplFDsgT4kpwnGGx2/BJUDhBszk90RPbJxUytM tzzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=2Ab2FKdQ; dkim=neutral (no key) header.i=@suse.de header.b=2SEKacae; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 138-20020a630590000000b0051391dd5dbcsi32608299pgf.566.2023.05.03.01.39.43; Wed, 03 May 2023 01:39:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=2Ab2FKdQ; dkim=neutral (no key) header.i=@suse.de header.b=2SEKacae; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230059AbjECIje (ORCPT + 99 others); Wed, 3 May 2023 04:39:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229982AbjECIjH (ORCPT ); Wed, 3 May 2023 04:39:07 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4CEB359DA; Wed, 3 May 2023 01:38:41 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id AD94720103; Wed, 3 May 2023 08:38:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1683103099; 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=3QiWi7xEJCHdkqRRP7ZvqBGwdGpiUG8vH8kiotRokzk=; b=2Ab2FKdQ8fKvGmqEB0I/U2g45KK08soyZP8tOF5wMfe8PNz6K78uSs0i5apBW+etQ1Inxa ArwPC2DMu4vA8e6CSdctlFz3XfVblS/ze6a6TsINdMLPUAtm1Mb+kSl1pda1VqWPTYp/rs wiyefmKRpZThx3TPbcyzy7OPlAYGXrw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1683103099; 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=3QiWi7xEJCHdkqRRP7ZvqBGwdGpiUG8vH8kiotRokzk=; b=2SEKacaeG0CMWxmOXWQkVhmTf0ZZABRscFhVrhXTVExwYlmfgZTNCfQNrR1qDX38PChdIQ 8KZeRytBUCP4bjDQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 9EAB4139F8; Wed, 3 May 2023 08:38:19 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 4py3JnsdUmS1dQAAMHmgww (envelope-from ); Wed, 03 May 2023 08:38:19 +0000 From: Daniel Wagner To: linux-nvme@lists.infradead.org Cc: linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, Chaitanya Kulkarni , Shin'ichiro Kawasaki , Sagi Grimberg , Hannes Reinecke , Daniel Wagner Subject: [PATCH blktests v3 1/2] nvme/rc: Cleanup fc ports in reverse order Date: Wed, 3 May 2023 10:38:15 +0200 Message-Id: <20230503083816.18792-2-dwagner@suse.de> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230503083816.18792-1-dwagner@suse.de> References: <20230503083816.18792-1-dwagner@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We need to free the resources in the opposite order as we allocate them. Signed-off-by: Daniel Wagner --- tests/nvme/rc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/nvme/rc b/tests/nvme/rc index b44239446dcf..ec0cc2d8d8cc 100644 --- a/tests/nvme/rc +++ b/tests/nvme/rc @@ -204,10 +204,10 @@ _cleanup_fcloop() { local remote_wwnn="${3:-$def_remote_wwnn}" local remote_wwpn="${4:-$def_remote_wwpn}" - _nvme_fcloop_del_rport "${local_wwnn}" "${local_wwpn}" \ - "${remote_wwnn}" "${remote_wwpn}" _nvme_fcloop_del_tport "${remote_wwnn}" "${remote_wwpn}" _nvme_fcloop_del_lport "${local_wwnn}" "${local_wwpn}" + _nvme_fcloop_del_rport "${local_wwnn}" "${local_wwpn}" \ + "${remote_wwnn}" "${remote_wwpn}" } _cleanup_nvmet() { -- 2.40.0