]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Remove all compiling condition of ZLIB and BZLIB2
authorMichihiro NAKAJIMA <ggcueroad@gmail.com>
Tue, 17 Feb 2009 07:43:15 +0000 (02:43 -0500)
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>
Tue, 17 Feb 2009 07:43:15 +0000 (02:43 -0500)
from libarchive_test.

SVN-Revision: 653

14 files changed:
libarchive/test/test_compat_bzip2.c
libarchive/test/test_compat_gzip.c
libarchive/test/test_compat_zip.c
libarchive/test/test_fuzz.c
libarchive/test/test_read_format_cpio_bin_bz2.c
libarchive/test/test_read_format_cpio_bin_gz.c
libarchive/test/test_read_format_cpio_bin_xz.c
libarchive/test/test_read_format_cpio_svr4_gzip.c
libarchive/test/test_read_format_gtar_gz.c
libarchive/test/test_read_format_iso_gz.c
libarchive/test/test_read_format_pax_bz2.c
libarchive/test/test_read_format_tbz.c
libarchive/test/test_read_format_tgz.c
libarchive/test/test_read_format_zip.c

index 143d923c489fc37067d014cd247f569713853912..05a5f619577325c1d5bde2f465cc2e45872ad135 100644 (file)
@@ -55,6 +55,15 @@ compat_bzip2(const char *name)
        /* Read entries, match up names with list above. */
        for (i = 0; i < 6; ++i) {
                r = archive_read_next_header(a, &ae);
+               if (r != ARCHIVE_OK) {
+                       if (strcmp(archive_error_string(a),
+                           "Unrecognized archive format") == 0) {
+                               skipping("Skipping BZIP2 compression check: "
+                                       "This version of libarchive was compiled "
+                                   "without bzip2 support");
+                               goto finish;
+                       }
+               }
                failure("Could not read file %d (%s) from %s", i, n[i], name);
                assertEqualIntA(a, ARCHIVE_OK, r);
                if (r != ARCHIVE_OK) {
@@ -72,6 +81,7 @@ compat_bzip2(const char *name)
        assertEqualInt(archive_format(a), ARCHIVE_FORMAT_TAR_USTAR);
 
        assertEqualInt(ARCHIVE_OK, archive_read_close(a));
+finish:
 #if ARCHIVE_VERSION_NUMBER < 2000000
        archive_read_finish(a);
 #else
@@ -82,12 +92,8 @@ compat_bzip2(const char *name)
 
 DEFINE_TEST(test_compat_bzip2)
 {
-#if HAVE_BZLIB_H
        compat_bzip2("test_compat_bzip2_1.tbz");
        compat_bzip2("test_compat_bzip2_2.tbz");
-#else
-       skipping("Need bzlib");
-#endif
 }
 
 
index b1d9be3ea2354fabe5f69b9483a3a60c9e95c653..dc7a520c5c81872442bbfd0016c492135815821d 100644 (file)
@@ -55,6 +55,15 @@ verify(const char *name)
        /* Read entries, match up names with list above. */
        for (i = 0; i < 6; ++i) {
                r = archive_read_next_header(a, &ae);
+               if (r != ARCHIVE_OK) {
+                       if (strcmp(archive_error_string(a),
+                           "Unrecognized archive format") == 0) {
+                               skipping("Skipping GZIP compression check: "
+                                       "This version of libarchive was compiled "
+                                   "without gzip support");
+                               goto finish;
+                       }
+               }
                failure("Could not read file %d (%s) from %s", i, n[i], name);
                assertEqualIntA(a, ARCHIVE_OK, r);
                if (r != ARCHIVE_OK) {
@@ -72,6 +81,7 @@ verify(const char *name)
        assertEqualInt(archive_format(a), ARCHIVE_FORMAT_TAR_USTAR);
 
        assertEqualInt(ARCHIVE_OK, archive_read_close(a));
+finish:
 #if ARCHIVE_VERSION_NUMBER < 2000000
        archive_read_finish(a);
 #else
@@ -82,7 +92,6 @@ verify(const char *name)
 
 DEFINE_TEST(test_compat_gzip)
 {
-#if HAVE_ZLIB_H
        /* This sample has been 'split', each piece compressed separately,
         * then concatenated.  Gunzip will emit the concatenated result. */
        /* Not supported in libarchive 2.6 and earlier */
@@ -90,9 +99,6 @@ DEFINE_TEST(test_compat_gzip)
        /* This sample has been compressed as a single stream, but then
         * some unrelated garbage text has been appended to the end. */
        verify("test_compat_gzip_2.tgz");
-#else
-       skipping("Need zlib");
-#endif
 }
 
 
index f46a79732bde505dc9061da5a0e73de402f1c3d0..5cb84a049e791db2084a457fb1a192b2d025cb09 100644 (file)
@@ -32,6 +32,7 @@ test_compat_zip_1(void)
        char name[] = "test_compat_zip_1.zip";
        struct archive_entry *ae;
        struct archive *a;
+       int r;
 
        assert((a = archive_read_new()) != NULL);
        assertEqualIntA(a, ARCHIVE_OK, archive_read_support_compression_all(a));
@@ -44,7 +45,16 @@ test_compat_zip_1(void)
        assertEqualString("META-INF/MANIFEST.MF", archive_entry_pathname(ae));
 
        /* Read second entry. */
-       assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
+       r = archive_read_next_header(a, &ae);
+       if (r != ARCHIVE_OK) {
+               if (strcmp(archive_error_string(a),
+                   "libarchive compiled without deflate support (no libz)") == 0) {
+                       skipping("Skipping ZIP compression check: %s",
+                           archive_error_string(a));
+                       goto finish;
+               }
+       }
+       assertEqualIntA(a, ARCHIVE_OK, r);
        assertEqualString("tmp.class", archive_entry_pathname(ae));
 
        assertEqualIntA(a, ARCHIVE_EOF, archive_read_next_header(a, &ae));
@@ -53,6 +63,7 @@ test_compat_zip_1(void)
        assertEqualInt(archive_format(a), ARCHIVE_FORMAT_ZIP);
 
        assertEqualInt(ARCHIVE_OK, archive_read_close(a));
+finish:
 #if ARCHIVE_VERSION_NUMBER < 2000000
        archive_read_finish(a);
 #else
@@ -63,11 +74,7 @@ test_compat_zip_1(void)
 
 DEFINE_TEST(test_compat_zip)
 {
-#if HAVE_ZLIB_H
        test_compat_zip_1();
-#else
-       skipping("Need zlib");
-#endif
 }
 
 
index 5aa0538249068b9ec99da21ca3f145d706dfb6e9..a560a30441e0fb8479653362d03957af809c7046 100644 (file)
@@ -51,19 +51,13 @@ __FBSDID("$FreeBSD: src/lib/libarchive/test/test_fuzz.c,v 1.1 2008/12/06 07:08:0
 static const char *
 files[] = {
        "test_fuzz_1.iso",
-#if HAVE_BZLIB_H
        "test_compat_bzip2_1.tbz",
-#endif
        "test_compat_gtar_1.tar",
        "test_compat_tar_hardlink_1.tar",
-#if HAVE_ZLIB_H
        "test_compat_zip_1.zip",
-#endif
        "test_read_format_gtar_sparse_1_17_posix10_modified.tar",
        "test_read_format_tar_empty_filename.tar",
-#if HAVE_ZLIB_H
        "test_read_format_zip.zip",
-#endif
        NULL
 };
 
@@ -72,9 +66,11 @@ DEFINE_TEST(test_fuzz)
        const char **filep;
 
        for (filep = files; *filep != NULL; ++filep) {
+               struct archive_entry *ae;
+               struct archive *a;
                char *rawimage, *image;
                size_t size;
-               int i;
+               int i, r;
 
                extract_reference_file(*filep);
                rawimage = slurpfile(&size, *filep);
@@ -83,9 +79,40 @@ DEFINE_TEST(test_fuzz)
                assert(image != NULL);
                srand(time(NULL));
 
+               assert((a = archive_read_new()) != NULL);
+               assert(0 == archive_read_support_compression_all(a));
+               assert(0 == archive_read_support_format_all(a));
+               assert(0 == archive_read_open_memory(a, rawimage, size));
+               r = archive_read_next_header(a, &ae);
+               if (r != ARCHIVE_OK) {
+                       if (strcmp(archive_error_string(a),
+                           "Unrecognized archive format") == 0) {
+                               skipping("Skipping GZIP/BZIP2 compression check: "
+                                   "This version of libarchive was compiled "
+                                   "without gzip/bzip2 support");
+                               assert(0 == archive_read_close(a));
+                               assert(0 == archive_read_finish(a));
+                               continue;
+                       }
+               } else {
+                       char buff[20];
+
+                       r = archive_read_data(a, buff, 19);
+                       if (r < ARCHIVE_OK) {
+                               if (strcmp(archive_error_string(a),
+                                   "libarchive compiled without deflate support (no libz)") == 0) {
+                                       skipping("Skipping ZIP compression check: %s",
+                                           archive_error_string(a));
+                                       assert(0 == archive_read_close(a));
+                                       assert(0 == archive_read_finish(a));
+                                       continue;
+                               }
+                       }
+               }
+               assert(0 == archive_read_close(a));
+               assert(0 == archive_read_finish(a));
+
                for (i = 0; i < 100; ++i) {
-                       struct archive_entry *ae;
-                       struct archive *a;
                        int j, fd, numbytes;
 
                        /* Fuzz < 1% of the bytes in the archive. */
index 05801c4388c8ab6eb68eb0dad97fd53bc0558792..176533ff18bdd0118b7b24e13e116d32a284fdfd 100644 (file)
@@ -34,27 +34,36 @@ static unsigned char archive[] = {
 
 DEFINE_TEST(test_read_format_cpio_bin_bz2)
 {
-#if HAVE_BZLIB_H
        struct archive_entry *ae;
        struct archive *a;
+       int r;
+
        assert((a = archive_read_new()) != NULL);
        assertEqualIntA(a, ARCHIVE_OK,
            archive_read_support_compression_all(a));
        assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a));
        assertEqualIntA(a, ARCHIVE_OK,
            archive_read_open_memory(a, archive, sizeof(archive)));
-       assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
+       r = archive_read_next_header(a, &ae);
+       if (r != ARCHIVE_OK) {
+               if (strcmp(archive_error_string(a),
+                   "Unrecognized archive format") == 0) {
+                       skipping("Skipping BZ2 compression check: "
+                           "This version of libarchive was compiled "
+                           "without bz2 support");
+                       goto finish;
+               }
+       }
+       assertEqualIntA(a, ARCHIVE_OK, r);
        assert(archive_compression(a) == ARCHIVE_COMPRESSION_BZIP2);
        assert(archive_format(a) == ARCHIVE_FORMAT_CPIO_BIN_LE);
        assert(0 == archive_read_close(a));
+finish:
 #if ARCHIVE_VERSION_NUMBER < 2000000
        archive_read_finish(a);
 #else
        assert(0 == archive_read_finish(a));
 #endif
-#else
-       skipping("Need bzlib");
-#endif
 }
 
 
index 35ba29b92c6c4ccbf9368987cf74215a339ecddf..c0e65bebe9a1374fc7b93de3a98be72bb8ec8436 100644 (file)
@@ -33,25 +33,35 @@ static unsigned char archive[] = {
 
 DEFINE_TEST(test_read_format_cpio_bin_gz)
 {
-#if HAVE_ZLIB_H
        struct archive_entry *ae;
        struct archive *a;
+       int r;
+
        assert((a = archive_read_new()) != NULL);
        assert(0 == archive_read_support_compression_all(a));
        assert(0 == archive_read_support_format_all(a));
        assert(0 == archive_read_open_memory(a, archive, sizeof(archive)));
-       assert(0 == archive_read_next_header(a, &ae));
+       r = archive_read_next_header(a, &ae);
+       if (r != ARCHIVE_OK) {
+               /* TODO: when cpio really broken */
+               if (strcmp(archive_error_string(a),
+                   "Unrecognized archive format") == 0) {
+                       skipping("Skipping GZIP compression check: "
+                           "This version of libarchive was compiled "
+                           "without gzip support");
+                       goto finish;
+               }
+       }
+       assert(0 == r);
        assert(archive_compression(a) == ARCHIVE_COMPRESSION_GZIP);
        assert(archive_format(a) == ARCHIVE_FORMAT_CPIO_BIN_LE);
        assert(0 == archive_read_close(a));
+finish:
 #if ARCHIVE_VERSION_NUMBER < 2000000
        archive_read_finish(a);
 #else
        assert(0 == archive_read_finish(a));
 #endif
-#else
-       skipping("Need zlib");
-#endif
 }
 
 
index f994adeb42b11ab7fb0efe56086cdc2b0fc250ba..bbf57cfc6054016328bc2ec8317de39743edbd7a 100644 (file)
@@ -61,8 +61,7 @@ DEFINE_TEST(test_read_format_cpio_bin_xz)
                    "Unrecognized archive format") == 0) {
                        skipping("Skipping XZ compression check: "
                            "This version of libarchive was compiled "
-                           "without xz support",
-                           archive_error_string(a));
+                           "without xz support");
                        goto finish;
                }
        }
index a232c9e9098e6f77d176b6d0270c746f232b73f2..88a7b054716737f3f2a9648d946a4516bef3d120 100644 (file)
@@ -34,25 +34,34 @@ static unsigned char archive[] = {
 
 DEFINE_TEST(test_read_format_cpio_svr4_gzip)
 {
-#if HAVE_ZLIB_H
        struct archive_entry *ae;
        struct archive *a;
+       int r;
+
        assert((a = archive_read_new()) != NULL);
        assert(0 == archive_read_support_compression_all(a));
        assert(0 == archive_read_support_format_all(a));
        assert(0 == archive_read_open_memory(a, archive, sizeof(archive)));
-       assert(0 == archive_read_next_header(a, &ae));
+       r = archive_read_next_header(a, &ae);
+       if (r != ARCHIVE_OK) {
+               if (strcmp(archive_error_string(a),
+                   "Unrecognized archive format") == 0) {
+                       skipping("Skipping GZIP compression check: "
+                           "This version of libarchive was compiled "
+                           "without gzip support");
+                       goto finish;
+               }
+       }
+       assert(0 == r);
        assert(archive_compression(a) == ARCHIVE_COMPRESSION_GZIP);
        assert(archive_format(a) == ARCHIVE_FORMAT_CPIO_SVR4_NOCRC);
        assert(0 == archive_read_close(a));
+finish:
 #if ARCHIVE_VERSION_NUMBER < 2000000
        archive_read_finish(a);
 #else
        assert(0 == archive_read_finish(a));
 #endif
-#else
-       skipping("Need zlib");
-#endif
 }
 
 
index 61aa395b89afb9f9b99cd2d072c885d820997dc4..c410757895003cc9eff2a3b562427cf9d204febf 100644 (file)
@@ -34,25 +34,34 @@ static unsigned char archive[] = {
 
 DEFINE_TEST(test_read_format_gtar_gz)
 {
-#if HAVE_ZLIB_H
        struct archive_entry *ae;
        struct archive *a;
+       int r;
+
        assert((a = archive_read_new()) != NULL);
        assert(0 == archive_read_support_compression_all(a));
        assert(0 == archive_read_support_format_all(a));
        assert(0 == archive_read_open_memory(a, archive, sizeof(archive)));
-       assert(0 == archive_read_next_header(a, &ae));
+       r = archive_read_next_header(a, &ae);
+       if (r != ARCHIVE_OK) {
+               if (strcmp(archive_error_string(a),
+                   "Unrecognized archive format") == 0) {
+                       skipping("Skipping GZIP compression check: "
+                           "This version of libarchive was compiled "
+                           "without gzip support");
+                       goto finish;
+               }
+       }
+       assert(0 == r);
        assert(archive_compression(a) == ARCHIVE_COMPRESSION_GZIP);
        assert(archive_format(a) == ARCHIVE_FORMAT_TAR_GNUTAR);
        assert(0 == archive_read_close(a));
+finish:
 #if ARCHIVE_VERSION_NUMBER < 2000000
        archive_read_finish(a);
 #else
        assert(0 == archive_read_finish(a));
 #endif
-#else
-       skipping("Need zlib");
-#endif
 }
 
 
index 7303d5b2aaf0a3ddcf58633850414a6953f662d7..5c085170ba981a7e8790cbcd1da409f1506de701 100644 (file)
@@ -53,9 +53,10 @@ static unsigned char archive[] = {
 
 DEFINE_TEST(test_read_format_iso_gz)
 {
-#if HAVE_ZLIB_H
        struct archive_entry *ae;
        struct archive *a;
+       int r;
+
        assert((a = archive_read_new()) != NULL);
        assertEqualIntA(a, ARCHIVE_OK,
            archive_read_support_compression_all(a));
@@ -63,18 +64,26 @@ DEFINE_TEST(test_read_format_iso_gz)
            archive_read_support_format_all(a));
        assertEqualIntA(a, ARCHIVE_OK,
            archive_read_open_memory(a, archive, sizeof(archive)));
-       assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
+       r = archive_read_next_header(a, &ae);
+       if (r != ARCHIVE_OK) {
+               if (strcmp(archive_error_string(a),
+                   "Unrecognized archive format") == 0) {
+                       skipping("Skipping GZIP compression check: "
+                           "This version of libarchive was compiled "
+                           "without gzip support");
+                       goto finish;
+               }
+       }
+       assertEqualIntA(a, ARCHIVE_OK, r);
        assertEqualInt(archive_compression(a), ARCHIVE_COMPRESSION_GZIP);
        assertEqualInt(archive_format(a), ARCHIVE_FORMAT_ISO9660);
        assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a));
+finish:
 #if ARCHIVE_VERSION_NUMBER < 2000000
        archive_read_finish(a);
 #else
        assertEqualInt(ARCHIVE_OK, archive_read_finish(a));
 #endif
-#else
-       skipping("Need zlib");
-#endif
 }
 
 
index 62f0467512fd21d5f5dc87551e7eb25a591fd5bf..9acc0db5f6cb8eb4f0030e4bde87bff313dbafba 100644 (file)
@@ -42,25 +42,34 @@ static unsigned char archive[] = {
 
 DEFINE_TEST(test_read_format_pax_bz2)
 {
-#if HAVE_BZLIB_H
        struct archive_entry *ae;
        struct archive *a;
+       int r;
+
        assert((a = archive_read_new()) != NULL);
        assert(0 == archive_read_support_compression_all(a));
        assert(0 == archive_read_support_format_all(a));
        assert(0 == archive_read_open_memory(a, archive, sizeof(archive)));
-       assert(0 == archive_read_next_header(a, &ae));
+       r = archive_read_next_header(a, &ae);
+       if (r != ARCHIVE_OK) {
+               if (strcmp(archive_error_string(a),
+                   "Unrecognized archive format") == 0) {
+                       skipping("Skipping BZIP2 compression check: "
+                           "This version of libarchive was compiled "
+                           "without bzip2 support");
+                       goto finish;
+               }
+       }
+       assert(0 == r);
        assert(archive_compression(a) == ARCHIVE_COMPRESSION_BZIP2);
        assert(archive_format(a) == ARCHIVE_FORMAT_TAR_PAX_INTERCHANGE);
        assert(0 == archive_read_close(a));
+finish:
 #if ARCHIVE_VERSION_NUMBER < 2000000
        archive_read_finish(a);
 #else
        assert(0 == archive_read_finish(a));
 #endif
-#else
-       skipping("Need bzlib");
-#endif
 }
 
 
index ef85e8e6b8661f9f48efa6e24769c983cb8eeb30..995df069182415a974b36a8448f052323896b5e9 100644 (file)
@@ -35,25 +35,34 @@ static unsigned char archive[] = {
 
 DEFINE_TEST(test_read_format_tbz)
 {
-#if HAVE_BZLIB_H
        struct archive_entry *ae;
        struct archive *a;
+       int r;
+
        assert((a = archive_read_new()) != NULL);
        assert(0 == archive_read_support_compression_all(a));
        assert(0 == archive_read_support_format_all(a));
        assert(0 == archive_read_open_memory(a, archive, sizeof(archive)));
-       assert(0 == archive_read_next_header(a, &ae));
+       r = archive_read_next_header(a, &ae);
+       if (r != ARCHIVE_OK) {
+               if (strcmp(archive_error_string(a),
+                   "Unrecognized archive format") == 0) {
+                       skipping("Skipping BZIP2 compression check: "
+                           "This version of libarchive was compiled "
+                           "without bzip2 support");
+                       goto finish;
+               }
+       }
+       assert(0 == r);
        assert(archive_compression(a) == ARCHIVE_COMPRESSION_BZIP2);
        assert(archive_format(a) == ARCHIVE_FORMAT_TAR_USTAR);
        assert(0 == archive_read_close(a));
+finish:
 #if ARCHIVE_VERSION_NUMBER < 2000000
        archive_read_finish(a);
 #else
        assert(0 == archive_read_finish(a));
 #endif
-#else
-       skipping("Need bzlib");
-#endif
 }
 
 
index 33c5028d34f276715e2b320b932030df68983a74..986ab492373b61def3ae43522cb72be5058dd7e8 100644 (file)
@@ -34,25 +34,34 @@ static unsigned char archive[] = {
 
 DEFINE_TEST(test_read_format_tgz)
 {
-#if HAVE_ZLIB_H
        struct archive_entry *ae;
        struct archive *a;
+       int r;
+
        assert((a = archive_read_new()) != NULL);
        assert(0 == archive_read_support_compression_all(a));
        assert(0 == archive_read_support_format_all(a));
        assert(0 == archive_read_open_memory(a, archive, sizeof(archive)));
-       assert(0 == archive_read_next_header(a, &ae));
+       r = archive_read_next_header(a, &ae);
+       if (r != ARCHIVE_OK) {
+               if (strcmp(archive_error_string(a),
+                   "Unrecognized archive format") == 0) {
+                       skipping("Skipping GZIP compression check: "
+                           "This version of libarchive was compiled "
+                           "without gzip support");
+                       goto finish;
+               }
+       }
+       assert(0 == r);
        assert(archive_compression(a) == ARCHIVE_COMPRESSION_GZIP);
        assert(archive_format(a) == ARCHIVE_FORMAT_TAR_USTAR);
        assert(0 == archive_read_close(a));
+finish:
 #if ARCHIVE_VERSION_NUMBER < 2000000
        archive_read_finish(a);
 #else
        assert(0 == archive_read_finish(a));
 #endif
-#else
-       skipping("Need zlib");
-#endif
 }
 
 
index 8ba38ee2ba293f9e65c907fa4358094b46af86a7..97ad88e3bdd7ce16ac08540398b2720132be710a 100644 (file)
@@ -33,7 +33,6 @@ __FBSDID("$FreeBSD: src/lib/libarchive/test/test_read_format_zip.c,v 1.8 2008/10
 
 DEFINE_TEST(test_read_format_zip)
 {
-#if HAVE_ZLIB_H
        const char *refname = "test_read_format_zip.zip";
        struct archive_entry *ae;
        struct archive *a;
@@ -41,6 +40,7 @@ DEFINE_TEST(test_read_format_zip)
        const void *pv;
        size_t s;
        off_t o;
+       int r;
 
        extract_reference_file(refname);
        assert((a = archive_read_new()) != NULL);
@@ -59,7 +59,16 @@ DEFINE_TEST(test_read_format_zip)
        assertEqualInt(1179604289, archive_entry_mtime(ae));
        assertEqualInt(18, archive_entry_size(ae));
        failure("archive_read_data() returns number of bytes read");
-       assertEqualInt(18, archive_read_data(a, buff, 19));
+       r = archive_read_data(a, buff, 19);
+       if (r < ARCHIVE_OK) {
+               if (strcmp(archive_error_string(a),
+                   "libarchive compiled without deflate support (no libz)") == 0) {
+                       skipping("Skipping ZIP compression check: %s",
+                           archive_error_string(a));
+                       goto finish;
+               }
+       }
+       assertEqualInt(18, r);
        assert(0 == memcmp(buff, "hello\nhello\nhello\n", 18));
        assertA(0 == archive_read_next_header(a, &ae));
        assertEqualString("file2", archive_entry_pathname(ae));
@@ -72,15 +81,12 @@ DEFINE_TEST(test_read_format_zip)
        assertA(archive_compression(a) == ARCHIVE_COMPRESSION_NONE);
        assertA(archive_format(a) == ARCHIVE_FORMAT_ZIP);
        assert(0 == archive_read_close(a));
-
+finish:
 #if ARCHIVE_VERSION_NUMBER < 2000000
        archive_read_finish(a);
 #else
        assert(0 == archive_read_finish(a));
 #endif
-#else
-       skipping("Need zlib");
-#endif
 }