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

Bring back mount #231

Merged
merged 3 commits into from
Jan 28, 2016
Merged

Bring back mount #231

merged 3 commits into from
Jan 28, 2016

Conversation

kamalmarhubi
Copy link
Member

Fixes #85

@kamalmarhubi kamalmarhubi force-pushed the enable-mount branch 5 times, most recently from 6ad4b1d to 356ad90 Compare January 13, 2016 20:49
@kamalmarhubi
Copy link
Member Author

(Rebased)

@carllerche
Copy link
Contributor

Hmmm... it doesn't seem to pass CI. Unsure why.

@kamalmarhubi
Copy link
Member Author

Nightly I think is some nightly weirdness. 1.1.0 is because the test is using Result::expect(), which was added in 1.4.0. I'll update it to use unwrap() or unwrap_or_else() given the desire to test on 1.3.0.

@kamalmarhubi kamalmarhubi force-pushed the enable-mount branch 9 times, most recently from 536a641 to 46fcb4a Compare January 19, 2016 06:43
@kamalmarhubi
Copy link
Member Author

@carllerche I've bashed Travis into submission*. Please check the test to see if what's going on makes sense. Thanks!

* well, Travis forced me to disable one of the tests in CI, but we'll make do.

@carllerche
Copy link
Contributor

Instead of re-implementing the test runner, is it possible to use Once (call once) construct to do initialization?

@kamalmarhubi
Copy link
Member Author

Sadly not. The unshare call must happen before any threads are spawned. The built-in runner does not have any way to get code to run before that.

@kamalmarhubi
Copy link
Member Author

Other alternatives include doing weird things with fork / exec and exit statuses to communicate success or failure to the runner.

@kamalmarhubi
Copy link
Member Author

@carllerche ping for comments on the test runner

@kamalmarhubi
Copy link
Member Author

I'll merge this soon, leaving the "test runner" as is. I filed #248 to track its improvement.

@kamalmarhubi kamalmarhubi force-pushed the enable-mount branch 2 times, most recently from 487d64b to 62809fb Compare January 28, 2016 02:51
@kamalmarhubi kamalmarhubi merged commit 62809fb into nix-rust:master Jan 28, 2016
asomers added a commit to asomers/nix that referenced this pull request Dec 16, 2023
As originally written by @kamamalmarhubi in nix-rust#231, these tests made
clever use of Linux namespaces in order to run as unprivileged users.
However, a subsequent kernel bug broke this functionality, and it hasn't
been fixed even 6 years later.  The tests have been skipped ever since.

Get the tests to run again by removing the namespace stuff and
requiring privileges instead.  Also, remove the custom test harness.
Now Nix will be compatible with tools like cargo-nextest.

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1659087
@asomers asomers mentioned this pull request Dec 16, 2023
3 tasks
asomers added a commit to asomers/nix that referenced this pull request Dec 16, 2023
As originally written by @kamalmarhubi in nix-rust#231, these tests made
clever use of Linux namespaces in order to run as unprivileged users.
However, a subsequent kernel bug broke this functionality, and it hasn't
been fixed even 6 years later.  The tests have been skipped ever since.

Get the tests to run again by removing the namespace stuff and
requiring privileges instead.  Also, remove the custom test harness.
Now Nix will be compatible with tools like cargo-nextest.

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1659087
asomers added a commit to asomers/nix that referenced this pull request Dec 16, 2023
As originally written by @kamalmarhubi in nix-rust#231, these tests made
clever use of Linux namespaces in order to run as unprivileged users.
However, a subsequent kernel bug broke this functionality, and it hasn't
been fixed even 6 years later.  The tests have been skipped ever since.

Get the tests to run again by removing the namespace stuff and
requiring privileges instead.  Also, remove the custom test harness.
Now Nix will be compatible with tools like cargo-nextest.

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1659087
asomers added a commit to asomers/nix that referenced this pull request Jan 6, 2024
As originally written by @kamalmarhubi in nix-rust#231, these tests made
clever use of Linux namespaces in order to run as unprivileged users.
However, a subsequent kernel bug broke this functionality, and it hasn't
been fixed even 6 years later.  The tests have been skipped ever since.

Get the tests to run again by removing the namespace stuff and
requiring privileges instead.  Also, remove the custom test harness.
Now Nix will be compatible with tools like cargo-nextest.

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1659087
asomers added a commit to asomers/nix that referenced this pull request Jan 14, 2024
As originally written by @kamalmarhubi in nix-rust#231, these tests made
clever use of Linux namespaces in order to run as unprivileged users.
However, a subsequent kernel bug broke this functionality, and it hasn't
been fixed even 6 years later.  The tests have been skipped ever since.

Get the tests to run again by removing the namespace stuff and
requiring privileges instead.  Also, remove the custom test harness.
Now Nix will be compatible with tools like cargo-nextest.

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1659087
asomers added a commit to asomers/nix that referenced this pull request Feb 7, 2024
As originally written by @kamalmarhubi in nix-rust#231, these tests made
clever use of Linux namespaces in order to run as unprivileged users.
However, a subsequent kernel bug broke this functionality, and it hasn't
been fixed even 6 years later.  The tests have been skipped ever since.

Get the tests to run again by removing the namespace stuff and
requiring privileges instead.  Also, remove the custom test harness.
Now Nix will be compatible with tools like cargo-nextest.

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1659087
github-merge-queue bot pushed a commit that referenced this pull request Feb 9, 2024
* Fix the mount tests

As originally written by @kamalmarhubi in #231, these tests made
clever use of Linux namespaces in order to run as unprivileged users.
However, a subsequent kernel bug broke this functionality, and it hasn't
been fixed even 6 years later.  The tests have been skipped ever since.

Get the tests to run again by removing the namespace stuff and
requiring privileges instead.  Also, remove the custom test harness.
Now Nix will be compatible with tools like cargo-nextest.

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1659087

* Move the mount tests into the "test" program

Now that we aren't using namespaces, they don't need their own program.

* Use "sudo" to run tests on github workflows.

Because several of the tests require root privileges.

But don't use sudo with cross.  It fails due to a known issue upstream:
cross-rs/cross#526
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