Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2311299ybl; Sat, 31 Aug 2019 12:08:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqxDUe/Ykuqh778UpNtQK6KaqffbrGtA7GSpvRx7dM0vo+CWOwAGV2UYy4Ehd4aB/BDx4mRd X-Received: by 2002:a65:614a:: with SMTP id o10mr17977706pgv.407.1567278498036; Sat, 31 Aug 2019 12:08:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567278498; cv=none; d=google.com; s=arc-20160816; b=zaN+6ej6W0HzRjZyj18BVvybelM7RNl3/VaLxlV2sG4Ni87GTJsOIGMjz3AY9YZP0B xE7xbaiI/FB2dIZbvH9BNcn+EAGvDrNl7XnXb5NOzGCdMTQTGpZSBU88NOXc5nZj7MsP y8l0zOqSgziiuNo2U3bhjcVSvh6ProRZEAjOUDwwiaSbXxocJqTywUbZ6I/coN9NUWHp /vtnGa300NH+X/uIZJiycEON7ADsX2QPXVkkFSE0vdkNBccleeKcyCCvZlEqEthjPDKc 0ZwtNNtX2pJWL3k6ec8ITkSdWDCCfUb2FKhRv4iE1FACXcbBxLGnFwzsrKGRFX6f+t+X w4pA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:message-id:date:cc:to:from:subject; bh=nSjHqIhZH6bMkliZNm5rpMbGgMGnIwK5xQkZTqJh8jo=; b=J+p6vS0ithe19s2RRWUxdPXqNzXXLNbQZyW5xbu5fV9U0hapatD1UKsNcRu9eNmxJ1 v0ODJz0UOOXgo0/WSRHzdeD8Ee1qIkIgweG4r+trMTzb7a+VLGezKBXmiNARQysS9UZw hbMb27CUWPPQmK/60gfDNX1vodForMYgCf1WXWtI5GtHh07CMjvQgfJmhr3d8AClEg+4 UJYSC0nyVJhKWkFlypXSnRu4+MBsJfRJrM1v9H9CjmbAT1VAUxUN1o6PpO6tPnZtVntB 94zoAhyRxZUvr3648SqKW/QiJqH1uvkTHrjLfPtBv2pCm/dyuCSiP4OORkvFhUzD4z92 W8dA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k16si7255563pgl.592.2019.08.31.12.08.02; Sat, 31 Aug 2019 12:08:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728546AbfHaTHG (ORCPT + 99 others); Sat, 31 Aug 2019 15:07:06 -0400 Received: from mga03.intel.com ([134.134.136.65]:28245 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728517AbfHaTHG (ORCPT ); Sat, 31 Aug 2019 15:07:06 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 31 Aug 2019 12:07:05 -0700 X-IronPort-AV: E=Sophos;i="5.64,451,1559545200"; d="scan'208";a="206430450" Received: from dwillia2-desk3.jf.intel.com (HELO dwillia2-desk3.amr.corp.intel.com) ([10.54.39.16]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 31 Aug 2019 12:07:05 -0700 Subject: [PATCH v3] libnvdimm: Enable unit test infrastructure compile checks From: Dan Williams To: jgg@ziepe.ca Cc: =?utf-8?b?SsOpcsO0bWU=?= Glisse , Jason Gunthorpe , Christoph Hellwig , linux-nvdimm@lists.01.org, linux-kernel@vger.kernel.org Date: Sat, 31 Aug 2019 11:52:47 -0700 Message-ID: <156727753022.2310789.16427613406082399871.stgit@dwillia2-desk3.amr.corp.intel.com> User-Agent: StGit/0.18-2-gc94f MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The infrastructure to mock core libnvdimm routines for unit testing purposes is prone to bitrot relative to refactoring of that core. Arrange for the unit test core to be built when CONFIG_COMPILE_TEST=y. This does not result in a functional unit test environment, it is only a helper for 0day to catch unit test build regressions. Note that there are a few x86isms in the implementation, so this does not bother compile testing this architectures other than 64-bit x86. Cc: Jérôme Glisse Cc: Jason Gunthorpe Reported-by: Christoph Hellwig Signed-off-by: Dan Williams Link: https://lore.kernel.org/r/156097224232.1086847.9463861924683372741.stgit@dwillia2-desk3.amr.corp.intel.com --- Changes since v2: - Fixed a 0day report when the unit test infrastructure is built-in. Arrange for it to only compile as a module. This has received a build success notifcation from the robot over 142 configs. Hi Jason, As we discussed previously please take this through the hmm tree to give compile coverage for devm_memremap_pages() updates. drivers/nvdimm/Kconfig | 12 ++++++++++++ drivers/nvdimm/Makefile | 4 ++++ 2 files changed, 16 insertions(+) diff --git a/drivers/nvdimm/Kconfig b/drivers/nvdimm/Kconfig index a5fde15e91d3..36af7af6b7cf 100644 --- a/drivers/nvdimm/Kconfig +++ b/drivers/nvdimm/Kconfig @@ -118,4 +118,16 @@ config NVDIMM_KEYS depends on ENCRYPTED_KEYS depends on (LIBNVDIMM=ENCRYPTED_KEYS) || LIBNVDIMM=m +config NVDIMM_TEST_BUILD + tristate "Build the unit test core" + depends on m + depends on COMPILE_TEST && X86_64 + default m if COMPILE_TEST + help + Build the core of the unit test infrastructure. The result of + this build is non-functional for unit test execution, but it + otherwise helps catch build errors induced by changes to the + core devm_memremap_pages() implementation and other + infrastructure. + endif diff --git a/drivers/nvdimm/Makefile b/drivers/nvdimm/Makefile index cefe233e0b52..6557e126892f 100644 --- a/drivers/nvdimm/Makefile +++ b/drivers/nvdimm/Makefile @@ -29,3 +29,7 @@ libnvdimm-$(CONFIG_BTT) += btt_devs.o libnvdimm-$(CONFIG_NVDIMM_PFN) += pfn_devs.o libnvdimm-$(CONFIG_NVDIMM_DAX) += dax_devs.o libnvdimm-$(CONFIG_NVDIMM_KEYS) += security.o + +TOOLS := ../../tools +TEST_SRC := $(TOOLS)/testing/nvdimm/test +obj-$(CONFIG_NVDIMM_TEST_BUILD) := $(TEST_SRC)/iomap.o