xref: /freebsd/sys/contrib/openzfs/tests/zfs-tests/cmd/Makefile.am (revision 6580f5c38dd5b01aeeaed16b370f1a12423437f0)
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) $(FORCEDEBUG_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
63
64scripts_zfs_tests_bin_PROGRAMS += %D%/mkbusy %D%/mkfile %D%/mkfiles %D%/mktree
65%C%_mkfile_LDADD = $(LTLIBINTL)
66
67
68scripts_zfs_tests_bin_PROGRAMS += %D%/mmap_exec %D%/mmap_seek %D%/mmap_sync %D%/mmapwrite %D%/readmmap
69%C%_mmapwrite_LDADD = -lpthread
70
71if WANT_MMAP_LIBAIO
72scripts_zfs_tests_bin_PROGRAMS += %D%/mmap_libaio
73%C%_mmap_libaio_CFLAGS = $(AM_CFLAGS) $(LIBAIO_CFLAGS)
74%C%_mmap_libaio_LDADD  = $(LIBAIO_LIBS)
75endif
76
77
78scripts_zfs_tests_bin_PROGRAMS += %D%/nvlist_to_lua
79%C%_nvlist_to_lua_LDADD = \
80	libzfs_core.la \
81	libnvpair.la
82
83scripts_zfs_tests_bin_PROGRAMS += %D%/rm_lnkcnt_zero_file
84%C%_rm_lnkcnt_zero_file_LDADD = -lpthread
85
86scripts_zfs_tests_bin_PROGRAMS += %D%/send_doall
87%C%_send_doall_LDADD = \
88	libzfs_core.la \
89	libzfs.la \
90	libnvpair.la
91
92scripts_zfs_tests_bin_PROGRAMS += %D%/stride_dd
93%C%_stride_dd_LDADD = -lrt
94
95scripts_zfs_tests_bin_PROGRAMS += %D%/threadsappend
96%C%_threadsappend_LDADD = -lpthread
97
98scripts_zfs_tests_bin_PROGRAMS += %D%/ereports
99%C%_ereports_LDADD = \
100	libnvpair.la \
101	libzfs.la
102
103
104scripts_zfs_tests_bin_PROGRAMS += %D%/edonr_test %D%/skein_test \
105	%D%/sha2_test %D%/blake3_test
106%C%_skein_test_SOURCES = %D%/checksum/skein_test.c
107%C%_sha2_test_SOURCES  = %D%/checksum/sha2_test.c
108%C%_edonr_test_SOURCES = %D%/checksum/edonr_test.c
109%C%_blake3_test_SOURCES = %D%/checksum/blake3_test.c
110%C%_skein_test_LDADD = \
111	libicp.la \
112	libspl.la \
113	libspl_assert.la
114%C%_sha2_test_LDADD  = $(%C%_skein_test_LDADD)
115%C%_edonr_test_LDADD = $(%C%_skein_test_LDADD)
116%C%_blake3_test_LDADD = $(%C%_skein_test_LDADD)
117
118if BUILD_LINUX
119scripts_zfs_tests_bin_PROGRAMS += %D%/getversion
120scripts_zfs_tests_bin_PROGRAMS += %D%/user_ns_exec
121scripts_zfs_tests_bin_PROGRAMS += %D%/renameat2
122scripts_zfs_tests_bin_PROGRAMS += %D%/xattrtest
123scripts_zfs_tests_bin_PROGRAMS += %D%/zed_fd_spill-zedlet
124scripts_zfs_tests_bin_PROGRAMS += %D%/idmap_util
125
126%C%_idmap_util_LDADD = libspl.la
127
128dist_noinst_DATA += %D%/linux_dos_attributes/dos_attributes.h
129scripts_zfs_tests_bin_PROGRAMS  += %D%/read_dos_attributes %D%/write_dos_attributes
130%C%_read_dos_attributes_SOURCES  = %D%/linux_dos_attributes/read_dos_attributes.c
131%C%_write_dos_attributes_SOURCES = %D%/linux_dos_attributes/write_dos_attributes.c
132
133scripts_zfs_tests_bin_PROGRAMS += %D%/randfree_file
134%C%_randfree_file_SOURCES       = %D%/file/randfree_file.c
135
136scripts_zfs_tests_bin_PROGRAMS += %D%/file_fadvise
137%C%_file_fadvise_SOURCES  = %D%/file/file_fadvise.c
138endif
139