-
Notifications
You must be signed in to change notification settings - Fork 2
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
Update unit tests for integral, floating point, and UTF types #26
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hainest I'm not sure why but I'm getting this error:
[ 80%] Linking CXX executable SmeagleTests
terminate called after throwing an instance of 'std::runtime_error'
what(): There was a problem reading from 'liballocation.so'
CMake Error at /code/build/_deps/doctest-src/scripts/cmake/doctestAddTests.cmake:43 (message):
Error running test executable '/code/build/test/SmeagleTests':
Result: Subprocess aborted
Output:
Did you try running in the development environment?
Somehow, it's trying to run the test before it builds the requisite libraries. I've not ever seen that before. Neat... |
I'm trying in the dev cont with your branch now. |
It worked for me locally with my branch, so I'm not sure what is going on. I wonder if it could be that the problem has always existed (a race between writing the test and running it), and as the test got larger it finally triggered? |
I think that might be it. If I manually run
it works fine. I have no explanation for how that could be, though. GHOSTS! 👻 |
Well, I say it works "fine". I meant that it runs the tests. The tests are segfaulting like I was seeing previously outside of the container. |
The specific command that is failing is: cmake --build build/test Which is before we run anything, hmm. |
The tests aren't segfaulting for me, they work perfectly in my development environment:
As they do in the PR https://github.com/buildsi/Smeagle/pull/25/checks?check_run_id=2881198863. So I think there is something about the changes you've done to break it locally for me and in the CI here, and I can't reproduce the segfault for my branch. |
I can reproduce the segfault for your branch here: Running tests...
Test project /code/build
Start 1: Register Allocation - Integral Types
1/10 Test #1: Register Allocation - Integral Types ..............***Exception: SegFault 0.14 sec
Start 2: Register Allocation - Signed Integral Types
2/10 Test #2: Register Allocation - Signed Integral Types .......***Exception: SegFault 0.11 sec
Start 3: Register Allocation - Unsigned Integral Types
3/10 Test #3: Register Allocation - Unsigned Integral Types .....***Exception: SegFault 0.11 sec
Start 4: Register Allocation - Floating Point types
4/10 Test #4: Register Allocation - Floating Point types ........***Exception: SegFault 0.11 sec
Start 5: Register Allocation - Fixed-Width Integer types
5/10 Test #5: Register Allocation - Fixed-Width Integer types ...***Exception: SegFault 0.11 sec
Start 6: Register Allocation - Null types
6/10 Test #6: Register Allocation - Null types .................. Passed 0.01 sec
Start 7: Register Allocation - UTF types
7/10 Test #7: Register Allocation - UTF types ...................***Exception: SegFault 0.11 sec
Start 8: Parameter Directionality
8/10 Test #8: Parameter Directionality .......................... Passed 0.01 sec
Start 9: Smeagle
9/10 Test #9: Smeagle ........................................... Passed 0.01 sec
Start 10: Smeagle version
10/10 Test #10: Smeagle version ................................... Passed 0.02 sec
40% tests passed, 6 tests failed out of 10
Total Test time (real) = 0.75 sec
The following tests FAILED:
1 - Register Allocation - Integral Types (SEGFAULT)
2 - Register Allocation - Signed Integral Types (SEGFAULT)
3 - Register Allocation - Unsigned Integral Types (SEGFAULT)
4 - Register Allocation - Floating Point types (SEGFAULT)
5 - Register Allocation - Fixed-Width Integer types (SEGFAULT)
7 - Register Allocation - UTF types (SEGFAULT)
Errors while running CTest
Output from these tests are in: /code/build/Testing/Temporary/LastTest.log
Use "--rerun-failed --output-on-failure" to re-run the failed cases verbosely.
Makefile:101: recipe for target 'test' failed
make: *** [test] Error 8 |
If I manually run
everything build and runs, and I see no segfaults. If I run make test I get the library load error because liballocation.so hasn't been built yet. |
So the Makefile is not running commands in serial? |
That's kind of what it seems like, yeah. But that would be super weird. |
Hmm I ran those commands manually and I still got the same error though. |
I don't feel comfortable merging this - the tests I have are working and there is something here that breaks it all. Would it make sense to step through your changes and do one thing at a time until you break it? |
Yeah, no, we shouldn't merge this until we can resolve the build craziness. Let me try a few things and I'll get back to you. |
Sounds good :) Thanks @hainest ! |
@hainest any updates on this hairball? |
Not yet. I ended up spending my weekend chasing Dyninst link errors. Let's go ahead and merge #25 so we can at least have some unit tests running that we can incorporate to the Github actions here. |
No description provided.