dvisvgm
dvisvgm copied to clipboard
Test suite fails to run on Debian i386
We're trying to build the source code on Debian i386. Building the binary runs fine, but in the test suite afterwards a test fails. The test suite log is attached. This is for 2.7.4, but 2.7.3 is affected too. Thanks for looking into it.
Without further information it's hard to tell, what's going wrong there. The deviations of the values are too large for pure rounding issues.
What compiler do you use? Can you check if the test actually reads tests/data/cmr10.600gf
or a different one with the same name? For example, deleting the file from tests/data/
should change the behavior of the test and lead to failure unknown file
.
You can run GFGlyphTracerTest
manually from within the tests
directory.
I use gcc 9.2.1. You may have a look at our build log on build log i386 if that helps you.
I deleted the file tests/data/cmr10.600gf
and the error message changes as expected.
hille@sid:~/devel/TeXLive/build/dvisvgm-2.7.4/tests $ ./GFGlyphTracerTest
[==========] Running 3 tests from 1 test case.
[----------] Global test environment set-up.
[----------] 3 tests from GFGlyphTracerTest
[ RUN ] GFGlyphTracerTest.executeChar
unknown file: Failure
C++ exception with description "invalid identification byte in postpost" thrown in the test body.
[ FAILED ] GFGlyphTracerTest.executeChar (0 ms)
[ RUN ] GFGlyphTracerTest.defaultCallback
unknown file: Failure
C++ exception with description "invalid identification byte in postpost" thrown in the test body.
[ FAILED ] GFGlyphTracerTest.defaultCallback (0 ms)
[ RUN ] GFGlyphTracerTest.fail
unknown file: Failure
C++ exception with description "invalid identification byte in postpost" thrown in the test body.
[ FAILED ] GFGlyphTracerTest.fail (1 ms)
[----------] 3 tests from GFGlyphTracerTest (2 ms total)
[----------] Global test environment tear-down
[==========] 3 tests from 1 test case ran. (3 ms total)
[ PASSED ] 0 tests.
[ FAILED ] 3 tests, listed below:
[ FAILED ] GFGlyphTracerTest.executeChar
[ FAILED ] GFGlyphTracerTest.defaultCallback
[ FAILED ] GFGlyphTracerTest.fail
3 FAILED TESTS
Not sure if that helps you: if you look at all build logs you'll notice that only the Intel 32bit architectures are affected.
I tried to build using gcc 8.3.0 yesterday: same result. I've now clue why the issue reamin invisible in #116.
Thanks for the additional info. I guess I have to set up a 32-bit VM in order to reproduce the problem. Since I'm pretty busy at the moment, I probably won't be able to do that before next week.
I'm able to reproduce the failure now. As far as I have investigated it, it's an issue in the potrace library. It only occurs with optimized (-O2
) builds and when using GCC >7. Optimized code created with GCC 7 or Clang works as expected. I don't know yet whether it's a compiler issue or a potrace bug. I'll have a closer look next week.
After some more investigations and feedback from the author of potrace, it turned out that the tested functions work correctly. However, the path segments describing the traced shape are allowed to differ, i.e. due to its floating point arithmetic, potrace may generate different results depending on compiler optimizations. So, it's just the test that doesn't take this into account.
Since a proper enhancement of the test takes some time and as I can't work on dvisvgm at the moment, I suggest you simply disable the affected test executeChar
in tests/GFGlyphTracerTest.cpp
by commenting out the corresponding function.
Many thanks for help! Looking at the build status page, you'll notice that we have package for i386 now. Let me know, when you have a real fix for the issue.
Great. Glad to hear you've got successful builds for all archs now. I leave this ticket open and post updates as soon as there are any news regarding the test case.