Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4797745pxk; Wed, 30 Sep 2020 11:57:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJySEysq9lLrFdObS5u8WWF3bLp83OUN5bySXXcp/8spwigArNABh02gR2d6qzX51xQiRzoI X-Received: by 2002:aa7:d948:: with SMTP id l8mr1301210eds.159.1601492248996; Wed, 30 Sep 2020 11:57:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601492248; cv=none; d=google.com; s=arc-20160816; b=yfx4JTPMAarKMD/0apZtu3o8l5CAU0ugJ6VN4J6JmJqIiJd93DAwV+XS2jo0AOtYaR Ro+cHJYjfKnF2VjGZ430PNjWLniASF4XqVm0D6ldzilFcKYkJ1HIhWLZXh3xYCNTR7Li UBNw0/6DsgnVjOxwBf/P7JPrzjHB1ClMHFoHpcbsglyKssk1sHnFwa3lHUooyG9TxZp6 rNUoE++Es0GfrTuT3g5NdibZ0J71Dp3X4Kcody+fy3QbuKq8UfsbX8jI/pOciexaSzz9 9KP61I6DnmKExM7m1IGIlb7J+v9ZEJP53dSHraJx1eLLCw0zfnPfyg4927TbhGyY4kGw 3FDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:cc:to:from:dkim-signature; bh=UpWM+yjj8ziy97ndQzgM2ZJFF0WlYfaYMS3RABD6FHI=; b=CB/1b6aQvaVaOXNlIUuNm+UMkk6tBT4IjNsgBSgr4afGK9iA5RKslzoKwEAvcR/ux+ sBIlMwF1TtOT945BDvGpfUx41uxZ/vVM30xCOAJa/6zXAOrum8H+03Exlx+oqGLwF6tG UnUfIchU8QuLfqn8+iTZvmpZ4y6Q839xFw8svRNB5bL1BbmYUj/d3HZ2Dwno6YhofQaT X3CgHBe4mi8k1dlL6ZiIQJLgcwizdy0Fa7tQJoKm1KhkeLuN5LnqUPposq8KiAc25T6s /srcWkWaSH7HzpZw9dxY54FV277/ostTmcl+jA9BjhnkJre3pLS0TVIUowsOsKHrGBFX PJSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@deltatee.com header.s=20200525 header.b=OUtQk0w6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p9si1793229ejw.670.2020.09.30.11.57.06; Wed, 30 Sep 2020 11:57:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@deltatee.com header.s=20200525 header.b=OUtQk0w6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730196AbgI3SzE (ORCPT + 99 others); Wed, 30 Sep 2020 14:55:04 -0400 Received: from ale.deltatee.com ([204.191.154.188]:37542 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729840AbgI3Sye (ORCPT ); Wed, 30 Sep 2020 14:54:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=deltatee.com; s=20200525; h=Subject:Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=UpWM+yjj8ziy97ndQzgM2ZJFF0WlYfaYMS3RABD6FHI=; b=OUtQk0w6VLrF2XMMJhvoxhd58D WxJk162Ct6437Xt2MV9Vcsxa6lNuZtmreRU4E2BvOebfWncRcu2Tr9kAOCLgwFcws5mrc/bOVzDEJ ZsAw9ZDMgaUiJSLihuQSS2cKlW4HTOSryFYk1dDsZ6b5ogP3ubn/BOr/t18qaknYSSfW+a7onDZ6L 35b4nga9qlsWzQArvALcnM3q+31UzrzH4Gx5wjboHLutCWdHzPo4IWCWylqVM/OiHyjHly1rnDAYD QLfjTKal6SD3IhKQjUK4PmFPML6PnF/XRoap2lzae+heRrxp7tY28ZRjGDq9XnK+aWCUXJlLY7pE7 BAfuSLJw==; Received: from cgy1-donard.priv.deltatee.com ([172.16.1.31]) by ale.deltatee.com with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kNhFH-0000uy-Au; Wed, 30 Sep 2020 12:54:31 -0600 Received: from gunthorp by cgy1-donard.priv.deltatee.com with local (Exim 4.92) (envelope-from ) id 1kNhFE-00030p-Hp; Wed, 30 Sep 2020 12:54:28 -0600 From: Logan Gunthorpe To: linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, linux-block@vger.kernel.org, Omar Sandoval Cc: Sagi Grimberg , Chaitanya Kulkarni , Stephen Bates , Logan Gunthorpe Date: Wed, 30 Sep 2020 12:54:22 -0600 Message-Id: <20200930185422.11494-12-logang@deltatee.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200930185422.11494-1-logang@deltatee.com> References: <20200930185422.11494-1-logang@deltatee.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 172.16.1.31 X-SA-Exim-Rcpt-To: linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, osandov@osandov.com, sagi@grimberg.me, Chaitanya.Kulkarni@wdc.com, sbates@raithlin.com, logang@deltatee.com X-SA-Exim-Mail-From: gunthorp@deltatee.com X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on ale.deltatee.com X-Spam-Level: X-Spam-Status: No, score=-6.7 required=5.0 tests=ALL_TRUSTED,BAYES_00, MYRULES_NO_TEXT autolearn=no autolearn_force=no version=3.4.2 Subject: [PATCH blktests v2 11/11] nvme/038: Test removal of un-enabled subsystem and ports X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on ale.deltatee.com) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Test that we can remove a subsystem that has not been enabled by passthru or any ns. Do the same for ports while we are at it. This was an issue in the original passthru patches and is not commonly tested. So this test will ensure we don't regress this. Signed-off-by: Logan Gunthorpe --- tests/nvme/038 | 36 ++++++++++++++++++++++++++++++++++++ tests/nvme/038.out | 2 ++ 2 files changed, 38 insertions(+) create mode 100755 tests/nvme/038 create mode 100644 tests/nvme/038.out diff --git a/tests/nvme/038 b/tests/nvme/038 new file mode 100755 index 000000000000..24f02d4ad4d1 --- /dev/null +++ b/tests/nvme/038 @@ -0,0 +1,36 @@ +#!/bin/bash +# SPDX-License-Identifier: GPL-3.0+ +# Copyright (C) 2019 Logan Gunthorpe +# Copyright (C) 2019 Eideticom Communications Inc. +# +# Test that we can remove a subsystem that has not been enabled by +# passthru or any ns. Do the same for ports while we are at it. +# +# This was an issue in the original passthru patches and is +# not commonly tested. So this test will ensure we don't regress this. +# +. tests/nvme/rc + +DESCRIPTION="test deletion of NVMeOF subsystem without enabling" +QUICK=1 + +requires() { + _nvme_requires +} + +test() { + local subsys_path="${NVMET_CFS}/subsystems/blktests-subsystem-1" + local port + + echo "Running ${TEST_NAME}" + + _setup_nvmet + + mkdir -p "${subsys_path}" + rmdir "${subsys_path}" + + port=$(_create_nvmet_port loop) + _remove_nvmet_port "${port}" + + echo "Test complete" +} diff --git a/tests/nvme/038.out b/tests/nvme/038.out new file mode 100644 index 000000000000..06bc98022c33 --- /dev/null +++ b/tests/nvme/038.out @@ -0,0 +1,2 @@ +Running nvme/038 +Test complete -- 2.20.1