Skip to content

ci: Fixes for sparc and s390x #4317

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

Merged
merged 2 commits into from
Mar 11, 2025
Merged

ci: Fixes for sparc and s390x #4317

merged 2 commits into from
Mar 11, 2025

Conversation

tammela
Copy link
Contributor

@tammela tammela commented Mar 10, 2025

Description

Fixes the 'cannot find libc' error plaguing s390x and sparc. A side effect is that now these CIs will be tested on much more recent kernel headers (6.11).

Sources

Checklist

  • Relevant tests in libc-test/semver have been updated
  • No placeholder or unstable values like *LAST or *MAX are
    included (see #3131)
  • Tested locally (cd libc-test && cargo test --target mytarget);
    especially relevant for platforms that may not be checked in CI

Sorry, something went wrong.

tammela added 2 commits March 10, 2025 16:54
Signed-off-by: Pedro Tammela <pctammela@gmail.com>

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Signed-off-by: Pedro Tammela <pctammela@gmail.com>
@rustbot
Copy link
Collaborator

rustbot commented Mar 10, 2025

r? @tgross35

rustbot has assigned @tgross35.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Copy link
Contributor

@tgross35 tgross35 left a comment

Choose a reason for hiding this comment

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

Awesome, thank you!

Do you know why the "`GLIBC_2.39' not found (required by /prog)" was showing up before for similar changes but no longer is?

@tgross35 tgross35 added this pull request to the merge queue Mar 11, 2025
@tgross35 tgross35 added the stable-nominated This PR should be considered for cherry-pick to libc's stable release branch label Mar 11, 2025
Merged via the queue into rust-lang:main with commit 9eb5aab Mar 11, 2025
43 checks passed
@tgross35
Copy link
Contributor

This seems to have doubled s390x CI time from ~5 minutes to ~10 minutes. Not too much of a concern since it doesn't increase our total CI time by much, but I'm not sure why this would have changed.

tgross35 pushed a commit to tgross35/rust-libc that referenced this pull request Mar 11, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Signed-off-by: Pedro Tammela <pctammela@gmail.com>

(backport <rust-lang#4317>)
(cherry picked from commit 4776e0f)
tgross35 pushed a commit to tgross35/rust-libc that referenced this pull request Mar 11, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Signed-off-by: Pedro Tammela <pctammela@gmail.com>

(backport <rust-lang#4317>)
(cherry picked from commit 1ae6552)
@tgross35 tgross35 mentioned this pull request Mar 11, 2025
@tgross35 tgross35 added stable-applied This PR has been cherry-picked to libc's stable release branch and removed stable-nominated This PR should be considered for cherry-pick to libc's stable release branch labels Mar 11, 2025
@tammela
Copy link
Contributor Author

tammela commented Mar 11, 2025

This seems to have doubled s390x CI time from ~5 minutes to ~10 minutes. Not too much of a concern since it doesn't increase our total CI time by much, but I'm not sure why this would have changed.

So it turns out s390x was not running at all, it was failing 5 times with the libc error then silently succeeding

@tgross35
Copy link
Contributor

Oh wtf, great catch. We can probably clean up

libc/ci/run.sh

Lines 96 to 124 in 1c65dda

if [ "$target" = "s390x-unknown-linux-gnu" ]; then
# FIXME: s390x-unknown-linux-gnu often fails to test due to timeout,
# so we retry this N times.
N=5
n=0
passed=0
until [ $n -ge $N ]; do
if [ "$passed" = "0" ]; then
# shellcheck disable=SC2086
if $cmd --no-default-features -- $test_flags; then
passed=$((passed+1))
continue
fi
elif [ "$passed" = "1" ]; then
# shellcheck disable=SC2086
if $cmd -- $test_flags; then
passed=$((passed+1))
continue
fi
elif [ "$passed" = "2" ]; then
# shellcheck disable=SC2086
if $cmd --features extra_traits -- $test_flags; then
break
fi
fi
n=$((n+1))
sleep 1
done
else
at some point then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-gnu O-linux O-unix S-waiting-on-review stable-applied This PR has been cherry-picked to libc's stable release branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants