"Running the Test Suite" root user

  • Open
  • quality assurance status badge
Details
2 participants
  • Tobias Geerinckx-Rice
  • mikadoZero
Owner
unassigned
Submitted by
mikadoZero
Severity
normal
M
M
mikadoZero wrote on 30 Mar 2019 13:47
(address . bug-guix@gnu.org)
cuc5zs05y0z.fsf@yandex.com
Looking at "2.3 Running the Test Suite" of the manual it does not
mention that tests should be run as a non root user.

The test `tests/pack` fails when `make check` is run as a root user. It
does not fail when run as a non root user. I found this example by
running `make check TESTS="tests/pack.scm"`. Is this an issue for many
tests?

I can prepare a patch for the relevant part (parts if this also applies
to `make check-system` as well) in "2.3 Running the Test Suite" of the
manual.

Should `make check-system` also be run as a non root user to avoid
failing tests?

Is there a section in the manual that explains why tests should not be
run as a root user which I can just refer to in the patch? If not could
anyone provide an explanation which I could include in the patch?
T
T
Tobias Geerinckx-Rice wrote on 30 Mar 2019 14:50
(name . mikadoZero)(address . mikadozero@yandex.com)(address . 35047@debbugs.gnu.org)
874l7ka2ve.fsf@nckx
mikadoZero,

mikadoZero wrote:
Toggle quote (4 lines)
> Looking at "2.3 Running the Test Suite" of the manual it does
> not
> mention that tests should be run as a non root user.

I guess this is one of those (Unix-)cultural knowledge things: it
wouldn't even occur to me to build or test anything as root unless
explicitly asked to do so :-)

Toggle quote (14 lines)
> The test `tests/pack` fails when `make check` is run as a root
> user. It
> does not fail when run as a non root user. I found this example
> by
> running `make check TESTS="tests/pack.scm"`. Is this an issue
> for many
> tests?
>
> I can prepare a patch for the relevant part (parts if this also
> applies
> to `make check-system` as well) in "2.3 Running the Test Suite"
> of the
> manual.

Thanks for the offer! I think adding yet another gotcha to the
manual should be a last resort, though. Many people still miss
them and get into trouble (and on to IRC).

Could we, in order of preference:

- make these tests pass even when run as root? (I guess not?)
- skip them and add ‘n tests not run as root’ to the final tally?
- refuse to even start the test suite as root?

What ‘root’ means here will depend on why these tests are failing.

Kind regards,

T G-R
-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQT12iAyS4c9C3o4dnINsP+IT1VteQUCXJ90KwAKCRANsP+IT1Vt
eSOSAQCiLU+fJfaMQguGFjKiI0unkMAE4Ep2DERF7SUl4r9iuwD8CU+8Ezk8MDFu
EcdXKz3MlZ3x45WKrdUu7KKNFD9hyQs=
=idEb
-----END PGP SIGNATURE-----

M
M
mikadoZero wrote on 30 Mar 2019 16:30
(name . Tobias Geerinckx-Rice)(address . me@tobias.gr)(address . 35047@debbugs.gnu.org)
cuc4l7k5qhf.fsf@yandex.com
Tobias Geerinckx-Rice writes:

Toggle quote (39 lines)
> mikadoZero,
>
> mikadoZero wrote:
>> Looking at "2.3 Running the Test Suite" of the manual it does not
>> mention that tests should be run as a non root user.
>
> I guess this is one of those (Unix-)cultural knowledge things: it
> wouldn't even occur to me to build or test anything as root unless
> explicitly asked to do so :-)
>
>> The test `tests/pack` fails when `make check` is run as a root user.
>> It
>> does not fail when run as a non root user. I found this example by
>> running `make check TESTS="tests/pack.scm"`. Is this an issue for
>> many
>> tests?
>>
>> I can prepare a patch for the relevant part (parts if this also
>> applies
>> to `make check-system` as well) in "2.3 Running the Test Suite" of
>> the
>> manual.
>
> Thanks for the offer! I think adding yet another gotcha to the manual
> should be a last resort, though. Many people still miss them and get
> into trouble (and on to IRC).
>
> Could we, in order of preference:
>
> - make these tests pass even when run as root? (I guess not?)
> - skip them and add ‘n tests not run as root’ to the final tally?
> - refuse to even start the test suite as root?
>
> What ‘root’ means here will depend on why these tests are failing.
>
> Kind regards,
>
> T G-R

Preventing the issue instead of warning of it in the manual sounds like
a better solution to me.
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 35047@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 35047
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch