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

Fix detection of endianness in test suite #419

Merged
merged 2 commits into from
Sep 11, 2021
Merged

Fix detection of endianness in test suite #419

merged 2 commits into from
Sep 11, 2021

Conversation

Bodigrim
Copy link
Contributor

@Bodigrim Bodigrim commented Sep 7, 2021

Tested with

apt install -y docker.io
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
docker run --rm -i -t s390x/ubuntu

and then in s390x virtual machine:

apt update
apt install -y ghc cabal-install git
git clone https://github.com/haskell/bytestring
cd bytestring/
cabal new-update
cabal -j1 new-test test:test-builder

In an emulated environment it takes three hours to build, so at some point it appeared faster to scrap dlist dependency than build it :)

Copy link
Member

@sjakobi sjakobi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find it a bit difficult to understand what this PR does, in part because I'm unfamiliar with endianness issues. I think this would be helpful:

  • Move the dlist changes to a separate PR.
  • Create an issue that describes the problem and reference it from this PR.

tests/Properties/ByteString.hs Outdated Show resolved Hide resolved
@Bodigrim Bodigrim linked an issue Sep 11, 2021 that may be closed by this pull request
Copy link
Member

@sjakobi sjakobi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much better! :)

Please reference #421 from the commit message(s) and I'll be happy! :)

let prop x = ioProperty $ do
r <- B.fromFilePath x >>= B.toFilePath
pure (r === x)
-- Normally getFileSystemEncoding returns one of Unicode encodings,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
-- Normally getFileSystemEncoding returns one of Unicode encodings,
-- Normally getFileSystemEncoding returns a Unicode encoding,

@Bodigrim Bodigrim merged commit 23ef9f3 into master Sep 11, 2021
@Bodigrim Bodigrim deleted the big-endian branch September 11, 2021 23:35
Bodigrim added a commit to Bodigrim/bytestring that referenced this pull request Sep 12, 2021
* Fix detection of endianness in test suite (haskell#421)

* Work around when getFileSystemEncoding is ASCII (haskell#421)
@Bodigrim Bodigrim added this to the 0.11.2.0 milestone Nov 3, 2021
noughtmare pushed a commit to noughtmare/bytestring that referenced this pull request Dec 12, 2021
* Fix detection of endianness in test suite (haskell#421)

* Work around when getFileSystemEncoding is ASCII (haskell#421)
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

Successfully merging this pull request may close these issues.

s390x issues
2 participants