Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 717867 Details for
Bug 928927
FTBFS: python-pillow-2.0.0 on ppc64
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Fix incorrectly assumed little-endian CPU
endian.patch (text/plain), 2.89 KB, created by
Sandro Mani
on 2013-03-28 22:28:32 UTC
(
hide
)
Description:
Fix incorrectly assumed little-endian CPU
Filename:
MIME Type:
Creator:
Sandro Mani
Created:
2013-03-28 22:28:32 UTC
Size:
2.89 KB
patch
obsolete
>From 59b4aae0153162270336ed756b16aed4de5b5479 Mon Sep 17 00:00:00 2001 >From: Sandro Mani <manisandro@gmail.com> >Date: Thu, 28 Mar 2013 22:31:32 +0100 >Subject: [PATCH 1/2] Fix test which was hardcoded for little endian CPUs > >--- > Tests/test_image_array.py | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/Tests/test_image_array.py b/Tests/test_image_array.py >index c2e8590..351621d 100644 >--- a/Tests/test_image_array.py >+++ b/Tests/test_image_array.py >@@ -10,8 +10,8 @@ def test_toarray(): > return ai["shape"], ai["typestr"], len(ai["data"]) > # assert_equal(test("1"), ((100, 128), '|b1', 1600)) > assert_equal(test("L"), ((100, 128), '|u1', 12800)) >- assert_equal(test("I"), ((100, 128), '<i4', 51200)) # FIXME: wrong? >- assert_equal(test("F"), ((100, 128), '<f4', 51200)) # FIXME: wrong? >+ assert_equal(test("I"), ((100, 128), Image._ENDIAN + 'i4', 51200)) # FIXME: wrong? >+ assert_equal(test("F"), ((100, 128), Image._ENDIAN + 'f4', 51200)) # FIXME: wrong? > assert_equal(test("RGB"), ((100, 128, 3), '|u1', 38400)) > assert_equal(test("RGBA"), ((100, 128, 4), '|u1', 51200)) > assert_equal(test("RGBX"), ((100, 128, 4), '|u1', 51200)) >-- >1.8.1.4 > > >From 6f952d802b6cbe526951b9cf8553f3c8cd09d7c4 Mon Sep 17 00:00:00 2001 >From: Sandro Mani <manisandro@gmail.com> >Date: Thu, 28 Mar 2013 23:06:57 +0100 >Subject: [PATCH 2/2] Fix other tests which are hardcoded for little endian > CPUs > >--- > Tests/test_lib_pack.py | 6 ++++-- > Tests/test_mode_i16.py | 4 +++- > 2 files changed, 7 insertions(+), 3 deletions(-) > >diff --git a/Tests/test_lib_pack.py b/Tests/test_lib_pack.py >index 5bf622c..8f095e2 100644 >--- a/Tests/test_lib_pack.py >+++ b/Tests/test_lib_pack.py >@@ -18,6 +18,8 @@ def test_pack(): > else: > return [ord(c) for c in im.tobytes("raw", rawmode)] > >+ order = 1 if Image._ENDIAN == '<' else -1 >+ > assert_equal(pack("1", "1"), [128]) > assert_equal(pack("1", "1;I"), [0]) > assert_equal(pack("1", "1;R"), [1]) >@@ -25,9 +27,9 @@ def test_pack(): > > assert_equal(pack("L", "L"), [1]) > >- assert_equal(pack("I", "I"), [1, 0, 0, 0]) >+ assert_equal(pack("I", "I"), [1, 0, 0, 0][::order]) > >- assert_equal(pack("F", "F"), [0, 0, 128, 63]) >+ assert_equal(pack("F", "F"), [0, 0, 128, 63][::order]) > > assert_equal(pack("LA", "LA"), [1, 2]) > >diff --git a/Tests/test_mode_i16.py b/Tests/test_mode_i16.py >index 584bdd9..6b89938 100644 >--- a/Tests/test_mode_i16.py >+++ b/Tests/test_mode_i16.py >@@ -84,10 +84,12 @@ def test_tobytes(): > def tobytes(mode): > return Image.new(mode, (1, 1), 1).tobytes() > >+ order = 1 if Image._ENDIAN == '<' else -1 >+ > assert_equal(tobytes("L"), b"\x01") > assert_equal(tobytes("I;16"), b"\x01\x00") > assert_equal(tobytes("I;16B"), b"\x00\x01") >- assert_equal(tobytes("I"), b"\x01\x00\x00\x00") >+ assert_equal(tobytes("I"), b"\x01\x00\x00\x00"[::order]) > > > def test_convert(): >-- >1.8.1.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 928927
: 717867