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