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

Add test for checking used glibc symbols #135164

Merged
merged 5 commits into from
Jan 23, 2025

Conversation

Kobzol
Copy link
Contributor

@Kobzol Kobzol commented Jan 6, 2025

This test checks that we do not use too new glibc symbols in the compiler on x64 GNU Linux, in order not to break our glibc promises.

One thing that isn't solved in the PR yet is to make sure that this test will only run on dist CI, more specifically on the dist-x86_64-linux runner, in the opt-dist post-optimization tests (it can fail elsewhere, that doesn't matter). Any suggestions on how to do that are welcome.

Fixes: #134037

r? @jieyouxu

@rustbot rustbot added A-run-make Area: port run-make Makefiles to rmake.rs 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 Jan 6, 2025
@jieyouxu
Copy link
Member

jieyouxu commented Jan 6, 2025

One thing that isn't solved in the PR yet is to make sure that this test will only run on dist CI, more specifically on the dist-x86_64-linux runner, in the opt-dist post-optimization tests (it can fail elsewhere, that doesn't matter). Any suggestions on how to do that are welcome.

The easiest way is probably to just have a COMPILETEST_ENABLE_OPT_DIST_TESTS env var set by opt-dist only when running the post-PGO tests, then compiletest can implement a directive //@ only-opt-dist-tests which is satisfied if COMPILETEST_ENABLE_OPT_DIST_TESTS is set.

It kinda side-steps bootstrap, but this is not that big of a problem. Would be great if you can document this caveat somewhere on rustc-dev-guide (maybe in run-make test docs), just so that if this ever fails, someone will have any idea on how to even run it.

@rust-log-analyzer

This comment has been minimized.

@jieyouxu jieyouxu added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 6, 2025
@Kobzol Kobzol force-pushed the run-make-test-glibc-symbols branch from 1f74654 to 70921f5 Compare January 20, 2025 15:58
@rustbot rustbot added A-compiletest Area: The compiletest test runner A-rustc-dev-guide Area: rustc-dev-guide A-testsuite Area: The testsuite used to check the correctness of rustc T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Jan 20, 2025
@Kobzol
Copy link
Contributor Author

Kobzol commented Jan 20, 2025

@bors try

bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 20, 2025
…r=<try>

Add test for checking used glibc symbols

This test checks that we do not use too new glibc symbols in the compiler on x64 GNU Linux, in order not to break our [glibc promises](https://blog.rust-lang.org/2022/08/01/Increasing-glibc-kernel-requirements.html).

One thing that isn't solved in the PR yet is to make sure that this test will only run on `dist` CI, more specifically on the `dist-x86_64-linux` runner, in the opt-dist post-optimization tests (it can fail elsewhere, that doesn't matter). Any suggestions on how to do that are welcome.

Fixes: rust-lang#134037

r? `@jieyouxu`
@bors
Copy link
Contributor

bors commented Jan 20, 2025

⌛ Trying commit 70921f5 with merge 52402df...

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Jan 20, 2025

☀️ Try build successful - checks-actions
Build commit: 52402df (52402dfa4fecc951e51d1111d1534e77958efa83)

@Kobzol Kobzol force-pushed the run-make-test-glibc-symbols branch from 70921f5 to 1de6710 Compare January 21, 2025 09:20
@Kobzol
Copy link
Contributor Author

Kobzol commented Jan 21, 2025

Huh, opt-dist tests no longer show in verbose mode, unfortunate. I enabled it in a separate commit.

@bors try

@bors
Copy link
Contributor

bors commented Jan 21, 2025

⌛ Trying commit 1de6710 with merge b746d2f...

bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 21, 2025
…r=<try>

Add test for checking used glibc symbols

This test checks that we do not use too new glibc symbols in the compiler on x64 GNU Linux, in order not to break our [glibc promises](https://blog.rust-lang.org/2022/08/01/Increasing-glibc-kernel-requirements.html).

One thing that isn't solved in the PR yet is to make sure that this test will only run on `dist` CI, more specifically on the `dist-x86_64-linux` runner, in the opt-dist post-optimization tests (it can fail elsewhere, that doesn't matter). Any suggestions on how to do that are welcome.

Fixes: rust-lang#134037

r? `@jieyouxu`
@bors
Copy link
Contributor

bors commented Jan 21, 2025

