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::compareBinaries() doesn't work properly on 32 bit architectures #256

Open
davide125 opened this issue Dec 11, 2021 · 2 comments
Open

Comments

@davide125
Copy link
Contributor

On armv7hl and i686, the two comparison tests in info_builder_test.cpp fail:

FAIL!  : Test::compareBinaries_coco() 'byteArray.size() == binByteArray.size()' returned FALSE. ()
   Loc: [/builddir/build/BUILD/bletchmame-2.10/src/tests/info_builder_test.cpp(145)]
FAIL!  : Test::compareBinaries_alienar() 'byteArray.size() == binByteArray.size()' returned FALSE. ()
   Loc: [/builddir/build/BUILD/bletchmame-2.10/src/tests/info_builder_test.cpp(145)]

Looks like it's the QVERIFY(byteArray.size() == binByteArray.size()); assert in compareBinaries() that's failing.

You can see full logs for armv7hl (https://koji.fedoraproject.org/koji/taskinfo?taskID=79844074) and i686 (https://koji.fedoraproject.org/koji/taskinfo?taskID=79844075) if you look at "build.log".

@davide125
Copy link
Contributor Author

Interestingly, this doesn't always fail (you can see in that example that the armv7hl one actually succeeded), so there might be more going on here.

@npwoods
Copy link
Owner

npwoods commented Dec 11, 2021

The interesting part here is that the part of this that one would expect to fail did not actually fail.

The purpose of this test is to ensure that generation of the Info DB binaries is indeed deterministic, and that there are not undefined bytes getting persisted. It is not an overall surprise that there might be a bug that does not manifest on x64, but I would expect the problem to manifest as bytes differing, not the size.

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

No branches or pull requests

2 participants