[Libreoffice-commits] dev-tools.git: test-bugzilla-files/test-bugzilla-files.py

Michael Stahl Michael.Stahl at cib.de
Tue Jul 3 09:40:22 UTC 2018


 test-bugzilla-files/test-bugzilla-files.py |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d17bde68ba59de4d3d47700dd47723dc605056f7
Author: Michael Stahl <Michael.Stahl at cib.de>
Date:   Tue Jul 3 11:30:17 2018 +0200

    test-bugzilla-files: add a timeout to validator invocation
    
    It so happened that the validator went into an odd sort of infinite loop
    when validating this one file mtp/ooo60405-2-101.odt.
    
    This could not be reproduced when running the validator manually,
    with the same command line that the python.bin process used copied
    out of gdb.
    
    java version "1.8.0_144"
    Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
    Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)
    
    "main" #1 prio=5 os_prio=0 tid=0x00007f927c009000 nid=0x44f1 runnable [0x00007f928565f000]
       java.lang.Thread.State: RUNNABLE
            at com.sun.msv.verifier.regexp.AttributeFeeder.onInterleave(AttributeFeeder.java:156)
            at com.sun.msv.grammar.InterleaveExp.visit(InterleaveExp.java:48)
            at com.sun.msv.verifier.regexp.AttributeFeeder.onInterleave(AttributeFeeder.java:156)
            at com.sun.msv.grammar.InterleaveExp.visit(InterleaveExp.java:48)
            at com.sun.msv.verifier.regexp.AttributeFeeder.onInterleave(AttributeFeeder.java:156)
    [...]
            at com.sun.msv.grammar.InterleaveExp.visit(InterleaveExp.java:48)
            at com.sun.msv.verifier.regexp.AttributeFeeder.onInterleave(AttributeFeeder.java:156)
            at com.sun.msv.grammar.InterleaveExp.visit(InterleaveExp.java:48)
            at com.sun.msv.verifier.regexp.AttributeFeeder.onSequence(AttributeFeede
    r.java:142)
            at com.sun.msv.grammar.SequenceExp.visit(SequenceExp.java:44)
            at com.sun.msv.verifier.regexp.AttributeFeeder.onSequence(AttributeFeeder.java:142)
            at com.sun.msv.grammar.SequenceExp.visit(SequenceExp.java:44)
            at com.sun.msv.verifier.regexp.AttributeFeeder.feed(AttributeFeeder.java:72)
            at com.sun.msv.verifier.regexp.ExpressionAcceptor.onAttribute(ExpressionAcceptor.java:205)
            at com.sun.msv.verifier.regexp.ExpressionAcceptor.onAttribute2(ExpressionAcceptor.java:201)
            at com.sun.msv.verifier.Verifier.feedAttribute(Verifier.java:308)
            at com.sun.msv.verifier.Verifier.startElement(Verifier.java:243)
            at org.xml.sax.helpers.XMLFilterImpl.startElement(XMLFilterImpl.java:551)
            at org.odftoolkit.odfvalidator.NamespaceFilter.startElement(NamespaceFilter.java:79)
            at org.odftoolkit.odfvalidator.ContentFilter.startElement(ContentFilter.java:103)
            at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
            at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
            at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
            at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
            at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
            at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
            at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
            at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
            at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
            at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
            at org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:357)
            at org.iso_relax.verifier.jaxp.validation.ValidatorImpl.validate(ValidatorImpl.java:87)
            at javax.xml.validation.Validator.validate(Validator.java:124)
            at org.odftoolkit.odfvalidator.ODFPackageValidator.validate(ODFPackageValidator.java:264)
    
            at org.odftoolkit.odfvalidator.ODFPackageValidator.validateEntry(ODFPackageValidator.java:235)
            at org.odftoolkit.odfvalidator.ODFPackageValidator.validateEntry(ODFPackageValidator.java:162)
            at org.odftoolkit.odfvalidator.ODFPackageValidator._validate(ODFPackageValidator.java:116)
            at org.odftoolkit.odfvalidator.ODFPackageValidator.validate(ODFPackageValidator.java:81)
            at org.odftoolkit.odfvalidator.ODFValidator.validateFile(ODFValidator.java:163)
            at org.odftoolkit.odfvalidator.ODFValidator.validate(ODFValidator.java:125)
            at org.odftoolkit.odfvalidator.Main.main(Main.java:314)
    
    Change-Id: I798bfe072e3f652a4434c74815df663c48dce3c7

diff --git a/test-bugzilla-files/test-bugzilla-files.py b/test-bugzilla-files/test-bugzilla-files.py
index 8a63a21..4dc048e 100644
--- a/test-bugzilla-files/test-bugzilla-files.py
+++ b/test-bugzilla-files/test-bugzilla-files.py
@@ -383,7 +383,7 @@ def exportDoc(xDoc, filterName, validationCommand, filename, connection, timer):
         validationCommandWithURL = validationCommand + " " + fileURL[7:]
         print(validationCommandWithURL)
         try:
-            output = str(subprocess.check_output(validationCommandWithURL, shell=True), encoding='utf-8')
+            output = str(subprocess.check_output(validationCommandWithURL, shell=True, timeout=600), encoding='utf-8')
             print(output)
             if ("Error" in output) or ("error" in output):
                 print("Error validating file")


More information about the Libreoffice-commits mailing list