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

Enable ptrace on all Linux platforms #624

Merged
merged 1 commit into from
Jul 9, 2017

Conversation

geofft
Copy link
Contributor

@geofft geofft commented Jun 20, 2017

Nothing that nix currently binds is architecture-specific, and Android
supports ptrace just as much as non-Android Linux.

@geofft
Copy link
Contributor Author

geofft commented Jun 20, 2017

I noticed this in the course of adding a test for #566.... but also in the course of adding a test for #566 I learned that qemu-user doesn't emulate ptrace on anything other than x86 or x86-64. So getting test coverage for this change is going to be hard.

@Susurrus
Copy link
Contributor

As for tests, couldn't you have a test that just makes any call and even if an Err is returned, it passes? This way we could at least confirm that ptrace is available on the correct platforms.

@Susurrus
Copy link
Contributor

Additionally we can run actual tests only on non-qemu targets.

@Susurrus
Copy link
Contributor

Susurrus commented Jul 3, 2017

@geofft This needs a CHANGELOG entry and a rebase and it should be good to merge.

@Susurrus Susurrus mentioned this pull request Jul 4, 2017
10 tasks
Nothing that nix currently binds is architecture-specific, and Android
supports ptrace just as much as non-Android Linux.
@geofft geofft force-pushed the ptrace-all-linux branch from ff36142 to 0bf5af5 Compare July 9, 2017 02:35
@geofft
Copy link
Contributor Author

geofft commented Jul 9, 2017

@Susurrus rebased, added a changelog entry, and added a test that ptracing yourself fails with either EPERM (expected) or ENOSYS (qemu-user). Lemme know if you need anything else and sorry for being slow to do this!

@Susurrus
Copy link
Contributor

Susurrus commented Jul 9, 2017

LGTM. Eventually I'd like to have a few ptrace tests that actuall do stuff if possible, but we'll defer on that for now. This test you added is at least good enough for this PR. Thanks for adding it!

bors r+

bors bot added a commit that referenced this pull request Jul 9, 2017
624: Enable ptrace on all Linux platforms r=Susurrus

Nothing that nix currently binds is architecture-specific, and Android
supports ptrace just as much as non-Android Linux.
@bors
Copy link
Contributor

bors bot commented Jul 9, 2017

@bors bors bot merged commit 0bf5af5 into nix-rust:master Jul 9, 2017
@geofft geofft deleted the ptrace-all-linux branch July 14, 2017 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants