]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Fix test_option_older_than failure on linux.
authorMichihiro NAKAJIMA <ggcueroad@gmail.com>
Wed, 3 Oct 2012 06:50:47 +0000 (15:50 +0900)
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>
Wed, 3 Oct 2012 06:50:47 +0000 (15:50 +0900)
 - 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.

tar/test/test_option_newer_than.c
tar/test/test_option_older_than.c

index c9432dcb5f75823501cd9b6616438634feaacbde..2a5fe04e6968345da5df85f584bb9a9a017262a1 100644 (file)
@@ -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. */
index 1313aed5575b9147ef4847e7edf2993923059ff9..4bdd2edfe0bd5e89f2efbd2c6c3ed1549d771335 100644 (file)
@@ -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. */