From patchwork Fri Sep 18 22:27:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Williams X-Patchwork-Id: 7221151 Return-Path: X-Original-To: patchwork-linux-nvdimm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id CCC699F372 for ; Fri, 18 Sep 2015 22:33:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A6C3920738 for ; Fri, 18 Sep 2015 22:33:08 +0000 (UTC) Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EED7420723 for ; Fri, 18 Sep 2015 22:33:05 +0000 (UTC) Received: from ml01.vlan14.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id CCA7661703; Fri, 18 Sep 2015 15:33:05 -0700 (PDT) X-Original-To: linux-nvdimm@lists.01.org Delivered-To: linux-nvdimm@lists.01.org Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by ml01.01.org (Postfix) with ESMTP id 0669D616F7 for ; Fri, 18 Sep 2015 15:33:04 -0700 (PDT) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP; 18 Sep 2015 15:33:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,554,1437462000"; d="scan'208";a="772180201" Received: from dwillia2-desk3.jf.intel.com ([10.54.39.39]) by orsmga001.jf.intel.com with ESMTP; 18 Sep 2015 15:33:04 -0700 Subject: [PATCH] ndctl: consolidate test headers From: Dan Williams To: linux-nvdimm@lists.01.org Date: Fri, 18 Sep 2015 18:27:22 -0400 Message-ID: <20150918222707.19431.85595.stgit@dwillia2-desk3.jf.intel.com> User-Agent: StGit/0.17.1-9-g687f MIME-Version: 1.0 X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "Linux-nvdimm developer list." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Consolidate test routine declarations in test.h. Signed-off-by: Dan Williams --- builtin-bat.c | 4 +--- builtin-test.c | 5 +---- lib/blk_namespaces.c | 2 +- lib/pmem_namespaces.c | 2 +- lib/test-core.c | 2 +- lib/test-core.h | 10 ---------- lib/test-dpa-alloc.c | 3 +-- lib/test-libndctl.c | 3 +-- lib/test-parent-uuid.c | 3 +-- lib/test-pcommit.c | 2 +- test-blk-namespaces.h | 4 ---- test-dpa-alloc.h | 5 ----- test-libndctl.h | 5 ----- test-parent-uuid.h | 5 ----- test-pcommit.h | 4 ---- test-pmem-namespaces.h | 4 ---- test.h | 22 ++++++++++++++++++++++ 17 files changed, 31 insertions(+), 54 deletions(-) delete mode 100644 lib/test-core.h delete mode 100644 test-blk-namespaces.h delete mode 100644 test-dpa-alloc.h delete mode 100644 test-libndctl.h delete mode 100644 test-parent-uuid.h delete mode 100644 test-pcommit.h delete mode 100644 test-pmem-namespaces.h create mode 100644 test.h diff --git a/builtin-bat.c b/builtin-bat.c index e79a55d21fb1..14ef08b756b1 100644 --- a/builtin-bat.c +++ b/builtin-bat.c @@ -1,8 +1,6 @@ #include #include -#include -#include -#include +#include #include int cmd_bat(int argc, const char **argv) diff --git a/builtin-test.c b/builtin-test.c index edb6e072174e..9c3b7a827128 100644 --- a/builtin-test.c +++ b/builtin-test.c @@ -1,10 +1,7 @@ #include #include #include -#include -#include -#include -#include +#include #include static char *result(int rc) diff --git a/lib/blk_namespaces.c b/lib/blk_namespaces.c index 1bea7bdb07b0..968af2797feb 100644 --- a/lib/blk_namespaces.c +++ b/lib/blk_namespaces.c @@ -25,7 +25,7 @@ #include #include #include -#include +#include /* The purpose of this test is to verify that we can successfully do I/O to * multiple nd_blk namespaces that have discontiguous segments. It first diff --git a/lib/pmem_namespaces.c b/lib/pmem_namespaces.c index 28b582026677..17c301947fa4 100644 --- a/lib/pmem_namespaces.c +++ b/lib/pmem_namespaces.c @@ -25,7 +25,7 @@ #include #include #include -#include +#include #define err(msg)\ fprintf(stderr, "%s:%d: %s (%s)\n", __func__, __LINE__, msg, strerror(errno)) diff --git a/lib/test-core.c b/lib/test-core.c index 4733e0fb424e..93d02d899622 100644 --- a/lib/test-core.c +++ b/lib/test-core.c @@ -1,7 +1,7 @@ #include -#include #include #include +#include #define KVER_STRLEN 20 diff --git a/lib/test-core.h b/lib/test-core.h deleted file mode 100644 index 9129871be43e..000000000000 --- a/lib/test-core.h +++ /dev/null @@ -1,10 +0,0 @@ -struct ndctl_test; -struct ndctl_test *ndctl_test_new(unsigned int kver); -int ndctl_test_result(struct ndctl_test *test, int rc); -int ndctl_test_get_skipped(struct ndctl_test *test); -int ndctl_test_get_attempted(struct ndctl_test *test); -int __ndctl_test_attempt(struct ndctl_test *test, unsigned int kver, - const char *caller, int line); -#define ndctl_test_attempt(t, v) __ndctl_test_attempt(t, v, __func__, __LINE__) -void __ndctl_test_skip(struct ndctl_test *test, const char *caller, int line); -#define ndctl_test_skip(t) __ndctl_test_skip(t, __func__, __LINE__) diff --git a/lib/test-dpa-alloc.c b/lib/test-dpa-alloc.c index dab3b882757e..6fa88cc095ea 100644 --- a/lib/test-dpa-alloc.c +++ b/lib/test-dpa-alloc.c @@ -23,10 +23,9 @@ #include #include -#include +#include #include #include -#include #include #ifdef HAVE_NDCTL_H diff --git a/lib/test-libndctl.c b/lib/test-libndctl.c index b7c85371ee07..616b0beec878 100644 --- a/lib/test-libndctl.c +++ b/lib/test-libndctl.c @@ -32,8 +32,7 @@ #else #include #endif -#include -#include +#include #define BLKROGET _IO(0x12,94) /* get read-only status (0 = read_write) */ #define BLKROSET _IO(0x12,93) /* set device read-only (0 = read-write) */ diff --git a/lib/test-parent-uuid.c b/lib/test-parent-uuid.c index 4f48717ca0f7..042ea6ba5a6d 100644 --- a/lib/test-parent-uuid.c +++ b/lib/test-parent-uuid.c @@ -25,8 +25,7 @@ #include #include #include -#include -#include +#include #include diff --git a/lib/test-pcommit.c b/lib/test-pcommit.c index f40052f169b6..afe4fde44d22 100644 --- a/lib/test-pcommit.c +++ b/lib/test-pcommit.c @@ -15,7 +15,7 @@ #include #include #include -#include +#include #define err(msg)\ fprintf(stderr, "%s:%d: %s (%s)\n", __func__, __LINE__, msg, strerror(errno)) diff --git a/test-blk-namespaces.h b/test-blk-namespaces.h deleted file mode 100644 index 85e62e433e33..000000000000 --- a/test-blk-namespaces.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef __TEST_BLK_NAMESPACES__ -#define __TEST_BLK_NAMESPACES__ -int test_blk_namespaces(int loglevel); -#endif diff --git a/test-dpa-alloc.h b/test-dpa-alloc.h deleted file mode 100644 index f1145f4d278d..000000000000 --- a/test-dpa-alloc.h +++ /dev/null @@ -1,5 +0,0 @@ -#ifndef __TEST_DPA_ALLOC__ -#define __TEST_DPA_ALLOC__ -struct ndctl_test; -int test_dpa_alloc(int loglevel, struct ndctl_test *test); -#endif diff --git a/test-libndctl.h b/test-libndctl.h deleted file mode 100644 index 20c5db816a29..000000000000 --- a/test-libndctl.h +++ /dev/null @@ -1,5 +0,0 @@ -#ifndef __TEST_LIBNDCTL__ -#define __TEST_LIBNDCTL__ -struct ndctl_test; -int test_libndctl(int loglevel, struct ndctl_test *test); -#endif diff --git a/test-parent-uuid.h b/test-parent-uuid.h deleted file mode 100644 index 585f1825ee27..000000000000 --- a/test-parent-uuid.h +++ /dev/null @@ -1,5 +0,0 @@ -#ifndef __TEST_PARENT_UUID__ -#define __TEST_PARENT_UUID__ -struct ndctl_test; -int test_parent_uuid(int loglevel, struct ndctl_test *test); -#endif diff --git a/test-pcommit.h b/test-pcommit.h deleted file mode 100644 index 27e788d3adf6..000000000000 --- a/test-pcommit.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef __TEST_PCOMMIT__ -#define __TEST_PCOMMIT__ -int test_pcommit(void); -#endif diff --git a/test-pmem-namespaces.h b/test-pmem-namespaces.h deleted file mode 100644 index 68eb30be3a36..000000000000 --- a/test-pmem-namespaces.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef __TEST_PMEM_NAMESPACES__ -#define __TEST_PMEM_NAMESPACES__ -int test_pmem_namespaces(int loglevel); -#endif diff --git a/test.h b/test.h new file mode 100644 index 000000000000..d58dc8874dda --- /dev/null +++ b/test.h @@ -0,0 +1,22 @@ +#ifndef __TEST_H__ +#define __TEST_H__ +struct ndctl_test; +struct ndctl_test; +struct ndctl_test *ndctl_test_new(unsigned int kver); +int ndctl_test_result(struct ndctl_test *test, int rc); +int ndctl_test_get_skipped(struct ndctl_test *test); +int ndctl_test_get_attempted(struct ndctl_test *test); +int __ndctl_test_attempt(struct ndctl_test *test, unsigned int kver, + const char *caller, int line); +#define ndctl_test_attempt(t, v) __ndctl_test_attempt(t, v, __func__, __LINE__) +void __ndctl_test_skip(struct ndctl_test *test, const char *caller, int line); +#define ndctl_test_skip(t) __ndctl_test_skip(t, __func__, __LINE__) + +int test_parent_uuid(int loglevel, struct ndctl_test *test); +int test_direct_io(int loglevel, struct ndctl_test *test); +int test_dpa_alloc(int loglevel, struct ndctl_test *test); +int test_libndctl(int loglevel, struct ndctl_test *test); +int test_blk_namespaces(int loglevel); +int test_pmem_namespaces(int loglevel); +int test_pcommit(void); +#endif /* __TEST_H__ */