diff options
author | PJ Fanning <fanningpj@apache.org> | 2024-07-01 23:27:27 +0000 |
---|---|---|
committer | PJ Fanning <fanningpj@apache.org> | 2024-07-01 23:27:27 +0000 |
commit | 96fa957ef57c8c506730155c9e43d86e11feb059 (patch) | |
tree | 625b37b2bd15ad8c48ce679db525763aab68e8bc /poi-integration | |
parent | 66f89c50d61d7fe6361eb85ec3d9af55e73f3e02 (diff) | |
download | poi-96fa957ef57c8c506730155c9e43d86e11feb059.tar.gz poi-96fa957ef57c8c506730155c9e43d86e11feb059.zip |
try to stop poi-integration testing with corrupt file
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1918806 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi-integration')
-rw-r--r-- | poi-integration/src/test/java/org/apache/poi/stress/TestAllFiles.java | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/poi-integration/src/test/java/org/apache/poi/stress/TestAllFiles.java b/poi-integration/src/test/java/org/apache/poi/stress/TestAllFiles.java index c10cf7725e..a6a4480065 100644 --- a/poi-integration/src/test/java/org/apache/poi/stress/TestAllFiles.java +++ b/poi-integration/src/test/java/org/apache/poi/stress/TestAllFiles.java @@ -98,15 +98,12 @@ public class TestAllFiles { "poifs/protected_sha512.xlsx", // corrupt file - "spreadsheet/duplicate-filename.xlsx" + "spreadsheet/duplicate-filename.xlsx", + "document/clusterfuzz-testcase-minimized-POIXWPFFuzzer-5166796835258368.docx", }; // cheap workaround of skipping the few problematic files - public static final String[] SCAN_EXCLUDES_NOSCRATCHPAD = { - "**/.svn/**", - "lost+found", - "**/.git/**", - "**/ExternalEntityInText.docx", //the DocType (DTD) declaration causes this to fail + public static final String[] SCAN_EXCLUDES_NOSCRATCHPAD = concat(SCAN_EXCLUDES, new String[] { "**/right-to-left.xlsx", //the threaded comments in this file cause XSSF clone to fail "document/word2.doc", "document/cpansearch.perl.org_src_tobyink_acme-rundoc-0.001_word-lib_hello_world.docm", @@ -141,17 +138,7 @@ public class TestAllFiles { "spreadsheet/clusterfuzz-testcase-minimized-POIXSSFFuzzer-5089447305609216.xlsx", "spreadsheet/clusterfuzz-testcase-minimized-POIXSSFFuzzer-5089447305609216.xlsx", "spreadsheet/clusterfuzz-testcase-minimized-POIXSSFFuzzer-5089447305609216.xlsx", - - // exclude files failing on windows nodes, because of limited JCE policies - "document/bug53475-password-is-pass.docx", - "poifs/60320-protected.xlsx", - "poifs/protected_sha512.xlsx", - "poifs/60320-protected.xlsx", - "poifs/protected_sha512.xlsx", - - // corrupt file - "spreadsheet/duplicate-filename.xlsx" - }; + }); private static final Set<String> EXPECTED_FAILURES = StressTestUtils.unmodifiableHashSet( "document/truncated62886.docx" @@ -344,4 +331,11 @@ public class TestAllFiles { private static boolean isJava8() { return System.getProperty("java.version").startsWith("1.8"); } + + private static String[] concat(String[] a, String[] b) { + String[] result = new String[a.length + b.length]; + System.arraycopy(a, 0, result, 0, a.length); + System.arraycopy(b, 0, result, a.length, b.length); + return result; + } } |