From 3298e4564489e96568f5c00cf25be7d61d73a59c Mon Sep 17 00:00:00 2001 From: Tim Kientzle Date: Wed, 18 Jun 2008 17:15:25 -0400 Subject: [PATCH] Use times at least a full 24 hours after the Epoch for testing. In particular, this should fix tests on systems that lack timegm(), whose mktime() cannot handle times prior to the Epoch, when run in timezones with negative offsets from GMT. SVN-Revision: 131 --- libarchive/test/test_read_format_isorr_bz2.c | 24 ++++++------ .../test_read_format_isorr_bz2.iso.bz2.uu | 38 +++++++++---------- 2 files changed, 31 insertions(+), 31 deletions(-) diff --git a/libarchive/test/test_read_format_isorr_bz2.c b/libarchive/test/test_read_format_isorr_bz2.c index 1a0417881..e083af6e9 100644 --- a/libarchive/test/test_read_format_isorr_bz2.c +++ b/libarchive/test/test_read_format_isorr_bz2.c @@ -35,8 +35,8 @@ mkdir /tmp/iso/dir echo "hello" >/tmp/iso/file ln /tmp/iso/file /tmp/iso/hardlink (cd /tmp/iso; ln -s file symlink) -TZ=utc touch -afhm -t 197001010000.01 /tmp/iso /tmp/iso/file /tmp/iso/dir -TZ=utc touch -afhm -t 196912312359.58 /tmp/iso/symlink +TZ=utc touch -afhm -t 197001020000.01 /tmp/iso /tmp/iso/file /tmp/iso/dir +TZ=utc touch -afhm -t 197001030000.02 /tmp/iso/symlink mkhybrid -R -uid 1 -gid 2 /tmp/iso | bzip2 > test_read_format_isorr_bz2.iso.bz2 F=test_read_format_isorr_bz2.iso.bz2 uuencode $F $F > $F.uu @@ -63,9 +63,9 @@ DEFINE_TEST(test_read_format_isorr_bz2) assertEqualString(".", archive_entry_pathname(ae)); assert(S_ISDIR(archive_entry_stat(ae)->st_mode)); assertEqualInt(2048, archive_entry_size(ae)); - assertEqualInt(1, archive_entry_mtime(ae)); + assertEqualInt(86401, archive_entry_mtime(ae)); assertEqualInt(0, archive_entry_mtime_nsec(ae)); - assertEqualInt(1, archive_entry_ctime(ae)); + assertEqualInt(86401, archive_entry_ctime(ae)); assertEqualInt(0, archive_entry_stat(ae)->st_nlink); assertEqualInt(0, archive_entry_uid(ae)); assertEqualIntA(a, ARCHIVE_EOF, @@ -77,8 +77,8 @@ DEFINE_TEST(test_read_format_isorr_bz2) assertEqualString("dir", archive_entry_pathname(ae)); assert(S_ISDIR(archive_entry_stat(ae)->st_mode)); assertEqualInt(2048, archive_entry_size(ae)); - assertEqualInt(1, archive_entry_mtime(ae)); - assertEqualInt(1, archive_entry_atime(ae)); + assertEqualInt(86401, archive_entry_mtime(ae)); + assertEqualInt(86401, archive_entry_atime(ae)); assertEqualInt(2, archive_entry_stat(ae)->st_nlink); assertEqualInt(1, archive_entry_uid(ae)); assertEqualInt(2, archive_entry_gid(ae)); @@ -92,8 +92,8 @@ DEFINE_TEST(test_read_format_isorr_bz2) assertEqualInt(6, size); assertEqualInt(0, offset); assertEqualInt(0, memcmp(p, "hello\n", 6)); - assertEqualInt(1, archive_entry_mtime(ae)); - assertEqualInt(1, archive_entry_atime(ae)); + assertEqualInt(86401, archive_entry_mtime(ae)); + assertEqualInt(86401, archive_entry_atime(ae)); assertEqualInt(2, archive_entry_stat(ae)->st_nlink); assertEqualInt(1, archive_entry_uid(ae)); assertEqualInt(2, archive_entry_gid(ae)); @@ -104,8 +104,8 @@ DEFINE_TEST(test_read_format_isorr_bz2) assert(S_ISREG(archive_entry_stat(ae)->st_mode)); assertEqualString("file", archive_entry_hardlink(ae)); assertEqualInt(6, archive_entry_size(ae)); - assertEqualInt(1, archive_entry_mtime(ae)); - assertEqualInt(1, archive_entry_atime(ae)); + assertEqualInt(86401, archive_entry_mtime(ae)); + assertEqualInt(86401, archive_entry_atime(ae)); assertEqualInt(2, archive_entry_stat(ae)->st_nlink); assertEqualInt(1, archive_entry_uid(ae)); assertEqualInt(2, archive_entry_gid(ae)); @@ -116,8 +116,8 @@ DEFINE_TEST(test_read_format_isorr_bz2) assert(S_ISLNK(archive_entry_stat(ae)->st_mode)); assertEqualString("file", archive_entry_symlink(ae)); assertEqualInt(0, archive_entry_size(ae)); - assertEqualInt(-2, archive_entry_mtime(ae)); - assertEqualInt(-2, archive_entry_atime(ae)); + assertEqualInt(172802, archive_entry_mtime(ae)); + assertEqualInt(172802, archive_entry_atime(ae)); assertEqualInt(1, archive_entry_stat(ae)->st_nlink); assertEqualInt(1, archive_entry_uid(ae)); assertEqualInt(2, archive_entry_gid(ae)); diff --git a/libarchive/test/test_read_format_isorr_bz2.iso.bz2.uu b/libarchive/test/test_read_format_isorr_bz2.iso.bz2.uu index 6f9bdc433..3f0cfca50 100644 --- a/libarchive/test/test_read_format_isorr_bz2.iso.bz2.uu +++ b/libarchive/test/test_read_format_isorr_bz2.iso.bz2.uu @@ -1,22 +1,22 @@ begin 644 test_read_format_isorr_bz2.iso.bz2 -M0EIH.3%!629369D1H`-#)LB!ZCQ,B&@8@)4R:) -M3S32#5/$TFF@R#0>B8@``#0```-`,1H&TI$0`!H``````````````:`D4H$# -M0``#0&@``#0```T````",1CJ-5#(?9Z!&"02F9_)#0+%DT>#A9!^E0)_5(E8 -M-#8VT!*:$?;0KJ$#H8`:XP`2^&"`22KI4`GOPHYT!*0T`)`J9#(-H3`2;3:! -M(0*0TB.U!*"`443'!$=9"X]N52(X=M9%X>?K%,)JY:(3B'1.7CP50TVY("20 -M+]L(Y1/HA1%M-1QR$W&J?%Y/)I7:Z!T10%=-.$!.U\39T@,4PHR00%._@Y`$ -MH5`$="!@-14X*+`+8"2>0*)&.2/$%3,4UN7%-6;#0C;J$/1!10,8%,0C'F`H -MF))HVB#(`P9(<#>`@0;G[%"(ZEL+\N!Q$/0[:H6"2X,].7@US8;^=CYYT_LJ -MU&LQ1;N.#E17MW)GXW\O"S&N?-"*D_%EB0LS`,2F+.YA2C99+$KER#-D$FZ$ -MD;,*EZJ4PT$<0Z:,1,2I-BLHRFFHF9J8XQB5YM>Y!'(Z2A56YCW@H93R#J54 -M)K(N.R',<9Y@^/`3=JDK;6RH93?SN;NEQO^UF9+7,(ZET@,5LF09#?G36AU% -MC6B7VNDC+V;S7LRTA'(Y04A4FL3%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