Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp683799pxa; Thu, 27 Aug 2020 12:53:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzOWYKjPiPPqAHeYe///VPFiEKGCEj7nmFB1c1I5A48J9jwJXr21PulvNbFX7xN3i74NlX8 X-Received: by 2002:a17:906:80ce:: with SMTP id a14mr10533554ejx.470.1598558009235; Thu, 27 Aug 2020 12:53:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598558009; cv=none; d=google.com; s=arc-20160816; b=elDVceigl22PZRf5z7MsFl9wnSc5RQ/uIMSHkBNTPQI7fp2pKzscZx7QZvLSIWUYo/ jN5ntM6Nfcv8TLxDyPenk5ep9xvWk8Zhq2MtfXE9x3R0qqLygVvVDABa/VB7QlefB71n 5J5R1JIYutPoWusUl1fiZ9oxDzkPz1UYOWlY5/2saNqve8jyvIsfSREJBvbSp1yljfUs T70hu3Ali4zXaZeNxCzGecmOSwRZAbncp750bnyyVLoe0L91h1Nsym6hcKfPpLBF9GYF dUU0QMnmfyJo3BLRqumIYDt90PplKkf8s22WD53fryySpW60CeD3Sc0qm40BI/hmqJQN 73tw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:cc:to:from :dkim-signature; bh=DAoZkGvyGri4FBXCJJ5289SPw0iwUdUnfJWjhiDDY2s=; b=Mp8rIkY1BC+smwzi3q0dd65OLAei1y6YUaKxJmaghQagOVkvrD34q2EKUVlDG0Hdtj /Ll1ilQ231qqjjYJ5+yb0uJxgWlbPPEchCrXjdRIjVwlERcqGC6aZzXJgELRSKPQcfSy 6MqOGN91hZGlrvrQzKIu+h1YDunVDarVxTAsKQYVwpFXjc7ZIHIh7gzfWOlADp647kZw bBaujfXlHo7pARwrwYxxuFENF+BOTP99DvQKgI2rmSg2gzFDTDTSAknO0D9ck374ASZl 8JGX/uWoEhCOBjrn5Vd+G/hjn0TnjjhZL4oTzzwZ0LAqvu2kELBUstBVvhMJ6vglfhAO aCsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@deltatee.com header.s=20200525 header.b=GTatHXPt; 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 p8si1834109eji.740.2020.08.27.12.53.06; Thu, 27 Aug 2020 12:53:29 -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=GTatHXPt; 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 S1728067AbgH0Ttc (ORCPT + 99 others); Thu, 27 Aug 2020 15:49:32 -0400 Received: from ale.deltatee.com ([204.191.154.188]:54828 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727945AbgH0TtT (ORCPT ); Thu, 27 Aug 2020 15:49:19 -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=DAoZkGvyGri4FBXCJJ5289SPw0iwUdUnfJWjhiDDY2s=; b=GTatHXPthkBUKXWmo7elYdeWBJ 6WNOdAcf7gSxIpytWrdZxGKjd9PQwleelsvuI29S4rK/aR8xDJwPyE6SmkCnqyG3ZPG9P7ragNK6T eQ+vZcMhCcY6dUkGIdktqDm2tRV16HwyLQWyAzAi5sUsq8a7lcf2SfTxqU9VsVAlicuxXBX8vSlVp F+tAvQBPcYjSy3q+LtdQdKniZE8DlxPlVfgrxBVcgDYjd3n/FVOgniytxqPaMogzC3xMdk8+gUH6E SRdTX/DD//bFYM2X0aYxRsEqi//JVGCuYeiY52GPpZ+FBqjloZM4NJUDM2RUIRLUBKQwHcUnkqssW 9YScfu2A==; 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 1kBNtd-0000Ce-Nz; Thu, 27 Aug 2020 13:49:18 -0600 Received: from gunthorp by cgy1-donard.priv.deltatee.com with local (Exim 4.92) (envelope-from ) id 1kBNta-0001cN-U9; Thu, 27 Aug 2020 13:49:15 -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, 27 Aug 2020 13:49:12 -0600 Message-Id: <20200827194912.6135-12-logang@deltatee.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200827194912.6135-1-logang@deltatee.com> References: <20200827194912.6135-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,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Subject: [PATCH blktests 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) Sender: linux-kernel-owner@vger.kernel.org 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 | 38 ++++++++++++++++++++++++++++++++++++++ tests/nvme/038.out | 2 ++ 2 files changed, 40 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..29827f324155 --- /dev/null +++ b/tests/nvme/038 @@ -0,0 +1,38 @@ +#!/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() { + _have_program nvme && + _have_modules nvme-loop nvmet && + _have_configfs +} + +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