Bug 1088339

Summary: python test failing on 64-bit big endians
Product: [Fedora] Fedora Reporter: Dan Horák <dan>
Component: lassoAssignee: Simo Sorce <ssorce>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: herrold, ssorce
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-04-26 16:24:04 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    
Attachments:
Description Flags
test log
none
Fix generated code for parsing integers/longs/enums
none
Fix incorrect assumption about size of int vs size of pointer none

Description Dan Horák 2014-04-16 13:18:40 UTC
Created attachment 886895 [details]
test log

The profiles_tests.py fails on 64-bit big endian arches (s390x, ppc64), 32-bit arches are OK, please see attached log for details

Version-Release number of selected component (if applicable):
lasso-2.4.0-0.fc20

Comment 1 Simo Sorce 2014-04-17 21:39:18 UTC
Thanks for the report, I will try to see if I can spot anything obvious.

Comment 2 Simo Sorce 2014-04-17 22:22:48 UTC
Created attachment 887349 [details]
Fix generated code for parsing integers/longs/enums

Hi Dan,
I think I've found the potential issue, it's in autogeneratd code that I think would easily fail if an enum is not the same size of an integer.

This would affect any architecture but is probably masked on little endian machines by luck.

Would you be able to check if this patch makes tests pas on big endian archs ?
I do not have access to any big endian machine ATM.

Comment 3 Dan Horák 2014-04-18 08:11:33 UTC
Thanks for looking, but I still get the same errors with the patch applied :-(

I've also sent you info about our developer machines in an email.

Comment 4 Simo Sorce 2014-04-18 20:50:32 UTC
Created attachment 887633 [details]
Fix incorrect assumption about size of int vs size of pointer

There was an additional bug lurking in the code that shows up in architecttures where sizeof(int) != sizeof(void *), like ppc64.

This patch is a small workaround, and make the tests pass, but it is probably not the final say wrt upstream.

Please try with both patches, my experiment on the machine you kindly allowed me to access says that now tests pass.

Comment 5 Simo Sorce 2014-04-26 16:24:04 UTC
I've pushed 2.4.0-2 into rawhide git and started a build.
This version contains 2 patches approved by upstream that should fix the problem.
I tested with make && make check on ppc64

Closing with the tag 'rawhide'.