]> git.ipfire.org Git - thirdparty/libarchive.git/commit
tests: Avoid assertEqualIntA with archive_*_free 3072/head
authorTobias Stoeckmann <tobias@stoeckmann.org>
Mon, 25 May 2026 18:36:39 +0000 (20:36 +0200)
committerTobias Stoeckmann <tobias@stoeckmann.org>
Mon, 25 May 2026 18:36:39 +0000 (20:36 +0200)
commit622bda49db978b68b05d1975b2d69a97c9da9d4f
tree6e90fec90b5b2648690aa453ff13a1544fda94a5
parent4db79557822195c824fa25f3fefd7077b946a42f
tests: Avoid assertEqualIntA with archive_*_free

In case of errors, assertEqualIntA accesses the given archive and prints
diagnostic information about errno and error string.

Since archive_read_free and archive_write_free free the memory of the
archive, this would just lead to memory issues in case of errors.

Use assertEqualInt instead.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
37 files changed:
libarchive/test/test_compat_zip.c
libarchive/test/test_pax_xattr_header.c
libarchive/test/test_read_files_compressed.c
libarchive/test/test_read_format_7zip_malformed.c
libarchive/test/test_read_format_rar.c
libarchive/test/test_read_format_tar_mac_metadata.c
libarchive/test/test_read_format_zip.c
libarchive/test/test_read_format_zip_7075_utf8_paths.c
libarchive/test/test_read_format_zip_comment_stored.c
libarchive/test/test_read_format_zip_jar.c
libarchive/test/test_read_format_zip_mac_metadata.c
libarchive/test/test_read_format_zip_malformed.c
libarchive/test/test_read_format_zip_nested.c
libarchive/test/test_read_format_zip_nofiletype.c
libarchive/test/test_read_format_zip_padded.c
libarchive/test/test_read_format_zip_sfx.c
libarchive/test/test_read_format_zip_with_invalid_traditional_eocd.c
libarchive/test/test_read_format_zip_zip64.c
libarchive/test/test_write_disk_appledouble.c
libarchive/test/test_write_disk_hfs_compression.c
libarchive/test/test_write_disk_mac_metadata.c
libarchive/test/test_write_disk_no_hfs_compression.c
libarchive/test/test_write_format_gnutar.c
libarchive/test/test_write_format_gnutar_filenames.c
libarchive/test/test_write_format_iso9660.c
libarchive/test/test_write_format_iso9660_boot.c
libarchive/test/test_write_format_iso9660_empty.c
libarchive/test/test_write_format_iso9660_filename.c
libarchive/test/test_write_format_iso9660_joliet_id.c
libarchive/test/test_write_format_iso9660_zisofs.c
libarchive/test/test_write_format_mtree_preset_digests.c
libarchive/test/test_write_format_pax.c
libarchive/test/test_write_format_xar.c
libarchive/test/test_write_format_xar_empty.c
libarchive/test/test_write_format_xar_fflags.c
libarchive/test/test_write_format_zip_windows_path.c
libarchive/test/test_write_format_zip_zip64.c