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

GPT tests fail on s390x #131

Open
dankamongmen opened this issue Dec 5, 2020 · 3 comments
Open

GPT tests fail on s390x #131

dankamongmen opened this issue Dec 5, 2020 · 3 comments
Assignees
Labels
bug core non-ui code, common code shared by all uis
Milestone

Comments

@dankamongmen
Copy link
Owner

Andy Postnikov commented on a discussion:
https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/15043#note_128242

locally (in s390 docker) I can reproduce it
/mnt/testing/growlight $ LANG=C src/growlight-1.2.22/build/growlight-tester
Running with LANG=C
Running with TERM=xterm
[doctest] doctest version is "2.4.1"
[doctest] run with "--help" for options
===============================================================================
/mnt/testing/growlight/src/growlight-1.2.22/tests/gpt.cpp:6:
TEST CASE:  GPT
  CRC32

/mnt/testing/growlight/src/growlight-1.2.22/tests/gpt.cpp:56: ERROR: CHECK(
2006165414 == head.crc ) is NOT correct!
  values: CHECK( 2006165414 == 4119344763 )

===============================================================================
[doctest] test cases:   1 |   0 passed | 1 failed | 0 skipped
[doctest] assertions: 440 | 439 passed | 1 failed |
[doctest] Status: FAILURE!

this comes from https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/15043#note_128242, alpine's 1.2.22

@dankamongmen dankamongmen added bug core non-ui code, common code shared by all uis labels Dec 5, 2020
@dankamongmen dankamongmen added this to the 1.3 milestone Dec 5, 2020
@dankamongmen dankamongmen self-assigned this Dec 5, 2020
@dankamongmen
Copy link
Owner Author

note that it seems we're only miscalculating the main crc, not the partition crc two lines later. hrmmm.

dankamongmen added a commit that referenced this issue Dec 10, 2020
@dankamongmen
Copy link
Owner Author

dankamongmen commented Dec 10, 2020

s390x:

SIZE: 92 CRC: f588367b RES: 00000000
GUID: ^����0F�=Tn��
AME: EFI PART
(00) 45464920 50415254
(08) 00010000 0000005c
(16) f588367b 00000000
(24) 00000000 00000001
(32) 00000000 003fffef
(40) 00000000 00000022
(48) 00000000 003fffce
(56) 5e8690ef d0300346
(64) 993d546e b0e71b0d
(72) 00000000 00000002
(80) 00000080 00000080
(88) ab54d286 ffffffff

x86_64:

SIZE: 92 CRC: 7793a7a6 RES: 00000000
LBA: 0000000000000001 BLBA: 00000000003fffef
GUID: ^����0F�=Tn��

AME: EFI PART
(00) 20494645 54524150
(08) 00010000 0000005c
(16) 7793a7a6 00000000
(24) 00000001 00000000
(32) 003fffef 00000000
(40) 00000022 00000000
(48) 003fffce 00000000
(56) ef90865e 460330d0
(64) 6e543d99 0d1be7b0
(72) 00000002 00000000
(80) 00000080 00000080
(88) ab54d286 00007f00

@dankamongmen
Copy link
Owner Author

OK, crc32() is most certainly endian-sensitive at the word level, no matter what dumbasses say on the internet. argh.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug core non-ui code, common code shared by all uis
Projects
None yet
Development

No branches or pull requests

1 participant