Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp1489348pxu; Thu, 8 Oct 2020 12:46:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzRTBXxVIDcdu5euPWXdOqkGzWnLZ0ewucfu7ITI67050S3HaA8yLN3dj+JpoMo7S+CcSx/ X-Received: by 2002:a17:906:2f85:: with SMTP id w5mr10300280eji.1.1602186412031; Thu, 08 Oct 2020 12:46:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602186412; cv=none; d=google.com; s=arc-20160816; b=pxQmENdZCkVCJbDMVxji4hGvYZRtFn2kdjfvk84gMuJ9BJmVlJgiUtrmYdb7oY/SNt OlB3hQSW9sUyGN9JX8ZUzThrvSwSjE1XxXZkxSCbpiv6KVdRsIxrWdAejTZfTwL3tma/ 58PMgeVaED81BBBKGyvOa2nEgIVMWcLQpv8tnr2XBwGngLPrLyVzs/69K2SLFfTwY6+4 fqZJnVUXan7uOQFUwpNRS2EWiutYdLxyp5kswjoFxz5aPBBLPeWZssloanA3MT1dkBbA 9IFxVMqY+MDddbv80ECScku5AGJ6uHRiL7aSmkHgmGyGLqQVm8AltfIPJ7PlOCrr45CB 7qcw== 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=sc3ML8Hlt9Yrp3WS9YGVpluYzVExElEfa+oAAS0gvk7PPgB7bv3GwAj245LFq45j2l Dq3ySn9/GhlMKPpC6jbqgMDmEkJx/s1t4CbokE6h6uKmgz9jdjwfpNfe7RLngedN8/to k0qg1kNvECW53NByduW/Juj4f2GPHbnW6V8rIZmolr89W8UkGaGWyp4pju5h5fFTktUP 4qnehao86oBs/G5LCl85+6jAJGwDZAsk/DaAaPeWG8bvSQ1KCiNNtvbMl8ReCGEBQGpj 8ZkgOhCe30yd4S/Y258TqoNln/sS7ebNyoOHLLiuUiyn3OX8atXbbM1inuHjJlikN6Ph eH0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@deltatee.com header.s=20200525 header.b=k9K0ZAQ9; 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 a12si2245169ejv.55.2020.10.08.12.46.28; Thu, 08 Oct 2020 12:46:52 -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=k9K0ZAQ9; 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 S1731325AbgJHQlC (ORCPT + 99 others); Thu, 8 Oct 2020 12:41:02 -0400 Received: from ale.deltatee.com ([204.191.154.188]:48832 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726766AbgJHQkg (ORCPT ); Thu, 8 Oct 2020 12:40:36 -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=k9K0ZAQ9vDNCok9vpYAJxhT37P yzreEWuuUDUvoJ42mR7dcucehon2sEsbg1taS1OcKjUEU7xIf0m9zPMwpm2qNZrtpxw1YZr7jT2rE dfCEr+lbV/VCGFokf/qR2k6keWvjYeuzex56fd7vGg6AinuUJK6WYdP7TVdM68GWunj/kwD2TWKgQ bTLuRY/1fAlUM5S8b+vb8YAPLyk6ctCKZFW52bNMBNhPSe1jvrVAB3KYBD0u9wcUT/YwE2VMJVGS/ s/sHbrRSW8hqxZdK9IiAcY9UamCuSRCxPfCtnVOvHOVZMJCRJG6uFucVGE7DR8RNlAg1Clj77IyuP Q5dRoUXw==; 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 1kQYy2-0000ij-Hw; Thu, 08 Oct 2020 10:40:35 -0600 Received: from gunthorp by cgy1-donard.priv.deltatee.com with local (Exim 4.92) (envelope-from ) id 1kQYy0-0003Hm-60; Thu, 08 Oct 2020 10:40:32 -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: Thu, 8 Oct 2020 10:40:24 -0600 Message-Id: <20201008164024.12546-12-logang@deltatee.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201008164024.12546-1-logang@deltatee.com> References: <20201008164024.12546-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 v3 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