Bug 1369162

Summary: [Field3D] Unit tests fail on big-endian systems
Product: [Fedora] Fedora Reporter: Rafael Fonseca <rdossant>
Component: Field3DAssignee: Richard Shaw <hobbes1069>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 25CC: dan, hobbes1069
Target Milestone: ---   
Target Release: ---   
Hardware: ppc64   
OS: Unspecified   
Whiteboard:
Fixed In Version: Field3D-1.7.2-3.fc25 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-10-26 00:57:38 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 467765, 1071880    

Description Rafael Fonseca 2016-08-22 14:44:07 UTC
Description of problem: Field3D tests fail on big-endian arches. Example output:

Field3DFile tests for type DenseField<half> ogawa
WARNING: Field3D only supports Ogawa-backed files on little-endian systems.
Checking write file, then read
WARNING: In file: /tmp/test_DenseField_half_ogawa.f3d Unknown exception 
/builddir/build/BUILD/Field3D-1.7.2/test/unit_tests/UnitTest.cpp(1112): error: in "Field3D Test Suite/(&testField3DFile<DenseField,_half,_true>)": check metaVecFloat == inMetaVecFloat has failed [(1 2 3) != (9 9 9)]
/builddir/build/BUILD/Field3D-1.7.2/test/unit_tests/UnitTest.cpp(1115): error: in "Field3D Test Suite/(&testField3DFile<DenseField,_half,_true>)": check metaFloat == inMetaFloat has failed [123 != 9]
/builddir/build/BUILD/Field3D-1.7.2/test/unit_tests/UnitTest.cpp(1118): error: in "Field3D Test Suite/(&testField3DFile<DenseField,_half,_true>)": check metaVecInt == inMetaVecInt has failed [(4 5 6) != (9 9 9)]
/builddir/build/BUILD/Field3D-1.7.2/test/unit_tests/UnitTest.cpp(1121): error: in "Field3D Test Suite/(&testField3DFile<DenseField,_half,_true>)": check metaInt == inMetaInt has failed [456 != 9]
/builddir/build/BUILD/Field3D-1.7.2/test/unit_tests/UnitTest.cpp(1124): error: in "Field3D Test Suite/(&testField3DFile<DenseField,_half,_true>)": check metaStr == inMetaStr has failed [Great Job!!! != Hello]


Version-Release number of selected component (if applicable): 1.7.2-2


How reproducible: always on ppc-koji and s390-koji.


Actual results: http://ppc.koji.fedoraproject.org/koji/taskinfo?taskID=3630149


Additional info: Fails on both ppc64 and s390.

Comment 1 Richard Shaw 2016-08-22 15:05:52 UTC
This has already been reported upstream:

https://github.com/imageworks/Field3D/issues/90

Although the "fix" didn't seem to work for the reporter, is this something you can try? If it works feel free to add a conditional to the spec (if it's configurable) or a patch.

Comment 2 Rafael Fonseca 2016-08-22 15:14:38 UTC
The "fix" is already included in the version 1.7.2. You can see the warning in the beginning of the tests (WARNING: Field3D only supports Ogawa-backed files on little-endian systems.) but they still fail.

In summary, I'm getting the same errors as the upstream reporter.

Comment 3 Rafael Fonseca 2016-10-13 13:40:31 UTC
I just submitted a fix upstream [1]. With that, all the tests pass.

[1] https://github.com/imageworks/Field3D/pull/93

Comment 4 Rafael Fonseca 2016-10-13 22:45:23 UTC
Patch accepted and merged.

Comment 5 Richard Shaw 2016-10-14 00:44:24 UTC
Great! I'll take care of it tomorrow though there's probably no need to do new builds at this point.

Comment 6 Dan Horák 2016-10-14 10:04:26 UTC
(In reply to Richard Shaw from comment #5)
> Great! I'll take care of it tomorrow though there's probably no need to do
> new builds at this point.

The alternative arches need a new build (f25 + rawhide) to replace the missing Field3D-1.7.2-2.fc25 that's FTBFS on them. It blocks a (small) number of other libs and apps.

Comment 7 Richard Shaw 2016-10-14 20:59:04 UTC
I have committed the change to master. Do you need me to do anything else?

Comment 8 Dan Horák 2016-10-14 21:14:51 UTC
(In reply to Richard Shaw from comment #7)
> I have committed the change to master. Do you need me to do anything else?

Please do also builds for rawhide and F-25 including update in bodhi. Otherwise alt-arches can't use it.

Comment 9 Fedora Update System 2016-10-19 08:30:53 UTC
Field3D-1.7.2-3.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-92ecec1252

Comment 10 Fedora Update System 2016-10-26 00:57:38 UTC
Field3D-1.7.2-3.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.