diff options
author | Charles Wilson <cwilso11@gmail.com> | 2009-03-18 22:54:30 -0400 |
---|---|---|
committer | Charles Wilson <cwilso11@gmail.com> | 2009-03-18 22:54:30 -0400 |
commit | bbf42b59e5b2825909a64f584e33a0c96b909593 (patch) | |
tree | 1730c971779b86c4a74f084f8f2bac04e600d216 /cpio/test/test_format_newc.c | |
parent | d9a002feb31b77c8a2a9870461101a27d05c083b (diff) | |
download | libarchive-bbf42b59e5b2825909a64f584e33a0c96b909593.tar.gz |
Issue 15, part 6. Fix test failure on cygwin-1.7.x
In cpio/test/tests.h: new #define to disable certain
tests on cygwin. POSIX does not require that the .nlinks
field be accurate for directories, and as an optimization
newer cygwin does not even try to ensure its accuracy.
Therefore, it is not a failure if wrong; cpio tests should
not verify its value -- at least on cygwin.
cpio/test/test_format_newc.c: Use new #define to skip
.nlinks test.
cpio/test/test_option_c.c: ditto.
SVN-Revision: 802
Diffstat (limited to 'cpio/test/test_format_newc.c')
-rw-r--r-- | cpio/test/test_format_newc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cpio/test/test_format_newc.c b/cpio/test/test_format_newc.c index 1c3ae565..18a6c7bc 100644 --- a/cpio/test/test_format_newc.c +++ b/cpio/test/test_format_newc.c @@ -210,7 +210,9 @@ DEFINE_TEST(test_format_newc) #endif assertEqualInt(from_hex(e + 22, 8), getuid()); /* uid */ assertEqualInt(gid, from_hex(e + 30, 8)); /* gid */ +#ifndef NLINKS_INACCURATE_FOR_DIRS assertEqualMem(e + 38, "00000002", 8); /* nlink */ +#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); assert(t2 == t || t2 == t + 1); /* Almost same as first entry. */ |