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 group calls to android #3499

Merged
merged 1 commit into from
Nov 13, 2024
Merged

Add group calls to android #3499

merged 1 commit into from
Nov 13, 2024

Conversation

Takashiidobe
Copy link
Contributor

@Takashiidobe Takashiidobe commented Dec 25, 2023

Following #3014, this PR just implements the group side of the calls, since that doesn't require CI to be updated.

@rustbot
Copy link
Collaborator

rustbot commented Dec 25, 2023

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @JohnTitor (or someone else) soon.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@JohnTitor
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Dec 29, 2023

📌 Commit 533b8cc has been approved by JohnTitor

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Dec 29, 2023

⌛ Testing commit 533b8cc with merge e794d17...

bors added a commit that referenced this pull request Dec 29, 2023
Add group calls to android

Following #3014, this PR just implements the group side of the calls, since that doesn't require CI to be updated.
@bors
Copy link
Contributor

bors commented Dec 29, 2023

💔 Test failed - checks-actions

@Takashiidobe
Copy link
Contributor Author

I'll reopen this when the android CI gets fixed up.

@Takashiidobe
Copy link
Contributor Author

perfect, looks like I get this error message on arm-linux-androideabi, time to fix it up

stderr ---
WARNING: linker: /data/local/tmp/main-418f900fe48d7afe: unsupported flags DT_FLAGS_1=0x8000001
CANNOT LINK EXECUTABLE "/data/local/tmp/main-418f900fe48d7afe": cannot locate symbol "setgrent" referenced by "/data/local/tmp/main-418f900fe48d7afe"...

@tgross35
Copy link
Contributor

@Takashiidobe would you be able to rebase? I can help figure out the problems if they still exist.

@Takashiidobe
Copy link
Contributor Author

Takashiidobe commented Nov 13, 2024

Still get the same error message, and I think I remember why.

CI is on API 24 which is before these calls were introduced (API 26) so this PR won't pass.

Just to sanity check, I ran it on my phone which is on API 31, and writing a small program to call getgrent works.

I'm not sure if there's a requirement on API level being capped at 24 (if so, then this PR shouldn't pass until that's changed) or if that's a CI limitation?

@tgross35
Copy link
Contributor

tgross35 commented Nov 13, 2024

You should just be able to exclude tests for the relevant functions in libc-test/build.rs the test_android function.

Cc @maurer (android change)

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.

LGTM but I'll wait for maurer to take a look. Please squash & rebase.

… 26, with exclusions to testing since CI is currently on API 24
@maurer
Copy link

maurer commented Nov 13, 2024

This is fine/appropriate to put into libc in case it's needed for compatibility.

To @Takashiidobe - these functions are performance footguns - Android has too many AIDs, so iterating through them in this fashion can take a nontrivial amount of time, ID based functions are preferred. Iterating via getgrent may take up to an eighth of a second to get through everything. They were primarily added for compatibility and tests.

@tgross35 tgross35 added this pull request to the merge queue Nov 13, 2024
@tgross35 tgross35 added the stable-nominated This PR should be considered for cherry-pick to libc's stable release branch label Nov 13, 2024
Merged via the queue into rust-lang:main with commit 75aea56 Nov 13, 2024
43 checks passed
tgross35 pushed a commit to tgross35/rust-libc that referenced this pull request Nov 15, 2024
… 26, with exclusions to testing since CI is currently on API 24

(backport <rust-lang#3499>)
(cherry picked from commit fd4b70c)
@tgross35 tgross35 mentioned this pull request Nov 15, 2024
@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 Nov 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author 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.

6 participants