Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test suite fails to run on Debian i386 #117

Open
hpreusse opened this issue Sep 12, 2019 · 8 comments
Open

Test suite fails to run on Debian i386 #117

hpreusse opened this issue Sep 12, 2019 · 8 comments
Assignees

Comments

@hpreusse
Copy link
Contributor

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.

test-suite.log

@mgieseki
Copy link
Owner

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.

@mgieseki mgieseki self-assigned this Sep 12, 2019
@hpreusse
Copy link
Contributor Author

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.

@hpreusse
Copy link
Contributor Author

I tried to build using gcc 8.3.0 yesterday: same result. I've now clue why the issue reamin invisible in #116.

@mgieseki
Copy link
Owner

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.

@mgieseki
Copy link
Owner

mgieseki commented Sep 13, 2019

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.

@mgieseki
Copy link
Owner

mgieseki commented Sep 16, 2019

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.

@hpreusse
Copy link
Contributor Author

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.

@mgieseki
Copy link
Owner

mgieseki commented Sep 18, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants