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 ub-int-array test for big-endian platforms #115167

Merged
merged 1 commit into from
Aug 25, 2023

Conversation

uweigand
Copy link
Contributor

As of commit 7767cbb, the tests/ui/consts/const-eval/ub-int-array.rs test is failing on big-endian platforms (in particular s390x), as the stderr output contains a hex dump that depends on endianness.

Since this point intentionally verifies the hex dump to check the uninitialized byte markers, I think we should not simply standardize away the hex dump as is done with some of the other tests in this directory.

However, most of the test is already endian-independent. The only exception is one line of hex dump, which can also be made endian-independent by choosing appropriate constants in the source code.

Since the 32bit and 64bit stderr outputs were already (and remain) identical, I've merged them and removed the stderr-per-bitwidth marker.

Fixes (again) #105383.

As of commit 7767cbb,
the tests/ui/consts/const-eval/ub-int-array.rs test is
failing on big-endian platforms (in particular s390x),
as the stderr output contains a hex dump that depends
on endianness.

Since this point intentionally verifies the hex dump to
check the uninitialized byte markers, I think we should
not simply standardize away the hex dump as is done with
some of the other tests in this directory.

However, most of the test is already endian-independent.
The only exception is one line of hex dump, which can
also be made endian-independent by choosing appropriate
constants in the source code.

Since the 32bit and 64bit stderr outputs were already
(and remain) identical, I've merged them and removed
the stderr-per-bitwidth marker.

Fixes (again) rust-lang#105383.
@rustbot
Copy link
Collaborator

rustbot commented Aug 24, 2023

r? @b-naber

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Aug 24, 2023
@uweigand
Copy link
Contributor Author

FYI @RalfJung

@RalfJung
Copy link
Member

Yeah I guess these will keep sneaking back in when CI doesn't check big-endian output...
@bors r+ rollup

@bors
Copy link
Contributor

bors commented Aug 24, 2023

📌 Commit 2063067 has been approved by RalfJung

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 24, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 25, 2023
Rollup of 9 pull requests

Successful merges:

 - rust-lang#114987 (elaborate a bit on the (lack of) safety in 'Mmap::map')
 - rust-lang#115084 (Add smir `predicates_of`)
 - rust-lang#115117 (Detect and report nix shell)
 - rust-lang#115124 (kmc-solid: Import `std::sync::PoisonError` in `std::sys::solid::os`)
 - rust-lang#115152 (refactor(lint): translate `RenamedOrRemovedLint`)
 - rust-lang#115154 (Move some ui tests to subdirectories)
 - rust-lang#115167 (Fix ub-int-array test for big-endian platforms)
 - rust-lang#115172 (Add more tests for if_let_guard)
 - rust-lang#115177 (Add symbols for Clippy usage)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit c996197 into rust-lang:master Aug 25, 2023
@rustbot rustbot added this to the 1.74.0 milestone Aug 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants