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

Integration test test_llvm_x86_01 fails on MacOS #722

Closed
brianhuffman opened this issue May 20, 2020 · 5 comments
Closed

Integration test test_llvm_x86_01 fails on MacOS #722

brianhuffman opened this issue May 20, 2020 · 5 comments
Labels
subsystem: x86 Issues related to verifying x86 binaries via Macaw test assets Issues involving test programs or other test assets

Comments

@brianhuffman
Copy link
Contributor

As of eeef9a1, running intTests gives me the following result:

tests passed: 70 /       71
failed: test_llvm_x86_01

Aren't we running these tests on CI yet?

@brianhuffman brianhuffman added the tooling: test infrastructure Issues involving test infrastructure or test execution, or making SAW more testable label May 20, 2020
@atomb
Copy link
Contributor

atomb commented May 20, 2020

Hmm. The most recent run on Travis succeeded: https://travis-ci.org/github/GaloisInc/saw-script/jobs/689333557#L543

@brianhuffman
Copy link
Contributor Author

Ok, I see why it's failing. This is apparently the only regression test that uses yasm; the test had failed because it couldn't find the yasm binary on my system.

It might be nice to add some text to the README file listing what external programs are necessary to run the tests.

@brianhuffman brianhuffman changed the title Integration test test_llvm_x86_01 is failing Document that integration tests require yasm and other external tools May 20, 2020
@brianhuffman
Copy link
Contributor Author

I installed yasm, but the test is still failing. Here's the contents of results.xml after running ./runtests.sh test_llvm_x86_01:

<?xml version='1.0'?>
<testsuites errors="1" tests="       1" time="0">
 <testsuite name="SAWScript Integration Tests">
  <testcase name="test_llvm_x86_01" time="0"><failure><![CDATA[
set -e
+ set -e

yasm -felf64 test.S
+ yasm -felf64 test.S
ld test.o -o test
+ ld test.o -o test
ld: warning: No version-min specified on command line
ld: warning: -arch not specified
ld: warning: -macosx_version_min not specified, assuming 10.11
ld: warning: ignoring file test.o, file was built for unsupported file format ( 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ) which is not the architecture being linked (x86_64): test.o
Undefined symbols for architecture x86_64:
  "_main", referenced from:
     implicit entry/start for main executable
ld: symbol(s) not found for inferred architecture x86_64
]]></failure></testcase>
 </testsuite>
</testsuites>

So is it futile to even try running this test on MacOS? If so, are we ok with having some tests that fail to run on certain platforms? Should we check in a linux-built copy of the executable binary that we're verifying in this test?

@brianhuffman brianhuffman changed the title Document that integration tests require yasm and other external tools Integration test test_llvm_x86_01 fails on MacOS May 20, 2020
@atomb
Copy link
Contributor

atomb commented May 21, 2020

I'd advocate for checking in the object file. Otherwise, even on Linux, the test could be quite fragile. For the test suite, I'm also in favor of checking in bitcode files, as long as we also have an easy way to regenerate them.

@brianhuffman
Copy link
Contributor Author

This test seems to be working now, probably due to #984.

@RyanGlScott RyanGlScott added the subsystem: x86 Issues related to verifying x86 binaries via Macaw label Dec 6, 2021
@sauclovian-g sauclovian-g added test assets Issues involving test programs or other test assets and removed tooling: test infrastructure Issues involving test infrastructure or test execution, or making SAW more testable labels Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
subsystem: x86 Issues related to verifying x86 binaries via Macaw test assets Issues involving test programs or other test assets
Projects
None yet
Development

No branches or pull requests

4 participants