]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
test: light up the secure746 (hardlink + symlink) tests on Windows
authorDustin L. Howett <dustin@howett.net>
Fri, 26 Jun 2026 14:47:20 +0000 (09:47 -0500)
committerDustin L. Howett <dustin@howett.net>
Sat, 27 Jun 2026 18:44:07 +0000 (13:44 -0500)
libarchive/test/test_write_disk_secure746.c

index 3f0588914707ca38a8b924dfbc4cae8162fd5a05..81f608e78fee69cd13f4e29ec28918c9b0d9f5ad 100644 (file)
@@ -79,12 +79,14 @@ DEFINE_TEST(test_write_disk_secure746a)
  */
 DEFINE_TEST(test_write_disk_secure746b)
 {
-#if defined(_WIN32) && !defined(__CYGWIN__)
-       skipping("archive_write_disk security checks not supported on Windows");
-#else
        struct archive *a;
        struct archive_entry *ae;
 
+       if (!canSymlink()) {
+               skipping("Can't test symlinks on this filesystem");
+               return;
+       }
+
        /* Start with a known umask. */
        assertUmask(UMASK);
 
@@ -123,5 +125,4 @@ DEFINE_TEST(test_write_disk_secure746b)
 
        assertEqualIntA(a, ARCHIVE_FATAL, archive_write_close(a));
        archive_write_free(a);
-#endif
 }