From patchwork Wed Dec 11 01:29:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Williams X-Patchwork-Id: 11283667 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4677D138C for ; Wed, 11 Dec 2019 01:44:10 +0000 (UTC) Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 23E2320838 for ; Wed, 11 Dec 2019 01:44:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 23E2320838 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-nvdimm-bounces@lists.01.org Received: from ml01.vlan13.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 1DEEE10113616; Tue, 10 Dec 2019 17:47:32 -0800 (PST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=134.134.136.100; helo=mga07.intel.com; envelope-from=dan.j.williams@intel.com; receiver= Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 475E710113507 for ; Tue, 10 Dec 2019 17:47:29 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Dec 2019 17:44:07 -0800 X-IronPort-AV: E=Sophos;i="5.69,301,1571727600"; d="scan'208";a="207504762" Received: from dwillia2-desk3.jf.intel.com (HELO dwillia2-desk3.amr.corp.intel.com) ([10.54.39.16]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Dec 2019 17:44:07 -0800 Subject: [ndctl PATCH 1/4] ndctl/build: Do not use `check-news` when `NEWS` file is absent entirely. From: Dan Williams To: linux-nvdimm@lists.01.org Date: Tue, 10 Dec 2019 17:29:51 -0800 Message-ID: <157602779173.1290519.2114609018855604805.stgit@dwillia2-desk3.amr.corp.intel.com> User-Agent: StGit/0.18-3-g996c MIME-Version: 1.0 Message-ID-Hash: PIL6SVUJSCPEQA3RAZ2643MSPR32O2IV X-Message-ID-Hash: PIL6SVUJSCPEQA3RAZ2643MSPR32O2IV X-MailFrom: dan.j.williams@intel.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header CC: Auke Kok X-Mailman-Version: 3.1.1 Precedence: list List-Id: "Linux-nvdimm developer list." Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: From: Auke Kok Kill 'check-news' in AM_INIT_AUTOMAKE. Signed-off-by: Auke Kok Signed-off-by: Dan Williams --- configure.ac | 1 - 1 file changed, 1 deletion(-) diff --git a/configure.ac b/configure.ac index 4737cfff77f2..5ec8d2f87598 100644 --- a/configure.ac +++ b/configure.ac @@ -8,7 +8,6 @@ AC_INIT([ndctl], AC_CONFIG_SRCDIR([ndctl/lib/libndctl.c]) AC_CONFIG_AUX_DIR([build-aux]) AM_INIT_AUTOMAKE([ - check-news foreign 1.11 -Wall From patchwork Wed Dec 11 01:29:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Williams X-Patchwork-Id: 11283669 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1997514B7 for ; Wed, 11 Dec 2019 01:44:15 +0000 (UTC) Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0223D20838 for ; Wed, 11 Dec 2019 01:44:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0223D20838 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-nvdimm-bounces@lists.01.org Received: from ml01.vlan13.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 2F6431011361D; Tue, 10 Dec 2019 17:47:37 -0800 (PST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=192.55.52.151; helo=mga17.intel.com; envelope-from=dan.j.williams@intel.com; receiver= Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 54E7A10113618 for ; Tue, 10 Dec 2019 17:47:35 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Dec 2019 17:44:12 -0800 X-IronPort-AV: E=Sophos;i="5.69,301,1571727600"; d="scan'208";a="203391316" Received: from dwillia2-desk3.jf.intel.com (HELO dwillia2-desk3.amr.corp.intel.com) ([10.54.39.16]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Dec 2019 17:44:12 -0800 Subject: [ndctl PATCH 2/4] ndctl/build: Ensure header and other misc files are listed. From: Dan Williams To: linux-nvdimm@lists.01.org Date: Tue, 10 Dec 2019 17:29:56 -0800 Message-ID: <157602779685.1290519.18200044670741501676.stgit@dwillia2-desk3.amr.corp.intel.com> In-Reply-To: <157602779173.1290519.2114609018855604805.stgit@dwillia2-desk3.amr.corp.intel.com> References: <157602779173.1290519.2114609018855604805.stgit@dwillia2-desk3.amr.corp.intel.com> User-Agent: StGit/0.18-3-g996c MIME-Version: 1.0 Message-ID-Hash: Y3CA4CUVK6CDFKOXWVYTHJYMTA2KW47F X-Message-ID-Hash: Y3CA4CUVK6CDFKOXWVYTHJYMTA2KW47F X-MailFrom: dan.j.williams@intel.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header CC: Auke Kok X-Mailman-Version: 3.1.1 Precedence: list List-Id: "Linux-nvdimm developer list." Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: From: Auke Kok Otherwise `make distcheck` is guaranteed to fail as BoM lists will be incomplete to compile the sources properly. Signed-off-by: Auke Kok Signed-off-by: Dan Williams --- Documentation/daxctl/Makefile.am | 2 ++ Documentation/ndctl/Makefile.am | 2 ++ Makefile.am | 12 +++++++++++- daxctl/Makefile.am | 3 ++- daxctl/lib/Makefile.am | 2 +- ndctl/Makefile.am | 12 +++++++++++- ndctl/lib/Makefile.am | 9 ++++++++- test/Makefile.am | 2 ++ 8 files changed, 39 insertions(+), 5 deletions(-) diff --git a/Documentation/daxctl/Makefile.am b/Documentation/daxctl/Makefile.am index 37c3bdee265d..7696e23cc9c0 100644 --- a/Documentation/daxctl/Makefile.am +++ b/Documentation/daxctl/Makefile.am @@ -33,6 +33,8 @@ man1_MANS = \ daxctl-online-memory.1 \ daxctl-offline-memory.1 +EXTRA_DIST = $(man1_MANS) + CLEANFILES = $(man1_MANS) XML_DEPS = \ diff --git a/Documentation/ndctl/Makefile.am b/Documentation/ndctl/Makefile.am index fb46d7c87938..659cb32f0878 100644 --- a/Documentation/ndctl/Makefile.am +++ b/Documentation/ndctl/Makefile.am @@ -57,6 +57,8 @@ man1_MANS = \ ndctl-load-keys.1 \ ndctl-wait-overwrite.1 +EXTRA_DIST = $(man1_MANS) + CLEANFILES = $(man1_MANS) .ONESHELL: diff --git a/Makefile.am b/Makefile.am index 8d10a10ad1ee..95950d4f708e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -13,6 +13,10 @@ version.m4: FORCE FORCE: +EXTRA_DIST += ndctl.spec.in \ + sles/header \ + contrib/nvdimm-security.conf + noinst_SCRIPTS = rhel/ndctl.spec sles/ndctl.spec CLEANFILES += $(noinst_SCRIPTS) @@ -75,6 +79,12 @@ libutil_a_SOURCES = \ util/filter.c \ util/bitmap.c \ util/abspath.c \ - util/iomem.c + util/iomem.c \ + util/util.h \ + util/strbuf.h \ + util/size.h \ + util/main.h \ + util/filter.h \ + util/bitmap.h nobase_include_HEADERS = daxctl/libdaxctl.h diff --git a/daxctl/Makefile.am b/daxctl/Makefile.am index 66dcc7fc3438..ca1b86748bfb 100644 --- a/daxctl/Makefile.am +++ b/daxctl/Makefile.am @@ -16,7 +16,8 @@ daxctl_SOURCES =\ list.c \ migrate.c \ device.c \ - ../util/json.c + ../util/json.c \ + builtin.h daxctl_LDADD =\ lib/libdaxctl.la \ diff --git a/daxctl/lib/Makefile.am b/daxctl/lib/Makefile.am index 7704b1be76f0..25efd8333572 100644 --- a/daxctl/lib/Makefile.am +++ b/daxctl/lib/Makefile.am @@ -23,7 +23,7 @@ libdaxctl_la_LIBADD =\ daxctl_modprobe_data_DATA = daxctl.conf -EXTRA_DIST += libdaxctl.sym +EXTRA_DIST += libdaxctl.sym daxctl.conf libdaxctl_la_LDFLAGS = $(AM_LDFLAGS) \ -version-info $(LIBDAXCTL_CURRENT):$(LIBDAXCTL_REVISION):$(LIBDAXCTL_AGE) \ diff --git a/ndctl/Makefile.am b/ndctl/Makefile.am index 502271ebb65e..264c4ed2d9e8 100644 --- a/ndctl/Makefile.am +++ b/ndctl/Makefile.am @@ -11,6 +11,7 @@ config.h: $(srcdir)/Makefile.am $(AM_V_GEN) echo '#define NDCTL_KEYS_DIR "$(ndctl_keysdir)"' >>$@ ndctl_SOURCES = ndctl.c \ + builtin.h \ bus.c \ create-nfit.c \ namespace.c \ @@ -20,11 +21,18 @@ ndctl_SOURCES = ndctl.c \ ../util/log.c \ list.c \ ../util/json.c \ + ../util/json.h \ util/json-smart.c \ util/json-firmware.c \ + util/keys.h \ inject-error.c \ inject-smart.c \ - monitor.c + monitor.c \ + namespace.h \ + action.h \ + ../nfit.h \ + ../test.h \ + firmware-update.h if ENABLE_KEYUTILS ndctl_SOURCES += util/keys.c \ @@ -33,6 +41,8 @@ keys_configdir = $(ndctl_keysdir) keys_config_DATA = $(ndctl_keysreadme) endif +EXTRA_DIST += keys.readme monitor.conf ndctl-monitor.service + if ENABLE_DESTRUCTIVE ndctl_SOURCES += ../test/blk_namespaces.c \ ../test/pmem_namespaces.c diff --git a/ndctl/lib/Makefile.am b/ndctl/lib/Makefile.am index e4eb0060bca4..d6be5c3acd26 100644 --- a/ndctl/lib/Makefile.am +++ b/ndctl/lib/Makefile.am @@ -9,10 +9,12 @@ lib_LTLIBRARIES = libndctl.la libndctl_la_SOURCES =\ ../libndctl.h \ private.h \ + ../../util/list.h \ ../../util/log.c \ ../../util/log.h \ ../../util/sysfs.c \ ../../util/sysfs.h \ + ../../util/fletcher.h \ dimm.c \ inject.c \ nfit.c \ @@ -23,7 +25,12 @@ libndctl_la_SOURCES =\ hyperv.c \ ars.c \ firmware.c \ - libndctl.c + libndctl.c \ + intel.h \ + hpe1.h \ + msft.h \ + hyperv.h \ + ../../ndctl/libndctl-nfit.h libndctl_la_LIBADD =\ ../../daxctl/lib/libdaxctl.la \ diff --git a/test/Makefile.am b/test/Makefile.am index 829146d5da74..c2c1158dc8ba 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -27,6 +27,8 @@ TESTS =\ max_available_extent_ns.sh \ pfn-meta-errors.sh +EXTRA_DIST = $(TESTS) + check_PROGRAMS =\ libndctl \ dsm-fail \ From patchwork Wed Dec 11 01:30:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Williams X-Patchwork-Id: 11283671 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 303B8138C for ; Wed, 11 Dec 2019 01:44:21 +0000 (UTC) Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 180A520836 for ; Wed, 11 Dec 2019 01:44:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 180A520836 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-nvdimm-bounces@lists.01.org Received: from ml01.vlan13.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 43A2810113626; Tue, 10 Dec 2019 17:47:43 -0800 (PST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=134.134.136.24; helo=mga09.intel.com; envelope-from=dan.j.williams@intel.com; receiver= Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 250371011361E for ; Tue, 10 Dec 2019 17:47:40 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Dec 2019 17:44:17 -0800 X-IronPort-AV: E=Sophos;i="5.69,301,1571727600"; d="scan'208";a="215624266" Received: from dwillia2-desk3.jf.intel.com (HELO dwillia2-desk3.amr.corp.intel.com) ([10.54.39.16]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Dec 2019 17:44:17 -0800 Subject: [ndctl PATCH 3/4] ndctl/build: Add `header` as a prereq to Make rule where it is consumed. From: Dan Williams To: linux-nvdimm@lists.01.org Date: Tue, 10 Dec 2019 17:30:02 -0800 Message-ID: <157602780196.1290519.15782744704303465909.stgit@dwillia2-desk3.amr.corp.intel.com> In-Reply-To: <157602779173.1290519.2114609018855604805.stgit@dwillia2-desk3.amr.corp.intel.com> References: <157602779173.1290519.2114609018855604805.stgit@dwillia2-desk3.amr.corp.intel.com> User-Agent: StGit/0.18-3-g996c MIME-Version: 1.0 Message-ID-Hash: PGDAOOFO6Y5KHO2YFZT6DMD57PDTCFUM X-Message-ID-Hash: PGDAOOFO6Y5KHO2YFZT6DMD57PDTCFUM X-MailFrom: dan.j.williams@intel.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header CC: Auke Kok X-Mailman-Version: 3.1.1 Precedence: list List-Id: "Linux-nvdimm developer list." Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: From: Auke Kok Ensure that changes to 'header' trigger a rebuild. Signed-off-by: Auke Kok Signed-off-by: Dan Williams --- Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 95950d4f708e..60a1998723c2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -38,7 +38,7 @@ do_sles_subst = sed -e 's,VERSION,$(VERSION),g' \ rhel/ndctl.spec: ndctl.spec.in Makefile.am version.m4 $(AM_V_GEN)$(MKDIR_P) rhel; $(do_rhel_subst) < $< > $@ -sles/ndctl.spec: ndctl.spec.in Makefile.am version.m4 +sles/ndctl.spec: sles/header ndctl.spec.in Makefile.am version.m4 $(AM_V_GEN)$(MKDIR_P) sles; cat sles/header $< | $(do_sles_subst) > $@ if ENABLE_BASH_COMPLETION From patchwork Wed Dec 11 01:30:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Williams X-Patchwork-Id: 11283673 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3EC07138C for ; Wed, 11 Dec 2019 01:44:25 +0000 (UTC) Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2740920836 for ; Wed, 11 Dec 2019 01:44:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2740920836 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-nvdimm-bounces@lists.01.org Received: from ml01.vlan13.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 59DC010113620; Tue, 10 Dec 2019 17:47:47 -0800 (PST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=134.134.136.24; helo=mga09.intel.com; envelope-from=dan.j.williams@intel.com; receiver= Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 10B2310113602 for ; Tue, 10 Dec 2019 17:47:45 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Dec 2019 17:44:22 -0800 X-IronPort-AV: E=Sophos;i="5.69,301,1571727600"; d="scan'208";a="387771440" Received: from dwillia2-desk3.jf.intel.com (HELO dwillia2-desk3.amr.corp.intel.com) ([10.54.39.16]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Dec 2019 17:44:22 -0800 Subject: [ndctl PATCH 4/4] ndctl/build: Fix distcheck From: Dan Williams To: linux-nvdimm@lists.01.org Date: Tue, 10 Dec 2019 17:30:07 -0800 Message-ID: <157602780708.1290519.17503235413584670368.stgit@dwillia2-desk3.amr.corp.intel.com> In-Reply-To: <157602779173.1290519.2114609018855604805.stgit@dwillia2-desk3.amr.corp.intel.com> References: <157602779173.1290519.2114609018855604805.stgit@dwillia2-desk3.amr.corp.intel.com> User-Agent: StGit/0.18-3-g996c MIME-Version: 1.0 Message-ID-Hash: RGBSSRRJ2M5I3NLEYKSGEVIYXJZTC7MO X-Message-ID-Hash: RGBSSRRJ2M5I3NLEYKSGEVIYXJZTC7MO X-MailFrom: dan.j.williams@intel.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header CC: Auke Kok X-Mailman-Version: 3.1.1 Precedence: list List-Id: "Linux-nvdimm developer list." Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: - Add missing dependencies to EXTRA_DIST - Fix up relative path names - Fix up test cleanup to not leave straggling file behind Reported-by: Auke Kok Signed-off-by: Dan Williams --- test/Makefile.am | 4 +++- test/blk-exhaust.sh | 2 +- test/btt-check.sh | 2 +- test/btt-errors.sh | 7 ++++--- test/btt-pad-compat.sh | 5 +++-- test/clear.sh | 2 +- test/create.sh | 2 +- test/dax.sh | 2 +- test/daxctl-devices.sh | 2 +- test/daxdev-errors.sh | 2 +- test/device-dax-fio.sh | 2 +- test/firmware-update.sh | 2 +- test/inject-error.sh | 2 +- test/inject-smart.sh | 2 +- test/label-compat.sh | 5 +++-- test/max_available_extent_ns.sh | 2 +- test/mmap.sh | 2 +- test/monitor.sh | 2 +- test/multi-dax.sh | 2 +- test/pfn-meta-errors.sh | 2 +- test/pmem-errors.sh | 11 ++--------- test/rescan-partitions.sh | 2 +- test/sector-mode.sh | 2 +- test/security.sh | 2 +- 24 files changed, 34 insertions(+), 36 deletions(-) diff --git a/test/Makefile.am b/test/Makefile.am index c2c1158dc8ba..99b04b3052dc 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -27,7 +27,9 @@ TESTS =\ max_available_extent_ns.sh \ pfn-meta-errors.sh -EXTRA_DIST = $(TESTS) +EXTRA_DIST = $(TESTS) common \ + btt-pad-compat.xxd \ + nmem1.bin nmem2.bin nmem3.bin nmem4.bin check_PROGRAMS =\ libndctl \ diff --git a/test/blk-exhaust.sh b/test/blk-exhaust.sh index 326ce73ade6c..db7dc25aecbd 100755 --- a/test/blk-exhaust.sh +++ b/test/blk-exhaust.sh @@ -15,7 +15,7 @@ set -e rc=77 -. ./common +. $(dirname $0)/common check_min_kver "4.11" || do_skip "may lack blk-exhaustion fix" diff --git a/test/btt-check.sh b/test/btt-check.sh index ceabee52b868..bd782f477728 100755 --- a/test/btt-check.sh +++ b/test/btt-check.sh @@ -19,7 +19,7 @@ blockdev="" bs=4096 rc=77 -. ./common +. $(dirname $0)/common trap 'err $LINENO' ERR diff --git a/test/btt-errors.sh b/test/btt-errors.sh index cb35865b4d17..c79a0a00b527 100755 --- a/test/btt-errors.sh +++ b/test/btt-errors.sh @@ -16,14 +16,14 @@ FILE=image blockdev="" rc=77 -. ./common +. $(dirname $0)/common cleanup() { rm -f $FILE rm -f $MNT/$FILE - if [ -n "$blockdev" ]; then - umount "/dev/$blockdev" + if grep -q "$MNT" /proc/mounts; then + umount $MNT else rc=77 fi @@ -160,5 +160,6 @@ dd if=/dev/$blockdev of=/dev/null iflag=direct bs=4096 count=1 && err $LINENO || $NDCTL disable-region -b $NFIT_TEST_BUS0 all $NDCTL zero-labels -b $NFIT_TEST_BUS0 all $NDCTL enable-region -b $NFIT_TEST_BUS0 all +cleanup _cleanup exit 0 diff --git a/test/btt-pad-compat.sh b/test/btt-pad-compat.sh index 2c1f2718c701..b1a46edeaf9d 100755 --- a/test/btt-pad-compat.sh +++ b/test/btt-pad-compat.sh @@ -16,7 +16,8 @@ size="" blockdev="" rc=77 -. ./common +BASE=$(dirname $0) +. $BASE/common trap 'err $LINENO' ERR @@ -107,7 +108,7 @@ force_raw() copy_xxd_img() { local bdev="$1" - local xxd_patch="btt-pad-compat.xxd" + local xxd_patch="$BASE/btt-pad-compat.xxd" test -s "$xxd_patch" test -b "$bdev" diff --git a/test/clear.sh b/test/clear.sh index 17d5bedd9072..a8581cde63f3 100755 --- a/test/clear.sh +++ b/test/clear.sh @@ -15,7 +15,7 @@ set -e rc=77 -. ./common +. $(dirname $0)/common check_min_kver "4.6" || do_skip "lacks clear poison support" diff --git a/test/create.sh b/test/create.sh index 8d787976a06f..520f3a9c1dc1 100755 --- a/test/create.sh +++ b/test/create.sh @@ -16,7 +16,7 @@ set -e SECTOR_SIZE="4096" rc=77 -. ./common +. $(dirname $0)/common check_min_kver "4.5" || do_skip "may lack namespace mode attribute" diff --git a/test/dax.sh b/test/dax.sh index 3933107920a9..5383c433283f 100755 --- a/test/dax.sh +++ b/test/dax.sh @@ -11,7 +11,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. -. ./common +. $(dirname $0)/common MNT=test_dax_mnt FILE=image diff --git a/test/daxctl-devices.sh b/test/daxctl-devices.sh index 00f4715d74dd..ff2bcd212294 100755 --- a/test/daxctl-devices.sh +++ b/test/daxctl-devices.sh @@ -3,7 +3,7 @@ # Copyright(c) 2019 Intel Corporation. All rights reserved. rc=77 -. ./common +. $(dirname $0)/common trap 'cleanup $LINENO' ERR diff --git a/test/daxdev-errors.sh b/test/daxdev-errors.sh index c5adb7260527..15d3e67d1166 100755 --- a/test/daxdev-errors.sh +++ b/test/daxdev-errors.sh @@ -15,7 +15,7 @@ set -e rc=77 -. ./common +. $(dirname $0)/common check_min_kver "4.12" || do_skip "lacks dax dev error handling" diff --git a/test/device-dax-fio.sh b/test/device-dax-fio.sh index b6d5e0eb1170..d4ca7ab238e4 100755 --- a/test/device-dax-fio.sh +++ b/test/device-dax-fio.sh @@ -11,7 +11,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. -. ./common +. $(dirname $0)/common rc=77 diff --git a/test/firmware-update.sh b/test/firmware-update.sh index 7852e58e915e..ed7d7e53772c 100755 --- a/test/firmware-update.sh +++ b/test/firmware-update.sh @@ -6,7 +6,7 @@ rc=77 dev="" image="update-fw.img" -. ./common +. $(dirname $0)/common trap 'err $LINENO' ERR diff --git a/test/inject-error.sh b/test/inject-error.sh index 49e68b3bfad1..e326d67b1add 100755 --- a/test/inject-error.sh +++ b/test/inject-error.sh @@ -18,7 +18,7 @@ rc=77 err_block=42 err_count=8 -. ./common +. $(dirname $0)/common trap 'err $LINENO' ERR diff --git a/test/inject-smart.sh b/test/inject-smart.sh index 18655bab2291..5e563df546b8 100755 --- a/test/inject-smart.sh +++ b/test/inject-smart.sh @@ -3,7 +3,7 @@ # Copyright(c) 2018 Intel Corporation. All rights reserved. rc=77 -. ./common +. $(dirname $0)/common bus="$NFIT_TEST_BUS0" inj_val="42" diff --git a/test/label-compat.sh b/test/label-compat.sh index dc6226d5e94e..a29dd1367233 100755 --- a/test/label-compat.sh +++ b/test/label-compat.sh @@ -15,7 +15,8 @@ set -e rc=77 -. ./common +BASE=$(dirname $0) +. $BASE/common check_min_kver "4.11" || do_skip "may not provide reliable isetcookie values" @@ -36,7 +37,7 @@ dimms=$($NDCTL list -DRi -r $region | jq -r "$query" | xargs) i=1 for d in $dimms do - $NDCTL write-labels $d -i nmem${i}.bin + $NDCTL write-labels $d -i $BASE/nmem${i}.bin i=$((i+1)) done diff --git a/test/max_available_extent_ns.sh b/test/max_available_extent_ns.sh index 1c7e7bfa1b83..c6acdabf7fd7 100755 --- a/test/max_available_extent_ns.sh +++ b/test/max_available_extent_ns.sh @@ -5,7 +5,7 @@ rc=77 -. ./common +. $(dirname $0)/common trap 'err $LINENO' ERR diff --git a/test/mmap.sh b/test/mmap.sh index d072ea289f31..0bcc35f619f5 100755 --- a/test/mmap.sh +++ b/test/mmap.sh @@ -11,7 +11,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. -. ./common +. $(dirname $0)/common MNT=test_mmap_mnt FILE=image diff --git a/test/monitor.sh b/test/monitor.sh index 29d4ea13d0b7..261fbfa3d461 100755 --- a/test/monitor.sh +++ b/test/monitor.sh @@ -12,7 +12,7 @@ monitor_regions="" monitor_namespace="" smart_supported_bus="" -. ./common +. $(dirname $0)/common trap 'err $LINENO' ERR diff --git a/test/multi-dax.sh b/test/multi-dax.sh index 0829bf2462c4..110ba3d80339 100755 --- a/test/multi-dax.sh +++ b/test/multi-dax.sh @@ -15,7 +15,7 @@ set -e rc=77 -. ./common +. $(dirname $0)/common check_min_kver "4.13" || do_skip "may lack multi-dax support" diff --git a/test/pfn-meta-errors.sh b/test/pfn-meta-errors.sh index 2b57f19829c1..a24f904f0dff 100755 --- a/test/pfn-meta-errors.sh +++ b/test/pfn-meta-errors.sh @@ -6,7 +6,7 @@ blockdev="" rc=77 -. ./common +. $(dirname $0)/common force_raw() { diff --git a/test/pmem-errors.sh b/test/pmem-errors.sh index 9553a3f12ff6..19d6dc30f11b 100755 --- a/test/pmem-errors.sh +++ b/test/pmem-errors.sh @@ -6,7 +6,7 @@ MNT=test_dax_mnt FILE=image rc=77 -. ./common +. $(dirname $0)/common cleanup() { @@ -113,14 +113,7 @@ echo $((start_sect + 1)) 1 > /sys/block/$blockdev/badblocks : The following 'dd' is expected to hit an I/O Error dd if=$MNT/$FILE of=/dev/null iflag=direct bs=4096 count=1 && err $LINENO || true -# cleanup -rm -f $FILE -rm -f $MNT/$FILE -if [ -n "$blockdev" ]; then - umount /dev/$blockdev -fi -rmdir $MNT - +cleanup _cleanup exit 0 diff --git a/test/rescan-partitions.sh b/test/rescan-partitions.sh index 9c7b7a0151df..b3f2b167053f 100755 --- a/test/rescan-partitions.sh +++ b/test/rescan-partitions.sh @@ -7,7 +7,7 @@ size="" blockdev="" rc=77 -. ./common +. $(dirname $0)/common trap 'err $LINENO' ERR diff --git a/test/sector-mode.sh b/test/sector-mode.sh index 4b964c5eebc7..eef8dc6d6a3e 100755 --- a/test/sector-mode.sh +++ b/test/sector-mode.sh @@ -13,7 +13,7 @@ rc=77 -. ./common +. $(dirname $0)/common set -e trap 'err $LINENO' ERR diff --git a/test/security.sh b/test/security.sh index 183e3fea22dd..771135b7ab18 100755 --- a/test/security.sh +++ b/test/security.sh @@ -11,7 +11,7 @@ masterpath="$keypath/$masterkey.blob" backup_key=0 backup_handle=0 -. ./common +. $(dirname $0)/common trap 'err $LINENO' ERR