JunitTest_forms_unoapi_3 failing on Windows

classic Classic list List threaded Threaded
7 messages Options
slacka slacka
Reply | Threaded
Open this post in threaded view
|

JunitTest_forms_unoapi_3 failing on Windows

Stephan,
After commit: https://cgit.freedesktop.org/libreoffice/core/commit/?id=d5ed903618f2

    Set CppunitTest-related env vars only during CppunitTest

I'm seeing Windows 'make check' fail with:
There were 2 failures:
1) test(org.openoffice.test.UnoApiTest)
com.sun.star.lang.DisposedException
        at com.sun.star.lib.uno.environments.remote.JobQueue.removeJob(JobQueue.java:201)
        at com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:308)
        at com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:281)
        at com.sun.star.lib.uno.environments.remote.JavaThreadPool.enter(JavaThreadPool.java:81)
        at com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.sendRequest(java_remote_bridge.java:618)
        at com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.request(ProxyFactory.java:145)
        at com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.invoke(ProxyFactory.java:129)
        at com.sun.proxy.$Proxy8.loadComponentFromURL(Unknown Source)
        at util.SOfficeFactory.openDoc(SOfficeFactory.java:435)
        at util.SOfficeFactory.createDrawDoc(SOfficeFactory.java:126)
        at mod._forms.OHiddenModel.initialize(OHiddenModel.java:97)
        at lib.TestCase.initializeTestCase(TestCase.java:67)
        at base.java_fat.getEnv(java_fat.java:361)
        at base.java_fat.executeTest(java_fat.java:174)
        at org.openoffice.Runner.run(Runner.java:175)
        at org.openoffice.test.UnoApiTest.test(UnoApiTest.java:41)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
        at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
        at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
        at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
        at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
        at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)
        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
        at org.junit.runners.Suite.runChild(Suite.java:128)
        at org.junit.runners.Suite.runChild(Suite.java:24)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
        at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
        at org.junit.runner.JUnitCore.run(JUnitCore.java:136)
        at org.junit.runner.JUnitCore.run(JUnitCore.java:117)
        at org.junit.runner.JUnitCore.runMain(JUnitCore.java:98)
        at org.junit.runner.JUnitCore.runMainAndExit(JUnitCore.java:53)
        at org.junit.runner.JUnitCore.main(JUnitCore.java:45)
Caused by: java.io.EOFException
        at java.io.DataInputStream.readInt(DataInputStream.java:392)
        at com.sun.star.lib.uno.protocols.urp.urp.readBlock(urp.java:364)
        at com.sun.star.lib.uno.protocols.urp.urp.readMessage(urp.java:96)
        at com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge$MessageDispatcher.run(java_remote_bridge.java:92)
2) test(org.openoffice.test.UnoApiTest)
java.lang.AssertionError: expected:<0> but was:<1>
        at org.junit.Assert.fail(Assert.java:93)
        at org.junit.Assert.failNotEquals(Assert.java:647)
        at org.junit.Assert.assertEquals(Assert.java:128)
        at org.junit.Assert.assertEquals(Assert.java:472)
        at org.junit.Assert.assertEquals(Assert.java:456)
        at org.openoffice.test.OfficeConnection.tearDown(OfficeConnection.java:150)
        at org.openoffice.test.UnoApiTest.tearDown(UnoApiTest.java:33)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
        at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
        at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
        at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:36)
        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
        at org.junit.runners.Suite.runChild(Suite.java:128)
        at org.junit.runners.Suite.runChild(Suite.java:24)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
        at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
        at org.junit.runner.JUnitCore.run(JUnitCore.java:136)
        at org.junit.runner.JUnitCore.run(JUnitCore.java:117)
        at org.junit.runner.JUnitCore.runMain(JUnitCore.java:98)
        at org.junit.runner.JUnitCore.runMainAndExit(JUnitCore.java:53)
        at org.junit.runner.JUnitCore.main(JUnitCore.java:45)

FAILURES!!!
Tests run: 1,  Failures: 2

to rerun just this failed test without all others, run:

    make JunitTest_forms_unoapi_3

cd into the module dir to run the tests faster
Or to do interactive debugging, run two shells with:

    make debugrun
    make gb_JunitTest_DEBUGRUN=T JunitTest_forms_unoapi_3

make[1]: *** [C:/core/solenv/gbuild/JunitTest.mk:39: C:/core/workdir/JunitTest/forms_unoapi_3/done] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:286: build] Error 2


https://pastebin.com/Luku45mc
_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
sberg sberg
Reply | Threaded
Open this post in threaded view
|

