aboutsummaryrefslogtreecommitdiffstats
path: root/cpio/test/test_format_newc.c
diff options
context:
space:
mode:
authorMartin Matuska <mm@FreeBSD.org>2020-02-11 23:48:03 +0000
committerMartin Matuska <mm@FreeBSD.org>2020-02-11 23:48:03 +0000
commit8185c4ae244f9a52ad987b36e7d6300500054d00 (patch)
tree11e2d7cd0caf20998ed1e1146e1c1d7fc747165e /cpio/test/test_format_newc.c
parent98c1f51f769841d99d879099f9075ff60d51ee4a (diff)
downloadsrc-8185c4ae244f9a52ad987b36e7d6300500054d00.tar.gz
src-8185c4ae244f9a52ad987b36e7d6300500054d00.zip
Update vendor/libarchive/dist to git 3288ebb0353beb51dfb09d444dedbe9235ead53dvendor/libarchive/3.4.2
Libarchive 3.4.2 Relevant vendor changes: PR #1289: atomic extraction support (bsdtar -x --safe-writes) PR #1308: big endian fix for UTF16 support in LHA reader PR #1326: reject RAR5 files that declare invalid header flags Issue #987: fix support 7z archive entries with Delta filter Issue #1317: fix compression output buffer handling in XAR writer Issue #1319: fix uname or gname longer than 32 characters in pax writer Issue #1325: fix use after free when archiving hardlinks in ISO9660 or XAR Use localtime_r() and gmtime_r() instead of localtime() and gmtime()
Notes
Notes: svn path=/vendor/libarchive/dist/; revision=357783 svn path=/vendor/libarchive/3.4.2/; revision=357784; tag=vendor/libarchive/3.4.2
Diffstat (limited to 'cpio/test/test_format_newc.c')
-rw-r--r--cpio/test/test_format_newc.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/cpio/test/test_format_newc.c b/cpio/test/test_format_newc.c
index 6c981f6ac139..49387a73580b 100644
--- a/cpio/test/test_format_newc.c
+++ b/cpio/test/test_format_newc.c
@@ -205,9 +205,11 @@ DEFINE_TEST(test_format_newc)
gid = from_hex(e + 30, 8); /* gid */
assertEqualMem(e + 38, "00000003", 8); /* nlink */
t = from_hex(e + 46, 8); /* mtime */
- failure("t=0x%08x now=0x%08x=%d", t, now, now);
+ failure("t=%#08jx now=%#08jx=%jd", (intmax_t)t, (intmax_t)now,
+ (intmax_t)now);
assert(t <= now); /* File wasn't created in future. */
- failure("t=0x%08x now - 2=0x%08x = %d", t, now - 2, now - 2);
+ failure("t=%#08jx now - 2=%#08jx=%jd", (intmax_t)t, (intmax_t)now - 2,
+ (intmax_t)now - 2);
assert(t >= now - 2); /* File was created w/in last 2 secs. */
failure("newc format stores body only with last appearance of a link\n"
" first appearance should be empty, so this file size\n"
@@ -243,7 +245,8 @@ DEFINE_TEST(test_format_newc)
assertEqualInt(gid, from_hex(e + 30, 8)); /* gid */
assertEqualMem(e + 38, "00000001", 8); /* nlink */
t2 = from_hex(e + 46, 8); /* mtime */
- failure("First entry created at t=0x%08x this entry created at t2=0x%08x", t, t2);
+ failure("First entry created at t=%#08jx this entry created"
+ " at t2=%#08jx", (intmax_t)t, (intmax_t)t2);
assert(t2 == t || t2 == t + 1); /* Almost same as first entry. */
assertEqualMem(e + 54, "00000005", 8); /* File size */
fs = from_hex(e + 54, 8);
@@ -278,7 +281,8 @@ DEFINE_TEST(test_format_newc)
assertEqualInt(nlinks("dir"), from_hex(e + 38, 8)); /* nlinks */
#endif
t2 = from_hex(e + 46, 8); /* mtime */
- failure("First entry created at t=0x%08x this entry created at t2=0x%08x", t, t2);
+ failure("First entry created at t=%#08jx this entry created at"
+ "t2=%#08jx", (intmax_t)t, (intmax_t)t2);
assert(t2 == t || t2 == t + 1); /* Almost same as first entry. */
assertEqualMem(e + 54, "00000000", 8); /* File size */
fs = from_hex(e + 54, 8);
@@ -311,7 +315,8 @@ DEFINE_TEST(test_format_newc)
assertEqualInt(gid, from_hex(e + 30, 8)); /* gid */
assertEqualMem(e + 38, "00000003", 8); /* nlink */
t2 = from_hex(e + 46, 8); /* mtime */
- failure("First entry created at t=0x%08x this entry created at t2=0x%08x", t, t2);
+ failure("First entry created at t=%#08jx this entry created at"
+ "t2=%#08jx", (intmax_t)t, (intmax_t)t2);
assert(t2 == t || t2 == t + 1); /* Almost same as first entry. */
assertEqualInt(10, from_hex(e + 54, 8)); /* File size */
fs = from_hex(e + 54, 8);