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