From 23fb0d7a7c1a14467ac1f4c24e171cf047f206c2 Mon Sep 17 00:00:00 2001 From: Tim Kientzle Date: Sat, 6 Dec 2008 05:58:24 +0000 Subject: [PATCH] Recover from a test failure here. --- lib/libarchive/test/test_read_format_gtar_sparse.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/libarchive/test/test_read_format_gtar_sparse.c b/lib/libarchive/test/test_read_format_gtar_sparse.c index 2c4a7e3cbda2..f35ccc103264 100644 --- a/lib/libarchive/test/test_read_format_gtar_sparse.c +++ b/lib/libarchive/test/test_read_format_gtar_sparse.c @@ -201,7 +201,10 @@ verify_archive_file(const char *name, struct archive_contents *ac) while (ac->filename != NULL) { struct contents *cts = ac->contents; - assertEqualIntA(a, 0, archive_read_next_header(a, &ae)); + if (!assertEqualIntA(a, 0, archive_read_next_header(a, &ae))) { + assert(0 == archive_read_finish(a)); + return; + } failure("Name mismatch in archive %s", name); assertEqualString(ac->filename, archive_entry_pathname(ae));