☀️ Try build successful - checks-actions
Build commit: b746d2f (b746d2f1e4772b60e9f3c46bff3113da75cbb20b)

@Kobzol
Copy link
Contributor Author

Kobzol commented Jan 21, 2025

@bors try

@bors
Copy link
Contributor

bors commented Jan 21, 2025

⌛ Trying commit 6f93f7a with merge 63cdc3c...

bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 21, 2025
…r=<try>

Add test for checking used glibc symbols

This test checks that we do not use too new glibc symbols in the compiler on x64 GNU Linux, in order not to break our [glibc promises](https://blog.rust-lang.org/2022/08/01/Increasing-glibc-kernel-requirements.html).

One thing that isn't solved in the PR yet is to make sure that this test will only run on `dist` CI, more specifically on the `dist-x86_64-linux` runner, in the opt-dist post-optimization tests (it can fail elsewhere, that doesn't matter). Any suggestions on how to do that are welcome.

Fixes: rust-lang#134037

r? `@jieyouxu`
@jieyouxu
Copy link
Member

@bors r- (since full CI hasn't started)

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jan 22, 2025
@jieyouxu
Copy link
Member

(Feel free to r=me with the nit)

@Kobzol
Copy link
Contributor Author

Kobzol commented Jan 22, 2025

@bors r=jieyouxu

@bors
Copy link
Contributor

bors commented Jan 22, 2025

📌 Commit 5482bba has been approved by jieyouxu

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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 22, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 22, 2025
…r=jieyouxu

Add test for checking used glibc symbols

This test checks that we do not use too new glibc symbols in the compiler on x64 GNU Linux, in order not to break our [glibc promises](https://blog.rust-lang.org/2022/08/01/Increasing-glibc-kernel-requirements.html).

One thing that isn't solved in the PR yet is to make sure that this test will only run on `dist` CI, more specifically on the `dist-x86_64-linux` runner, in the opt-dist post-optimization tests (it can fail elsewhere, that doesn't matter). Any suggestions on how to do that are welcome.

Fixes: rust-lang#134037

r? `@jieyouxu`
@bors
Copy link
Contributor

bors commented Jan 22, 2025

⌛ Testing commit 5482bba with merge 61f78e2...

@rust-log-analyzer
Copy link
Collaborator

The job x86_64-rust-for-linux failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

@bors
Copy link
Contributor

bors commented Jan 22, 2025

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jan 22, 2025
@Kobzol
Copy link
Contributor Author

Kobzol commented Jan 22, 2025

@bors retry Network error

@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 Jan 22, 2025
@matthiaskrgr
Copy link
Member

@bors p=5 (scheduling)

// Use objdump instead, since it seems to work, and we only run this test in a specific
// CI environment anyway.
cmd("objdump")
.arg("--dynamic-syms")
Copy link
Member

Choose a reason for hiding this comment

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

FWIW, I find readelf -V (--version-info) easier to deal with, especially looking just at the latter .gnu.version_r section of the output. It looks like llvm-readelf supports this too, without choking on the current library. You can't see the name the relevant symbols this way though.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wanted the test to print the offending symbols, to give us a notion of what symbols cause the issue.

@bors
Copy link
Contributor

bors commented Jan 23, 2025

⌛ Testing commit 5482bba with merge 3cd8fcb...

@bors
Copy link
Contributor

bors commented Jan 23, 2025

☀️ Test successful - checks-actions
Approved by: jieyouxu
Pushing 3cd8fcb to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jan 23, 2025
@bors bors merged commit 3cd8fcb into rust-lang:master Jan 23, 2025
7 checks passed
@rustbot rustbot added this to the 1.86.0 milestone Jan 23, 2025
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (3cd8fcb): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (primary 0.2%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
2.5% [2.5%, 2.5%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.0% [-2.0%, -2.0%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.2% [-2.0%, 2.5%] 2

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 777.336s -> 776.393s (-0.12%)
Artifact size: 325.94 MiB -> 325.90 MiB (-0.01%)

@Kobzol Kobzol deleted the run-make-test-glibc-symbols branch January 23, 2025 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-compiletest Area: The compiletest test runner A-run-make Area: port run-make Makefiles to rmake.rs A-rustc-dev-guide Area: rustc-dev-guide A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) 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.

Add tests for checking the glibc version required by rustc
9 participants