xref: /freebsd/sys/contrib/openzfs/tests/zfs-tests/cmd/Makefile.am (revision 87b759f0fa1f7554d50ce640c40138512bbded44)
1scripts_zfs_tests_bindir = $(datadir)/$(PACKAGE)/zfs-tests/bin
2
3
4scripts_zfs_tests_bin_PROGRAMS  = %D%/chg_usr_exec
5scripts_zfs_tests_bin_PROGRAMS += %D%/clonefile
6scripts_zfs_tests_bin_PROGRAMS += %D%/clone_mmap_cached
7scripts_zfs_tests_bin_PROGRAMS += %D%/clone_mmap_write
8scripts_zfs_tests_bin_PROGRAMS += %D%/cp_files
9scripts_zfs_tests_bin_PROGRAMS += %D%/ctime
10scripts_zfs_tests_bin_PROGRAMS += %D%/dir_rd_update
11scripts_zfs_tests_bin_PROGRAMS += %D%/dosmode_readonly_write
12scripts_zfs_tests_bin_PROGRAMS += %D%/get_diff
13scripts_zfs_tests_bin_PROGRAMS += %D%/rename_dir
14scripts_zfs_tests_bin_PROGRAMS += %D%/suid_write_to_file
15scripts_zfs_tests_bin_PROGRAMS += %D%/truncate_test
16scripts_zfs_tests_bin_PROGRAMS += %D%/zfs_diff-socket
17
18
19scripts_zfs_tests_bin_PROGRAMS += %D%/badsend
20%C%_badsend_LDADD = \
21	libzfs_core.la \
22	libzfs.la \
23	libnvpair.la
24
25
26scripts_zfs_tests_bin_PROGRAMS += %D%/btree_test
27%C%_btree_test_CPPFLAGS = $(AM_CPPFLAGS) $(LIBZPOOL_CPPFLAGS)
28%C%_btree_test_LDADD = \
29	libzpool.la \
30	libzfs_core.la
31
32
33if WANT_DEVNAME2DEVID
34scripts_zfs_tests_bin_PROGRAMS += %D%/devname2devid
35%C%_devname2devid_CFLAGS = $(AM_CFLAGS) $(LIBUDEV_CFLAGS)
36%C%_devname2devid_LDADD = $(LIBUDEV_LIBS)
37endif
38
39
40scripts_zfs_tests_bin_PROGRAMS += %D%/draid
41%C%_draid_CFLAGS = $(AM_CFLAGS) $(ZLIB_CFLAGS)
42%C%_draid_LDADD = \
43	libzpool.la \
44	libnvpair.la
45%C%_draid_LDADD += $(ZLIB_LIBS)
46
47dist_noinst_DATA += %D%/file/file_common.h
48scripts_zfs_tests_bin_PROGRAMS += %D%/file_append %D%/file_check %D%/file_trunc %D%/file_write %D%/largest_file %D%/randwritecomp
49%C%_file_append_SOURCES   = %D%/file/file_append.c
50%C%_file_check_SOURCES    = %D%/file/file_check.c
51%C%_file_trunc_SOURCES    = %D%/file/file_trunc.c
52%C%_file_write_SOURCES    = %D%/file/file_write.c
53%C%_largest_file_SOURCES  = %D%/file/largest_file.c
54%C%_randwritecomp_SOURCES = %D%/file/randwritecomp.c
55
56
57scripts_zfs_tests_bin_PROGRAMS += %D%/libzfs_input_check
58%C%_libzfs_input_check_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/include/os/@ac_system_l@/zfs
59%C%_libzfs_input_check_LDADD = \
60	libzfs_core.la \
61	libnvpair.la
62
63scripts_zfs_tests_bin_PROGRAMS += %D%/manipulate_user_buffer
64%C%_manipulate_user_buffer_LDADD = -lpthread
65
66scripts_zfs_tests_bin_PROGRAMS += %D%/mkbusy %D%/mkfile %D%/mkfiles %D%/mktree
67%C%_mkfile_LDADD = $(LTLIBINTL)
68
69
70scripts_zfs_tests_bin_PROGRAMS += %D%/mmap_exec %D%/mmap_seek %D%/mmap_sync %D%/mmapwrite %D%/readmmap
71%C%_mmapwrite_LDADD = -lpthread
72
73if WANT_MMAP_LIBAIO
74scripts_zfs_tests_bin_PROGRAMS += %D%/mmap_libaio
75%C%_mmap_libaio_CFLAGS = $(AM_CFLAGS) $(LIBAIO_CFLAGS)
76%C%_mmap_libaio_LDADD  = $(LIBAIO_LIBS)
77endif
78
79
80scripts_zfs_tests_bin_PROGRAMS += %D%/nvlist_to_lua
81%C%_nvlist_to_lua_LDADD = \
82	libzfs_core.la \
83	libnvpair.la
84
85scripts_zfs_tests_bin_PROGRAMS += %D%/rm_lnkcnt_zero_file
86%C%_rm_lnkcnt_zero_file_LDADD = -lpthread
87
88scripts_zfs_tests_bin_PROGRAMS += %D%/send_doall
89%C%_send_doall_LDADD = \
90	libzfs_core.la \
91	libzfs.la \
92	libnvpair.la
93
94scripts_zfs_tests_bin_PROGRAMS += %D%/stride_dd
95%C%_stride_dd_LDADD = -lrt
96
97scripts_zfs_tests_bin_PROGRAMS += %D%/threadsappend
98%C%_threadsappend_LDADD = -lpthread
99
100scripts_zfs_tests_bin_PROGRAMS += %D%/ereports
101%C%_ereports_LDADD = \
102	libnvpair.la \
103	libzfs.la
104
105
106scripts_zfs_tests_bin_PROGRAMS += %D%/edonr_test %D%/skein_test \
107	%D%/sha2_test %D%/blake3_test
108%C%_skein_test_SOURCES = %D%/checksum/skein_test.c
109%C%_sha2_test_SOURCES  = %D%/checksum/sha2_test.c
110%C%_edonr_test_SOURCES = %D%/checksum/edonr_test.c
111%C%_blake3_test_SOURCES = %D%/checksum/blake3_test.c
112%C%_skein_test_LDADD = \
113	libicp.la \
114	libspl.la \
115	libspl_assert.la
116%C%_sha2_test_LDADD  = $(%C%_skein_test_LDADD)
117%C%_edonr_test_LDADD = $(%C%_skein_test_LDADD)
118%C%_blake3_test_LDADD = $(%C%_skein_test_LDADD)
119
120if BUILD_LINUX
121scripts_zfs_tests_bin_PROGRAMS += %D%/getversion
122scripts_zfs_tests_bin_PROGRAMS += %D%/user_ns_exec
123scripts_zfs_tests_bin_PROGRAMS += %D%/renameat2
124scripts_zfs_tests_bin_PROGRAMS += %D%/xattrtest
125scripts_zfs_tests_bin_PROGRAMS += %D%/zed_fd_spill-zedlet
126scripts_zfs_tests_bin_PROGRAMS += %D%/idmap_util
127
128%C%_idmap_util_LDADD = libspl.la
129
130dist_noinst_DATA += %D%/linux_dos_attributes/dos_attributes.h
131scripts_zfs_tests_bin_PROGRAMS  += %D%/read_dos_attributes %D%/write_dos_attributes
132%C%_read_dos_attributes_SOURCES  = %D%/linux_dos_attributes/read_dos_attributes.c
133%C%_write_dos_attributes_SOURCES = %D%/linux_dos_attributes/write_dos_attributes.c
134
135scripts_zfs_tests_bin_PROGRAMS += %D%/randfree_file
136%C%_randfree_file_SOURCES       = %D%/file/randfree_file.c
137
138scripts_zfs_tests_bin_PROGRAMS += %D%/file_fadvise
139%C%_file_fadvise_SOURCES  = %D%/file/file_fadvise.c
140endif
141