From: Michihiro NAKAJIMA Date: Wed, 3 Oct 2012 06:50:47 +0000 (+0900) Subject: Fix test_option_older_than failure on linux. X-Git-Tag: v3.1.0~40^2~117 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5d8ad5bbea92aa3fe6dfb1b7ab59ea1c468167b8;p=thirdparty%2Flibarchive.git Fix test_option_older_than failure on linux. - Use pax format in test_option_older_than and test_option_newer_than to make sure the nano second of a file time is recorded. --- diff --git a/tar/test/test_option_newer_than.c b/tar/test/test_option_newer_than.c index c9432dcb5..2a5fe04e6 100644 --- a/tar/test/test_option_newer_than.c +++ b/tar/test/test_option_newer_than.c @@ -48,8 +48,11 @@ DEFINE_TEST(test_option_newer_than) assertMakeFile("a/b/new.txt", 0644, "new file in old directory"); /* Test --newer-than on create */ - assertEqualInt(0, systemf("%s -cf ../test1.tar --newer-than middle.txt *.txt a", testprog)); - assertEqualInt(0, systemf("%s -cf ../test2.tar *.txt a", testprog)); + assertEqualInt(0, + systemf("%s --format pax -cf ../test1.tar " + "--newer-than middle.txt *.txt a", testprog)); + assertEqualInt(0, + systemf("%s --format pax -cf ../test2.tar *.txt a", testprog)); assertChdir(".."); /* Extract test1.tar to a clean dir and verify what got archived. */ diff --git a/tar/test/test_option_older_than.c b/tar/test/test_option_older_than.c index 1313aed55..4bdd2edfe 100644 --- a/tar/test/test_option_older_than.c +++ b/tar/test/test_option_older_than.c @@ -51,9 +51,12 @@ DEFINE_TEST(test_option_older_than) /* Test --older-than on create */ assertEqualInt(0, - systemf("%s -cf ../test1.tar --older-than middle.txt *.txt a", + systemf("%s --format pax -cf ../test1.tar " + "--older-than middle.txt *.txt a", + testprog)); + assertEqualInt(0, + systemf("%s --format pax -cf ../test2.tar *.txt a", testprog)); - assertEqualInt(0, systemf("%s -cf ../test2.tar *.txt a", testprog)); assertChdir(".."); /* Extract test1.tar to a clean dir and verify what got archived. */