@@ -1,8 +1,6 @@
#include <stdio.h>
#include <syslog.h>
-#include <test-pcommit.h>
-#include <test-blk-namespaces.h>
-#include <test-pmem-namespaces.h>
+#include <test.h>
#include <util/parse-options.h>
int cmd_bat(int argc, const char **argv)
@@ -1,10 +1,7 @@
#include <stdio.h>
#include <limits.h>
#include <syslog.h>
-#include <test-core.h>
-#include <test-libndctl.h>
-#include <test-dpa-alloc.h>
-#include <test-parent-uuid.h>
+#include <test.h>
#include <util/parse-options.h>
static char *result(int rc)
@@ -25,7 +25,7 @@
#include <sys/types.h>
#include <unistd.h>
#include <uuid/uuid.h>
-#include <test-blk-namespaces.h>
+#include <test.h>
/* 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
@@ -25,7 +25,7 @@
#include <sys/types.h>
#include <unistd.h>
#include <uuid/uuid.h>
-#include <test-pmem-namespaces.h>
+#include <test.h>
#define err(msg)\
fprintf(stderr, "%s:%d: %s (%s)\n", __func__, __LINE__, msg, strerror(errno))
@@ -1,7 +1,7 @@
#include <linux/version.h>
-#include <test-core.h>
#include <stdlib.h>
#include <stdio.h>
+#include <test.h>
#define KVER_STRLEN 20
deleted file mode 100644
@@ -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__)
@@ -23,10 +23,9 @@
#include <libkmod.h>
#include <uuid/uuid.h>
-#include <test-core.h>
+#include <test.h>
#include <linux/version.h>
#include <ndctl/libndctl.h>
-#include <test-dpa-alloc.h>
#include <ccan/array_size/array_size.h>
#ifdef HAVE_NDCTL_H
@@ -32,8 +32,7 @@
#else
#include <ndctl.h>
#endif
-#include <test-libndctl.h>
-#include <test-core.h>
+#include <test.h>
#define BLKROGET _IO(0x12,94) /* get read-only status (0 = read_write) */
#define BLKROSET _IO(0x12,93) /* set device read-only (0 = read-write) */
@@ -25,8 +25,7 @@
#include <libkmod.h>
#include <uuid/uuid.h>
#include <linux/version.h>
-#include <test-core.h>
-#include <test-parent-uuid.h>
+#include <test.h>
#include <ndctl/libndctl.h>
@@ -15,7 +15,7 @@
#include <errno.h>
#include <stdio.h>
#include <string.h>
-#include <test-pcommit.h>
+#include <test.h>
#define err(msg)\
fprintf(stderr, "%s:%d: %s (%s)\n", __func__, __LINE__, msg, strerror(errno))
deleted file mode 100644
@@ -1,4 +0,0 @@
-#ifndef __TEST_BLK_NAMESPACES__
-#define __TEST_BLK_NAMESPACES__
-int test_blk_namespaces(int loglevel);
-#endif
deleted file mode 100644
@@ -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
deleted file mode 100644
@@ -1,5 +0,0 @@
-#ifndef __TEST_LIBNDCTL__
-#define __TEST_LIBNDCTL__
-struct ndctl_test;
-int test_libndctl(int loglevel, struct ndctl_test *test);
-#endif
deleted file mode 100644
@@ -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
deleted file mode 100644
@@ -1,4 +0,0 @@
-#ifndef __TEST_PCOMMIT__
-#define __TEST_PCOMMIT__
-int test_pcommit(void);
-#endif
deleted file mode 100644
@@ -1,4 +0,0 @@
-#ifndef __TEST_PMEM_NAMESPACES__
-#define __TEST_PMEM_NAMESPACES__
-int test_pmem_namespaces(int loglevel);
-#endif
new file mode 100644
@@ -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__ */
Consolidate test routine declarations in test.h. Signed-off-by: Dan Williams <dan.j.williams@intel.com> --- 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