summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMatthew Macy <mmacy@mattmacy.io>2019-10-02 10:39:48 -0700
committerBrian Behlendorf <behlendorf1@llnl.gov>2019-10-02 10:39:48 -0700
commitd31277abb1db51dece836dd47628ca42c07e528c (patch)
treeb2635f2c39d2315d21af445522203dffbae57851 /tests
parent6360e2779e47f4bf2233071b427ad522eca9bdd4 (diff)
OpenZFS restructuring - libspl
Factor Linux specific pieces out of libspl. Reviewed-by: Ryan Moeller <ryan@ixsystems.com> Reviewed-by: Sean Eric Fagan <sef@ixsystems.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Matt Macy <mmacy@FreeBSD.org> Closes #9336
Diffstat (limited to 'tests')
-rw-r--r--tests/zfs-tests/cmd/file_write/file_write.c4
-rw-r--r--tests/zfs-tests/cmd/largest_file/largest_file.c5
-rw-r--r--tests/zfs-tests/cmd/libzfs_input_check/Makefile.am4
-rw-r--r--tests/zfs-tests/cmd/mkbusy/mkbusy.c2
-rw-r--r--tests/zfs-tests/cmd/mkfile/mkfile.c8
-rw-r--r--tests/zfs-tests/cmd/nvlist_to_lua/Makefile.am4
-rw-r--r--tests/zfs-tests/tests/functional/checksum/edonr_test.c4
-rw-r--r--tests/zfs-tests/tests/functional/checksum/sha2_test.c3
-rw-r--r--tests/zfs-tests/tests/functional/checksum/skein_test.c4
-rw-r--r--tests/zfs-tests/tests/functional/hkdf/Makefile.am2
-rw-r--r--tests/zfs-tests/tests/functional/libzfs/Makefile.am4
11 files changed, 6 insertions, 38 deletions
diff --git a/tests/zfs-tests/cmd/file_write/file_write.c b/tests/zfs-tests/cmd/file_write/file_write.c
index 81fc5de39..ec393be7f 100644
--- a/tests/zfs-tests/cmd/file_write/file_write.c
+++ b/tests/zfs-tests/cmd/file_write/file_write.c
@@ -34,10 +34,6 @@
#include <time.h>
#include <stdint.h>
-typedef unsigned char uchar_t;
-typedef long long longlong_t;
-typedef longlong_t offset_t;
-
static unsigned char bigbuffer[BIGBUFFERSIZE];
/*
diff --git a/tests/zfs-tests/cmd/largest_file/largest_file.c b/tests/zfs-tests/cmd/largest_file/largest_file.c
index d1eceaf56..00e1019cc 100644
--- a/tests/zfs-tests/cmd/largest_file/largest_file.c
+++ b/tests/zfs-tests/cmd/largest_file/largest_file.c
@@ -33,12 +33,9 @@
#include <signal.h>
#include <stdio.h>
#include <string.h>
-#include <sys/types.h>
+#include <sys/stdtypes.h>
#include <unistd.h>
-typedef long long offset_t;
-#define MAXOFFSET_T LLONG_MAX
-
/*
* --------------------------------------------------------------
*
diff --git a/tests/zfs-tests/cmd/libzfs_input_check/Makefile.am b/tests/zfs-tests/cmd/libzfs_input_check/Makefile.am
index b62a6bb0f..32cc46561 100644
--- a/tests/zfs-tests/cmd/libzfs_input_check/Makefile.am
+++ b/tests/zfs-tests/cmd/libzfs_input_check/Makefile.am
@@ -2,10 +2,6 @@ include $(top_srcdir)/config/Rules.am
pkgexecdir = $(datadir)/@PACKAGE@/zfs-tests/bin
-DEFAULT_INCLUDES += \
- -I$(top_srcdir)/include \
- -I$(top_srcdir)/lib/libspl/include
-
pkgexec_PROGRAMS = libzfs_input_check
libzfs_input_check_SOURCES = libzfs_input_check.c
diff --git a/tests/zfs-tests/cmd/mkbusy/mkbusy.c b/tests/zfs-tests/cmd/mkbusy/mkbusy.c
index 9634904f0..c26822bb5 100644
--- a/tests/zfs-tests/cmd/mkbusy/mkbusy.c
+++ b/tests/zfs-tests/cmd/mkbusy/mkbusy.c
@@ -30,8 +30,6 @@
#include <errno.h>
#include <string.h>
-typedef enum boolean { B_FALSE, B_TRUE } boolean_t;
-
static void
usage(char *progname)
{
diff --git a/tests/zfs-tests/cmd/mkfile/mkfile.c b/tests/zfs-tests/cmd/mkfile/mkfile.c
index 7ebf7bbcf..888af6db6 100644
--- a/tests/zfs-tests/cmd/mkfile/mkfile.c
+++ b/tests/zfs-tests/cmd/mkfile/mkfile.c
@@ -35,17 +35,13 @@
#include <libintl.h>
#include <errno.h>
-#define MIN(a, b) ((a) < (b) ? (a) : (b))
-
-#define BLOCK_SIZE 512 /* bytes */
+#define BLOCKSIZE 512 /* bytes */
#define KILOBYTE 1024
#define MEGABYTE (KILOBYTE * KILOBYTE)
#define GIGABYTE (KILOBYTE * MEGABYTE)
#define FILE_MODE (S_ISVTX + S_IRUSR + S_IWUSR)
-typedef long long offset_t;
-
static void usage(void);
int
@@ -95,7 +91,7 @@ main(int argc, char **argv)
break;
case 'b':
case 'B':
- mult = BLOCK_SIZE;
+ mult = BLOCKSIZE;
break;
case 'm':
case 'M':
diff --git a/tests/zfs-tests/cmd/nvlist_to_lua/Makefile.am b/tests/zfs-tests/cmd/nvlist_to_lua/Makefile.am
index f509a97e3..7d60c2482 100644
--- a/tests/zfs-tests/cmd/nvlist_to_lua/Makefile.am
+++ b/tests/zfs-tests/cmd/nvlist_to_lua/Makefile.am
@@ -2,10 +2,6 @@ include $(top_srcdir)/config/Rules.am
pkgexecdir = $(datadir)/@PACKAGE@/zfs-tests/bin
-DEFAULT_INCLUDES += \
- -I$(top_srcdir)/include \
- -I$(top_srcdir)/lib/libspl/include
-
pkgexec_PROGRAMS = nvlist_to_lua
nvlist_to_lua_SOURCES = nvlist_to_lua.c
diff --git a/tests/zfs-tests/tests/functional/checksum/edonr_test.c b/tests/zfs-tests/tests/functional/checksum/edonr_test.c
index a2a924e5d..a88756091 100644
--- a/tests/zfs-tests/tests/functional/checksum/edonr_test.c
+++ b/tests/zfs-tests/tests/functional/checksum/edonr_test.c
@@ -38,9 +38,7 @@
#include <stdio.h>
#include <sys/note.h>
#include <sys/time.h>
-
-typedef enum boolean { B_FALSE, B_TRUE } boolean_t;
-typedef unsigned long long u_longlong_t;
+#include <sys/stdtypes.h>
/*
* Test messages from:
diff --git a/tests/zfs-tests/tests/functional/checksum/sha2_test.c b/tests/zfs-tests/tests/functional/checksum/sha2_test.c
index afd6f8243..25a8d2bf3 100644
--- a/tests/zfs-tests/tests/functional/checksum/sha2_test.c
+++ b/tests/zfs-tests/tests/functional/checksum/sha2_test.c
@@ -39,9 +39,8 @@
#include <sys/time.h>
#define _SHA2_IMPL
#include <sys/sha2.h>
+#include <sys/stdtypes.h>
#define NOTE(x)
-typedef enum boolean { B_FALSE, B_TRUE } boolean_t;
-typedef unsigned long long u_longlong_t;
/*
diff --git a/tests/zfs-tests/tests/functional/checksum/skein_test.c b/tests/zfs-tests/tests/functional/checksum/skein_test.c
index 37548f03b..55df9075c 100644
--- a/tests/zfs-tests/tests/functional/checksum/skein_test.c
+++ b/tests/zfs-tests/tests/functional/checksum/skein_test.c
@@ -37,11 +37,9 @@
#include <strings.h>
#include <stdio.h>
#include <sys/time.h>
+#include <sys/stdtypes.h>
#define NOTE(x)
-typedef enum boolean { B_FALSE, B_TRUE } boolean_t;
-typedef unsigned long long u_longlong_t;
-
/*
* Skein test suite using values from the Skein V1.3 specification found at:
* http://www.skein-hash.info/sites/default/files/skein1.3.pdf
diff --git a/tests/zfs-tests/tests/functional/hkdf/Makefile.am b/tests/zfs-tests/tests/functional/hkdf/Makefile.am
index b54e353cd..c1266214f 100644
--- a/tests/zfs-tests/tests/functional/hkdf/Makefile.am
+++ b/tests/zfs-tests/tests/functional/hkdf/Makefile.am
@@ -1,7 +1,5 @@
include $(top_srcdir)/config/Rules.am
-AM_CPPFLAGS += -I$(top_srcdir)/include
-AM_CPPFLAGS += -I$(top_srcdir)/lib/libspl/include
LDADD = $(top_builddir)/lib/libzpool/libzpool.la
AUTOMAKE_OPTIONS = subdir-objects
diff --git a/tests/zfs-tests/tests/functional/libzfs/Makefile.am b/tests/zfs-tests/tests/functional/libzfs/Makefile.am
index ae9be5097..e9a703f49 100644
--- a/tests/zfs-tests/tests/functional/libzfs/Makefile.am
+++ b/tests/zfs-tests/tests/functional/libzfs/Makefile.am
@@ -9,10 +9,6 @@ dist_pkgdata_SCRIPTS = \
setup.ksh \
libzfs_input.ksh
-DEFAULT_INCLUDES += \
- -I$(top_srcdir)/include \
- -I$(top_srcdir)/lib/libspl/include
-
many_fds_LDADD = \
$(top_builddir)/lib/libzfs/libzfs.la