1# $FreeBSD$ 2 3PACKAGE= tests 4FILESGROUPS= TESTS 5TESTSPACKAGE= ${PACKAGE} 6 7_LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive 8 9ATF_TESTS_SH+= functional_test 10 11BINDIR= ${TESTSDIR} 12 13PROGS+= libarchive_test 14 15CFLAGS+= -I${.CURDIR:H} -I${.OBJDIR} 16CFLAGS+= -I${_LIBARCHIVEDIR}/libarchive -I${_LIBARCHIVEDIR}/test_utils 17CFLAGS+= -DHAVE_LIBLZMA=1 -DHAVE_LZMA_H=1 18 19# Uncomment to link against dmalloc 20#LDADD+= -L/usr/local/lib -ldmalloc 21#CFLAGS+= -I/usr/local/include -DUSE_DMALLOC 22 23.PATH: ${_LIBARCHIVEDIR}/libarchive/test 24TESTS_SRCS= \ 25 test_acl_freebsd_nfs4.c \ 26 test_acl_freebsd_posix1e.c \ 27 test_acl_nfs4.c \ 28 test_acl_pax.c \ 29 test_acl_posix1e.c \ 30 test_archive_api_feature.c \ 31 test_archive_clear_error.c \ 32 test_archive_cmdline.c \ 33 test_archive_crypto.c \ 34 test_archive_getdate.c \ 35 test_archive_match_time.c \ 36 test_archive_match_owner.c \ 37 test_archive_match_path.c \ 38 test_archive_pathmatch.c \ 39 test_archive_read_close_twice.c \ 40 test_archive_read_close_twice_open_fd.c \ 41 test_archive_read_close_twice_open_filename.c \ 42 test_archive_read_multiple_data_objects.c \ 43 test_archive_read_next_header_empty.c \ 44 test_archive_read_next_header_raw.c \ 45 test_archive_read_open2.c \ 46 test_archive_read_set_filter_option.c \ 47 test_archive_read_set_format_option.c \ 48 test_archive_read_set_option.c \ 49 test_archive_read_set_options.c \ 50 test_archive_read_support.c \ 51 test_archive_set_error.c \ 52 test_archive_string.c \ 53 test_archive_string_conversion.c \ 54 test_archive_write_add_filter_by_name.c \ 55 test_archive_write_set_filter_option.c \ 56 test_archive_write_set_format_by_name.c \ 57 test_archive_write_set_format_option.c \ 58 test_archive_write_set_option.c \ 59 test_archive_write_set_options.c \ 60 test_bad_fd.c \ 61 test_compat_bzip2.c \ 62 test_compat_cpio.c \ 63 test_compat_gtar.c \ 64 test_compat_gzip.c \ 65 test_compat_lzip.c \ 66 test_compat_lzma.c \ 67 test_compat_lzop.c \ 68 test_compat_mac.c \ 69 test_compat_pax_libarchive_2x.c \ 70 test_compat_solaris_tar_acl.c \ 71 test_compat_solaris_pax_sparse.c \ 72 test_compat_tar_hardlink.c \ 73 test_compat_uudecode.c \ 74 test_compat_xz.c \ 75 test_compat_zip.c \ 76 test_empty_write.c \ 77 test_entry.c \ 78 test_entry_strmode.c \ 79 test_extattr_freebsd.c \ 80 test_filter_count.c \ 81 test_fuzz.c \ 82 test_gnutar_filename_encoding.c \ 83 test_link_resolver.c \ 84 test_open_fd.c \ 85 test_open_failure.c \ 86 test_open_file.c \ 87 test_open_filename.c \ 88 test_pax_filename_encoding.c \ 89 test_read_data_large.c \ 90 test_read_disk.c \ 91 test_read_disk_directory_traversals.c \ 92 test_read_disk_entry_from_file.c \ 93 test_read_extract.c \ 94 test_read_file_nonexistent.c \ 95 test_read_filter_grzip.c \ 96 test_read_filter_lrzip.c \ 97 test_read_filter_lzop.c \ 98 test_read_filter_lzop_multiple_parts.c \ 99 test_read_filter_program.c \ 100 test_read_filter_program_signature.c \ 101 test_read_filter_uudecode.c \ 102 test_read_format_7zip.c \ 103 test_read_format_ar.c \ 104 test_read_format_cab.c \ 105 test_read_format_cab_filename.c \ 106 test_read_format_cpio_afio.c \ 107 test_read_format_cpio_bin.c \ 108 test_read_format_cpio_bin_Z.c \ 109 test_read_format_cpio_bin_be.c \ 110 test_read_format_cpio_bin_bz2.c \ 111 test_read_format_cpio_bin_gz.c \ 112 test_read_format_cpio_bin_lzip.c \ 113 test_read_format_cpio_bin_lzma.c \ 114 test_read_format_cpio_bin_xz.c \ 115 test_read_format_cpio_filename.c \ 116 test_read_format_cpio_odc.c \ 117 test_read_format_cpio_svr4_gzip.c \ 118 test_read_format_cpio_svr4c_Z.c \ 119 test_read_format_cpio_svr4_bzip2_rpm.c \ 120 test_read_format_cpio_svr4_gzip_rpm.c \ 121 test_read_format_empty.c \ 122 test_read_format_gtar_filename.c \ 123 test_read_format_gtar_gz.c \ 124 test_read_format_gtar_lzma.c \ 125 test_read_format_gtar_sparse.c \ 126 test_read_format_gtar_sparse_skip_entry.c \ 127 test_read_format_iso_Z.c \ 128 test_read_format_iso_multi_extent.c \ 129 test_read_format_iso_xorriso.c \ 130 test_read_format_isorr_rr_moved.c \ 131 test_read_format_isojoliet_bz2.c \ 132 test_read_format_isojoliet_long.c \ 133 test_read_format_isojoliet_rr.c \ 134 test_read_format_isojoliet_versioned.c \ 135 test_read_format_isorr_bz2.c \ 136 test_read_format_isorr_ce.c \ 137 test_read_format_isorr_new_bz2.c \ 138 test_read_format_isozisofs_bz2.c \ 139 test_read_format_lha.c \ 140 test_read_format_lha_filename.c \ 141 test_read_format_mtree.c \ 142 test_read_format_pax_bz2.c \ 143 test_read_format_rar.c \ 144 test_read_format_raw.c \ 145 test_read_format_tar.c \ 146 test_read_format_tar_empty_filename.c \ 147 test_read_format_tar_filename.c \ 148 test_read_format_tbz.c \ 149 test_read_format_tgz.c \ 150 test_read_format_tlz.c \ 151 test_read_format_txz.c \ 152 test_read_format_tz.c \ 153 test_read_format_ustar_filename.c \ 154 test_read_format_xar.c \ 155 test_read_format_zip.c \ 156 test_read_format_zip_comment_stored.c \ 157 test_read_format_zip_filename.c \ 158 test_read_format_zip_mac_metadata.c \ 159 test_read_format_zip_sfx.c \ 160 test_read_large.c \ 161 test_read_pax_truncated.c \ 162 test_read_position.c \ 163 test_read_set_format.c \ 164 test_read_truncated.c \ 165 test_read_truncated_filter.c \ 166 test_sparse_basic.c \ 167 test_tar_filenames.c \ 168 test_tar_large.c \ 169 test_ustar_filenames.c \ 170 test_ustar_filename_encoding.c \ 171 test_write_disk.c \ 172 test_write_disk_appledouble.c \ 173 test_write_disk_failures.c \ 174 test_write_disk_hardlink.c \ 175 test_write_disk_hfs_compression.c \ 176 test_write_disk_lookup.c \ 177 test_write_disk_mac_metadata.c \ 178 test_write_disk_no_hfs_compression.c \ 179 test_write_disk_perms.c \ 180 test_write_disk_secure.c \ 181 test_write_disk_sparse.c \ 182 test_write_disk_symlink.c \ 183 test_write_disk_times.c \ 184 test_write_filter_b64encode.c \ 185 test_write_filter_bzip2.c \ 186 test_write_filter_compress.c \ 187 test_write_filter_gzip.c \ 188 test_write_filter_gzip_timestamp.c \ 189 test_write_filter_lrzip.c \ 190 test_write_filter_lzip.c \ 191 test_write_filter_lzma.c \ 192 test_write_filter_lzop.c \ 193 test_write_filter_program.c \ 194 test_write_filter_uuencode.c \ 195 test_write_filter_xz.c \ 196 test_write_format_7zip.c \ 197 test_write_format_7zip_empty.c \ 198 test_write_format_7zip_large.c \ 199 test_write_format_ar.c \ 200 test_write_format_cpio.c \ 201 test_write_format_cpio_empty.c \ 202 test_write_format_cpio_newc.c \ 203 test_write_format_cpio_odc.c \ 204 test_write_format_gnutar.c \ 205 test_write_format_iso9660.c \ 206 test_write_format_iso9660_boot.c \ 207 test_write_format_iso9660_empty.c \ 208 test_write_format_iso9660_filename.c \ 209 test_write_format_iso9660_zisofs.c \ 210 test_write_format_mtree.c \ 211 test_write_format_mtree_absolute_path.c \ 212 test_write_format_mtree_classic.c \ 213 test_write_format_mtree_classic_indent.c \ 214 test_write_format_mtree_fflags.c \ 215 test_write_format_mtree_no_separator.c \ 216 test_write_format_mtree_quoted_filename.c \ 217 test_write_format_pax.c \ 218 test_write_format_shar_empty.c \ 219 test_write_format_tar.c \ 220 test_write_format_tar_empty.c \ 221 test_write_format_tar_sparse.c \ 222 test_write_format_tar_ustar.c \ 223 test_write_format_tar_v7tar.c \ 224 test_write_format_xar.c \ 225 test_write_format_xar_empty.c \ 226 test_write_format_zip.c \ 227 test_write_format_zip_empty.c \ 228 test_write_format_zip_no_compression.c \ 229 test_write_zip_set_compression_store.c \ 230 test_write_open_memory.c \ 231 test_zip_filename_encoding.c 232 233# Deterministic failures: 234# Crashes with SIGBUS 235BROKEN_TESTS+= test_archive_rmd160 236# Fails with `libarchive/test/test_archive_crypto.c:121: md != actualmd` 237BROKEN_TESTS+= test_archive_sha384 238# Fails with `test_compat_pax_libarchive_2x.c:122: ARCHIVE_WARN != archive_read_next_header(a, &ae)` 239BROKEN_TESTS+= test_compat_pax_libarchive_2x 240# Fails with `test_read_disk_directory_traversals.c:1094: File at has atime 886622, 1443306049 seconds ago` 241BROKEN_TESTS+= test_read_disk_directory_traversals 242 243# Non-deterministic failures: 244# (Times out?) [and] crashes 245BROKEN_TESTS+= test_fuzz_rar 246 247# Build the test program. 248SRCS.libarchive_test= \ 249 ${TESTS_SRCS} \ 250 main.c \ 251 read_open_memory.c \ 252 list.h 253 254LIBADD.libarchive_test= archive 255 256.PATH: ${_LIBARCHIVEDIR}/test_utils 257SRCS.libarchive_test+= test_utils.c 258 259# list.h is just a list of all tests, as indicated by DEFINE_TEST macro lines 260list.h: ${TESTS_SRCS} Makefile 261 @(cd ${_LIBARCHIVEDIR}/libarchive/test && \ 262 grep -h DEFINE_TEST ${.ALLSRC:N*Makefile} | \ 263 egrep -v '${BROKEN_TESTS:tW:C/ /|/g}') > ${.TARGET}.tmp 264 @mv ${.TARGET}.tmp ${.TARGET} 265 266CLEANFILES+= list.h list.h.tmp 267 268FILES+= README 269FILES+= test_acl_pax.tar.uu 270FILES+= test_archive_string_conversion.txt.Z.uu 271FILES+= test_compat_bzip2_1.tbz.uu 272FILES+= test_compat_bzip2_2.tbz.uu 273FILES+= test_compat_cpio_1.cpio.uu 274FILES+= test_compat_gtar_1.tar.uu 275FILES+= test_compat_gzip_1.tgz.uu 276FILES+= test_compat_gzip_2.tgz.uu 277FILES+= test_compat_lzip_1.tlz.uu 278FILES+= test_compat_lzip_2.tlz.uu 279FILES+= test_compat_lzma_1.tlz.uu 280FILES+= test_compat_lzma_2.tlz.uu 281FILES+= test_compat_lzma_3.tlz.uu 282FILES+= test_compat_lzop_1.tar.lzo.uu 283FILES+= test_compat_lzop_2.tar.lzo.uu 284FILES+= test_compat_lzop_3.tar.lzo.uu 285FILES+= test_compat_mac-1.tar.Z.uu 286FILES+= test_compat_mac-2.tar.Z.uu 287FILES+= test_compat_pax_libarchive_2x.tar.Z.uu 288FILES+= test_compat_solaris_pax_sparse_1.pax.Z.uu 289FILES+= test_compat_solaris_pax_sparse_2.pax.Z.uu 290FILES+= test_compat_solaris_tar_acl.tar.uu 291FILES+= test_compat_tar_hardlink_1.tar.uu 292FILES+= test_compat_xz_1.txz.uu 293FILES+= test_compat_zip_1.zip.uu 294FILES+= test_compat_zip_2.zip.uu 295FILES+= test_compat_zip_3.zip.uu 296FILES+= test_compat_zip_4.zip.uu 297FILES+= test_compat_zip_5.zip.uu 298FILES+= test_compat_zip_6.zip.uu 299FILES+= test_compat_zip_7.xps.uu 300FILES+= test_fuzz.cab.uu 301FILES+= test_fuzz.lzh.uu 302FILES+= test_fuzz_1.iso.Z.uu 303FILES+= test_pax_filename_encoding.tar.uu 304FILES+= test_rar_multivolume_multiple_files.part1.rar.uu 305FILES+= test_rar_multivolume_multiple_files.part2.rar.uu 306FILES+= test_rar_multivolume_multiple_files.part3.rar.uu 307FILES+= test_rar_multivolume_multiple_files.part4.rar.uu 308FILES+= test_rar_multivolume_multiple_files.part5.rar.uu 309FILES+= test_rar_multivolume_multiple_files.part6.rar.uu 310FILES+= test_rar_multivolume_single_file.part1.rar.uu 311FILES+= test_rar_multivolume_single_file.part2.rar.uu 312FILES+= test_rar_multivolume_single_file.part3.rar.uu 313FILES+= test_rar_multivolume_uncompressed_files.part01.rar.uu 314FILES+= test_rar_multivolume_uncompressed_files.part02.rar.uu 315FILES+= test_rar_multivolume_uncompressed_files.part03.rar.uu 316FILES+= test_rar_multivolume_uncompressed_files.part04.rar.uu 317FILES+= test_rar_multivolume_uncompressed_files.part05.rar.uu 318FILES+= test_rar_multivolume_uncompressed_files.part06.rar.uu 319FILES+= test_rar_multivolume_uncompressed_files.part07.rar.uu 320FILES+= test_rar_multivolume_uncompressed_files.part08.rar.uu 321FILES+= test_rar_multivolume_uncompressed_files.part09.rar.uu 322FILES+= test_rar_multivolume_uncompressed_files.part10.rar.uu 323FILES+= test_read_filter_grzip.tar.grz.uu 324FILES+= test_read_filter_lrzip.tar.lrz.uu 325FILES+= test_read_filter_lzop.tar.lzo.uu 326FILES+= test_read_filter_lzop_multiple_parts.tar.lzo.uu 327FILES+= test_read_format_7zip_bcj2_bzip2.7z.uu 328FILES+= test_read_format_7zip_bcj2_copy_1.7z.uu 329FILES+= test_read_format_7zip_bcj2_copy_2.7z.uu 330FILES+= test_read_format_7zip_bcj2_copy_lzma.7z.uu 331FILES+= test_read_format_7zip_bcj2_deflate.7z.uu 332FILES+= test_read_format_7zip_bcj2_lzma1_1.7z.uu 333FILES+= test_read_format_7zip_bcj2_lzma1_2.7z.uu 334FILES+= test_read_format_7zip_bcj2_lzma2_1.7z.uu 335FILES+= test_read_format_7zip_bcj2_lzma2_2.7z.uu 336FILES+= test_read_format_7zip_bcj_bzip2.7z.uu 337FILES+= test_read_format_7zip_bcj_copy.7z.uu 338FILES+= test_read_format_7zip_bcj_deflate.7z.uu 339FILES+= test_read_format_7zip_bcj_lzma1.7z.uu 340FILES+= test_read_format_7zip_bcj_lzma2.7z.uu 341FILES+= test_read_format_7zip_bzip2.7z.uu 342FILES+= test_read_format_7zip_copy.7z.uu 343FILES+= test_read_format_7zip_copy_2.7z.uu 344FILES+= test_read_format_7zip_deflate.7z.uu 345FILES+= test_read_format_7zip_delta_lzma1.7z.uu 346FILES+= test_read_format_7zip_delta_lzma2.7z.uu 347FILES+= test_read_format_7zip_empty_archive.7z.uu 348FILES+= test_read_format_7zip_empty_file.7z.uu 349FILES+= test_read_format_7zip_lzma1.7z.uu 350FILES+= test_read_format_7zip_lzma1_2.7z.uu 351FILES+= test_read_format_7zip_lzma1_lzma2.7z.uu 352FILES+= test_read_format_7zip_lzma2.7z.uu 353FILES+= test_read_format_7zip_ppmd.7z.uu 354FILES+= test_read_format_7zip_symbolic_name.7z.uu 355FILES+= test_read_format_ar.ar.uu 356FILES+= test_read_format_cab_1.cab.uu 357FILES+= test_read_format_cab_2.cab.uu 358FILES+= test_read_format_cab_3.cab.uu 359FILES+= test_read_format_cab_filename_cp932.cab.uu 360FILES+= test_read_format_cpio_bin_be.cpio.uu 361FILES+= test_read_format_cpio_filename_cp866.cpio.uu 362FILES+= test_read_format_cpio_filename_eucjp.cpio.uu 363FILES+= test_read_format_cpio_filename_koi8r.cpio.uu 364FILES+= test_read_format_cpio_filename_utf8_jp.cpio.uu 365FILES+= test_read_format_cpio_filename_utf8_ru.cpio.uu 366FILES+= test_read_format_cpio_svr4_bzip2_rpm.rpm.uu 367FILES+= test_read_format_cpio_svr4_gzip_rpm.rpm.uu 368FILES+= test_read_format_gtar_filename_cp866.tar.Z.uu 369FILES+= test_read_format_gtar_filename_eucjp.tar.Z.uu 370FILES+= test_read_format_gtar_filename_koi8r.tar.Z.uu 371FILES+= test_read_format_gtar_sparse_1_13.tar.uu 372FILES+= test_read_format_gtar_sparse_1_17.tar.uu 373FILES+= test_read_format_gtar_sparse_1_17_posix00.tar.uu 374FILES+= test_read_format_gtar_sparse_1_17_posix01.tar.uu 375FILES+= test_read_format_gtar_sparse_1_17_posix10.tar.uu 376FILES+= test_read_format_gtar_sparse_1_17_posix10_modified.tar.uu 377FILES+= test_read_format_gtar_sparse_skip_entry.tar.Z.uu 378FILES+= test_read_format_iso.iso.Z.uu 379FILES+= test_read_format_iso_2.iso.Z.uu 380FILES+= test_read_format_iso_joliet.iso.Z.uu 381FILES+= test_read_format_iso_joliet_by_nero.iso.Z.uu 382FILES+= test_read_format_iso_joliet_long.iso.Z.uu 383FILES+= test_read_format_iso_joliet_rockridge.iso.Z.uu 384FILES+= test_read_format_iso_multi_extent.iso.Z.uu 385FILES+= test_read_format_iso_rockridge.iso.Z.uu 386FILES+= test_read_format_iso_rockridge_ce.iso.Z.uu 387FILES+= test_read_format_iso_rockridge_new.iso.Z.uu 388FILES+= test_read_format_iso_rockridge_rr_moved.iso.Z.uu 389FILES+= test_read_format_iso_xorriso.iso.Z.uu 390FILES+= test_read_format_iso_zisofs.iso.Z.uu 391FILES+= test_read_format_lha_filename_cp932.lzh.uu 392FILES+= test_read_format_lha_header0.lzh.uu 393FILES+= test_read_format_lha_header1.lzh.uu 394FILES+= test_read_format_lha_header2.lzh.uu 395FILES+= test_read_format_lha_header3.lzh.uu 396FILES+= test_read_format_lha_lh0.lzh.uu 397FILES+= test_read_format_lha_lh6.lzh.uu 398FILES+= test_read_format_lha_lh7.lzh.uu 399FILES+= test_read_format_lha_withjunk.lzh.uu 400FILES+= test_read_format_mtree.mtree.uu 401FILES+= test_read_format_mtree_nomagic.mtree.uu 402FILES+= test_read_format_mtree_nomagic2.mtree.uu 403FILES+= test_read_format_mtree_nomagic3.mtree.uu 404FILES+= test_read_format_rar.rar.uu 405FILES+= test_read_format_rar_binary_data.rar.uu 406FILES+= test_read_format_rar_compress_best.rar.uu 407FILES+= test_read_format_rar_compress_normal.rar.uu 408FILES+= test_read_format_rar_multi_lzss_blocks.rar.uu 409FILES+= test_read_format_rar_multivolume.part0001.rar.uu 410FILES+= test_read_format_rar_multivolume.part0002.rar.uu 411FILES+= test_read_format_rar_multivolume.part0003.rar.uu 412FILES+= test_read_format_rar_multivolume.part0004.rar.uu 413FILES+= test_read_format_rar_noeof.rar.uu 414FILES+= test_read_format_rar_ppmd_lzss_conversion.rar.uu 415FILES+= test_read_format_rar_sfx.exe.uu 416FILES+= test_read_format_rar_subblock.rar.uu 417FILES+= test_read_format_rar_unicode.rar.uu 418FILES+= test_read_format_rar_windows.rar.uu 419FILES+= test_read_format_raw.data.Z.uu 420FILES+= test_read_format_raw.data.uu 421FILES+= test_read_format_tar_empty_filename.tar.uu 422FILES+= test_read_format_tar_filename_koi8r.tar.Z.uu 423FILES+= test_read_format_ustar_filename_cp866.tar.Z.uu 424FILES+= test_read_format_ustar_filename_eucjp.tar.Z.uu 425FILES+= test_read_format_ustar_filename_koi8r.tar.Z.uu 426FILES+= test_read_format_zip.zip.uu 427FILES+= test_read_format_zip_comment_stored_1.zip.uu 428FILES+= test_read_format_zip_comment_stored_2.zip.uu 429FILES+= test_read_format_zip_filename_cp866.zip.uu 430FILES+= test_read_format_zip_filename_cp932.zip.uu 431FILES+= test_read_format_zip_filename_koi8r.zip.uu 432FILES+= test_read_format_zip_filename_utf8_jp.zip.uu 433FILES+= test_read_format_zip_filename_utf8_ru.zip.uu 434FILES+= test_read_format_zip_filename_utf8_ru2.zip.uu 435FILES+= test_read_format_zip_length_at_end.zip.uu 436FILES+= test_read_format_zip_mac_metadata.zip.uu 437FILES+= test_read_format_zip_sfx.uu 438FILES+= test_read_format_zip_symlink.zip.uu 439FILES+= test_read_format_zip_ux.zip.uu 440FILES+= test_read_large_splitted_rar_aa.uu 441FILES+= test_read_large_splitted_rar_ab.uu 442FILES+= test_read_large_splitted_rar_ac.uu 443FILES+= test_read_large_splitted_rar_ad.uu 444FILES+= test_read_large_splitted_rar_ae.uu 445FILES+= test_read_splitted_rar_aa.uu 446FILES+= test_read_splitted_rar_ab.uu 447FILES+= test_read_splitted_rar_ac.uu 448FILES+= test_read_splitted_rar_ad.uu 449FILES+= test_splitted_rar_seek_support_aa.uu 450FILES+= test_splitted_rar_seek_support_ab.uu 451FILES+= test_splitted_rar_seek_support_ac.uu 452FILES+= test_write_disk_appledouble.cpio.gz.uu 453FILES+= test_write_disk_hfs_compression.tgz.uu 454FILES+= test_write_disk_mac_metadata.tar.gz.uu 455FILES+= test_write_disk_no_hfs_compression.tgz.uu 456 457.include <bsd.test.mk> 458