Re: JunitTest_forms_unoapi_3 failing on Windows

On 21/11/2018 22:31, Luke Benes wrote:
> After commit: https://cgit.freedesktop.org/libreoffice/core/commit/?id=d5ed903618f2
>
>      Set CppunitTest-related env vars only during CppunitTest
>
> I'm seeing Windows 'make check' fail with:
> There were 2 failures:
> 1) test(org.openoffice.test.UnoApiTest)
> com.sun.star.lang.DisposedException
[...]
>      make JunitTest_forms_unoapi_3
[...]

This is most likely the same issue as discussed in the
<https://lists.freedesktop.org/archives/libreoffice/2018-November/081420.html>
"Failing JunitTest_framework_complex".  Apparently, for some builds,
some of the env vars that have been made CppunitTest-local with my above
commit are also needed during JunitTests.  But I at least cannot
reproduce, for me these tests succeed on Windows.  (Though one
difference that has been identified on IRC is whether OpenGL is enabled
in LO.  For me it isn't, while for Mike it is.)
_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
sberg sberg
Reply | Threaded
Open this post in threaded view
|

Re: JunitTest_forms_unoapi_3 failing on Windows

On 22/11/2018 08:36, Stephan Bergmann wrote:

> On 21/11/2018 22:31, Luke Benes wrote:
>> After commit:
>> https://cgit.freedesktop.org/libreoffice/core/commit/?id=d5ed903618f2
>>
>>      Set CppunitTest-related env vars only during CppunitTest
>>
>> I'm seeing Windows 'make check' fail with:
>> There were 2 failures:
>> 1) test(org.openoffice.test.UnoApiTest)
>> com.sun.star.lang.DisposedException
> [...]
>>      make JunitTest_forms_unoapi_3
> [...]
>
> This is most likely the same issue as discussed in the
> <https://lists.freedesktop.org/archives/libreoffice/2018-November/081420.html>
> "Failing JunitTest_framework_complex".  Apparently, for some builds,
> some of the env vars that have been made CppunitTest-local with my above
> commit are also needed during JunitTests.  But I at least cannot
> reproduce, for me these tests succeed on Windows.  (Though one
> difference that has been identified on IRC is whether OpenGL is enabled
> in LO.  For me it isn't, while for Mike it is.)

<https://gerrit.libreoffice.org/63784> "Pass some env vars into all
kinds of tests" is my blind attempt at fixing that.  Please leave
feedback there if it fixes things for you.

_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
sberg sberg
Reply | Threaded
Open this post in threaded view
|

Re: JunitTest_forms_unoapi_3 failing on Windows

On 22/11/2018 08:57, Stephan Bergmann wrote:

> On 22/11/2018 08:36, Stephan Bergmann wrote:
>> On 21/11/2018 22:31, Luke Benes wrote:
>>> After commit:
>>> https://cgit.freedesktop.org/libreoffice/core/commit/?id=d5ed903618f2
>>>
>>>      Set CppunitTest-related env vars only during CppunitTest
>>>
>>> I'm seeing Windows 'make check' fail with:
>>> There were 2 failures:
>>> 1) test(org.openoffice.test.UnoApiTest)
>>> com.sun.star.lang.DisposedException
>> [...]
>>>      make JunitTest_forms_unoapi_3
>> [...]
>>
>> This is most likely the same issue as discussed in the
>> <https://lists.freedesktop.org/archives/libreoffice/2018-November/081420.html>
>> "Failing JunitTest_framework_complex".  Apparently, for some builds,
>> some of the env vars that have been made CppunitTest-local with my
>> above commit are also needed during JunitTests.  But I at least cannot
>> reproduce, for me these tests succeed on Windows.  (Though one
>> difference that has been identified on IRC is whether OpenGL is
>> enabled in LO.  For me it isn't, while for Mike it is.)
>
> <https://gerrit.libreoffice.org/63784> "Pass some env vars into all
> kinds of tests" is my blind attempt at fixing that.  Please leave
> feedback there if it fixes things for you.

Turns out the env vars other than SAL_USE_VCLPLUGIN, the ones which that
Gerrit change addresses, were kind of a red herring.  That Gerrit change
will go in as an improvement regardless, but it is unrelated to these
Windows build failures.

What does make a difference for these Windows build failures is passing
SAL_USE_VCLPLUGIN=svp into JunitTest.
<https://gerrit.libreoffice.org/plugins/gitiles/core/+/6cdfe5ebb4f6c06bfa8b0e67e778dd68131c14e3%5E!/>
"Drop some headless mode variants" did two seemingly independent, but
actually interacting changes:

For one, it changed OpenGLHelper::isVCLOpenGLEnabled
(vcl/source/opengl/OpenGLHelper.cxx) to disable OpenGL when
SAL_USE_VCLPLUGIN=svp is set (which, in the past, was only set for
certain tests on Linux).

For another, it added SAL_USE_VCLPLUGIN=svp to
solenv/gbuild/CppunitTest.mk in such a way that it would effectively be
enabled during all tests, on all platforms (and which
<https://gerrit.libreoffice.org/plugins/gitiles/core/+/d5ed903618f200456feed9b410b7bd1ed8daeb62%5E!/>
"Set CppunitTest-related env vars only during CppunitTest" then "fixed",
by restricting it to just CppunitTests).

I asked Jan-Marek to come up with a fix (presumably setting
SAL_USE_VCLPLUGIN=svp in more places again) that makes
OpenGLHelper::isVCLOpenGLEnabled behave as expected (whatever that
means) during tests.  I must confess I'm lost here... :)
_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
sberg sberg
Reply | Threaded
Open this post in threaded view
|

Re: JunitTest_forms_unoapi_3 failing on Windows

On 22/11/2018 11:22, Stephan Bergmann wrote:

> What does make a difference for these Windows build failures is passing
> SAL_USE_VCLPLUGIN=svp into JunitTest.
> <https://gerrit.libreoffice.org/plugins/gitiles/core/+/6cdfe5ebb4f6c06bfa8b0e67e778dd68131c14e3%5E!/>
> "Drop some headless mode variants" did two seemingly independent, but
> actually interacting changes:
>
> For one, it changed OpenGLHelper::isVCLOpenGLEnabled
> (vcl/source/opengl/OpenGLHelper.cxx) to disable OpenGL when
> SAL_USE_VCLPLUGIN=svp is set (which, in the past, was only set for
> certain tests on Linux).
>
> For another, it added SAL_USE_VCLPLUGIN=svp to
> solenv/gbuild/CppunitTest.mk in such a way that it would effectively be
> enabled during all tests, on all platforms (and which
> <https://gerrit.libreoffice.org/plugins/gitiles/core/+/d5ed903618f200456feed9b410b7bd1ed8daeb62%5E!/>
> "Set CppunitTest-related env vars only during CppunitTest" then "fixed",
> by restricting it to just CppunitTests).
>
> I asked Jan-Marek to come up with a fix (presumably setting
> SAL_USE_VCLPLUGIN=svp in more places again) that makes
> OpenGLHelper::isVCLOpenGLEnabled behave as expected (whatever that
> means) during tests.  I must confess I'm lost here... :)

...and it may also be that OpenGLHelper::isVCLOpenGLEnabled already
behaves as expected, and SAL_USE_VCLPLUGIN=svp is set in exactly the
right set of tests, and these Windows build failures are symptoms of
other issues that need to be fixed (and had just been hidden by accident)
_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
slacka slacka
Reply | Threaded
Open this post in threaded view
|

Re: JunitTest_forms_unoapi_3 failing on Windows

In reply to this post by slacka
Unfortunately, the patch did not work. On both my win10 laptop and desktop, I'm still seeing a JunitTest_forms_unoapi_3 failure with a 'make check' on master.

_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
sberg sberg
Reply | Threaded
Open this post in threaded view
|

Re: JunitTest_forms_unoapi_3 failing on Windows

On 25/11/2018 20:25, Luke Benes wrote:
> Unfortunately, the patch did not work. On both my win10 laptop and desktop, I'm still seeing a JunitTest_forms_unoapi_3 failure with a 'make check' on master.

The current theory is that these are long-standing, real issues (on
Windows machines where OpenGL would be enabled, at least) that were
originally hidden by JunitTests setting VCL_HIDE_WINDOWS, then, when
<https://gerrit.libreoffice.org/plugins/gitiles/core/+/6cdfe5ebb4f6c06bfa8b0e67e778dd68131c14e3%5E!>
"Drop some headless mode variants" removed VCL_HIDE_WINDOWS, hidden by
JunitTests setting SAL_USE_VCLPLUGIN=svp, then exposed by
<https://gerrit.libreoffice.org/plugins/gitiles/core/+/d5ed903618f200456feed9b410b7bd1ed8daeb62%5E!>
"Set CppunitTest-related env vars only during CppunitTest" removing
SAL_USE_VCLPLUGIN=svp from JunitTests (which had been set there by
accident, not by design).
_______________________________________________
LibreOffice mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/libreoffice