Bug 1609513

Summary: gridData.tests.test_ccp4.test_ccp4 test fails on big-endian arches
Product: [Fedora] Fedora Reporter: Dominik 'Rathann' Mierzejewski <dominik>
Component: python-GridDataFormatsAssignee: Dominik 'Rathann' Mierzejewski <dominik>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 29CC: dan, dominik, hannsj_uhl
Target Milestone: ---   
Target Release: ---   
Hardware: ppc64   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 467765, 1071880    

Description Dominik 'Rathann' Mierzejewski 2018-07-28 20:39:24 UTC
Description of problem:
When running under Fedora rawhide on a big-endian machine (ppc64, s390x), test_ccp4 fails.

Version-Release number of selected component (if applicable):
python-GridDataFormats-0.4.0-3.fc29

How reproducible:
Always.

Steps to Reproduce:
1. cd GridDataFormats-0.4.0
2. /usr/bin/python2 setup.py nosetests

Actual results:
running nosetests
running egg_info
writing requirements to GridDataFormats.egg-info/requires.txt
writing GridDataFormats.egg-info/PKG-INFO
writing top-level names to GridDataFormats.egg-info/top_level.txt
writing dependency_links to GridDataFormats.egg-info/dependency_links.txt
reading manifest file 'GridDataFormats.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'README'
writing manifest file 'GridDataFormats.egg-info/SOURCES.txt'
/builddir/build/BUILD/GridDataFormats-0.4.0/gridData/CCP4.py:274: UserWarning: Key mode: Illegal value 33554432
  "Key %s: Illegal value %r" % (rec.key, header[rec.key]))
/builddir/build/BUILD/GridDataFormats-0.4.0/gridData/CCP4.py:274: UserWarning: Key mapc: Illegal value 16777216
  "Key %s: Illegal value %r" % (rec.key, header[rec.key]))
/builddir/build/BUILD/GridDataFormats-0.4.0/gridData/CCP4.py:274: UserWarning: Key mapr: Illegal value 33554432
  "Key %s: Illegal value %r" % (rec.key, header[rec.key]))
/builddir/build/BUILD/GridDataFormats-0.4.0/gridData/CCP4.py:274: UserWarning: Key maps: Illegal value 50331648
  "Key %s: Illegal value %r" % (rec.key, header[rec.key]))
E............/builddir/build/BUILD/GridDataFormats-0.4.0/gridData/OpenDX.py:339: UserWarning: array dtype.name = float128 can not be automatically converted to a DX array type. Use the 'type' keyword to manually specify the correct type.
  self.array.dtype.name))
.............S..
======================================================================
ERROR: gridData.tests.test_ccp4.test_ccp4
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILD/GridDataFormats-0.4.0/gridData/tests/test_ccp4.py", line 9, in test_ccp4
    g = Grid('gridData/tests/test.ccp4')
  File "/builddir/build/BUILD/GridDataFormats-0.4.0/gridData/core.py", line 117, in __init__
    self.load(grid)
  File "/builddir/build/BUILD/GridDataFormats-0.4.0/gridData/core.py", line 302, in load
    loader(filename)
  File "/builddir/build/BUILD/GridDataFormats-0.4.0/gridData/core.py", line 314, in _load_cpp4
    ccp4.read(filename)
  File "/builddir/build/BUILD/GridDataFormats-0.4.0/gridData/CCP4.py", line 204, in read
    h = self.header = self._read_header(ccp4)
  File "/builddir/build/BUILD/GridDataFormats-0.4.0/gridData/CCP4.py", line 295, in _read_header
    label = struct.unpack(flag, binlabel)[0]
error: unpack requires a string argument of length 1342177280
----------------------------------------------------------------------
Ran 29 tests in 0.558s
FAILED (SKIP=1, errors=1)

Expected results:
Test passes.

Comment 1 Jan Kurik 2018-08-14 08:40:16 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 29 development cycle.
Changing version to '29'.