Simple fix for running specs as root. #2061

Merged
merged 1 commit into from Aug 16, 2012

Conversation

Projects
None yet
3 participants
@Flameeyes
Contributor

Flameeyes commented Aug 14, 2012

This test would fail on default Gentoo installs as the package is
executed as root.

spec: do not check for /usr/bin not to be writable when running as root.
This test would fail on default Gentoo installs as the package is
executed as root.
@travisbot

This comment has been minimized.

Show comment
Hide comment
@travisbot

travisbot Aug 14, 2012

This pull request fails (merged 433b4bc into 3a1121a).

This pull request fails (merged 433b4bc into 3a1121a).

@Flameeyes

This comment has been minimized.

Show comment
Hide comment
@Flameeyes

Flameeyes Aug 14, 2012

Contributor

Uhm I think travisbot is wrong, given that error reported is:

Error: #<NativeException: org.virtualbox_4_1.VBoxException: The function "powerDown" returned an error condition: "The virtual machine is being powered down"  (0x80bb0002)>
Contributor

Flameeyes commented Aug 14, 2012

Uhm I think travisbot is wrong, given that error reported is:

Error: #<NativeException: org.virtualbox_4_1.VBoxException: The function "powerDown" returned an error condition: "The virtual machine is being powered down"  (0x80bb0002)>
@indirect

This comment has been minimized.

Show comment
Hide comment
@indirect

indirect Aug 14, 2012

Member

Um... the tests also fail if they are run outside a git repo. Does gentoo run the package tests from inside a git repo?

Member

indirect commented Aug 14, 2012

Um... the tests also fail if they are run outside a git repo. Does gentoo run the package tests from inside a git repo?

@Flameeyes

This comment has been minimized.

Show comment
Hide comment
@Flameeyes

Flameeyes Aug 14, 2012

Contributor

We have workarounds for those — I didn't want to submit those just yet, but this one seems to be valid anyway: it's just avoiding a non-writeable check, that would then always fail, when running as root.

Contributor

Flameeyes commented Aug 14, 2012

We have workarounds for those — I didn't want to submit those just yet, but this one seems to be valid anyway: it's just avoiding a non-writeable check, that would then always fail, when running as root.

@indirect

This comment has been minimized.

Show comment
Hide comment
@indirect

indirect Aug 16, 2012

Member

Is the "fix" to just disable all tests that depend on being inside a git repo when the tests run? Either way, I'd be interested in a pull with those changes. A subset of the tests that pass would be an improvement over tests that can't pass from inside an installed gem.

As for this test, it seems okay. I personally would be terrified of running any test suite as root, though. :P

Member

indirect commented Aug 16, 2012

Is the "fix" to just disable all tests that depend on being inside a git repo when the tests run? Either way, I'd be interested in a pull with those changes. A subset of the tests that pass would be an improvement over tests that can't pass from inside an installed gem.

As for this test, it seems okay. I personally would be terrified of running any test suite as root, though. :P

indirect added a commit that referenced this pull request Aug 16, 2012

Merge pull request #2061 from gentoo/master
Simple fix for running specs as root.

@indirect indirect merged commit d97ada4 into bundler:master Aug 16, 2012

@Flameeyes

This comment has been minimized.

Show comment
Hide comment
@Flameeyes

Flameeyes Aug 16, 2012

Contributor

Not really a fix, yes I think it's disabling quite a few of the git tests, and I agree, a subset passing is better than not being able to run them. I'll try to put them in shape to be merged (right now they are unconditional).

As for running as root, we're moving toward a default of not doing so but.. a number of packages actually expect root :( Luckily we use a pre-loaded library to sandbox the execution, so it's "safe enough".

Contributor

Flameeyes commented Aug 16, 2012

Not really a fix, yes I think it's disabling quite a few of the git tests, and I agree, a subset passing is better than not being able to run them. I'll try to put them in shape to be merged (right now they are unconditional).

As for running as root, we're moving toward a default of not doing so but.. a number of packages actually expect root :( Luckily we use a pre-loaded library to sandbox the execution, so it's "safe enough".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment