#4049 closed defect (fixed)

Some tests fail when run with superuser privileges

Reported by: exarkun Owned by: GitHub <noreply@…>
Priority: normal Milestone: undecided
Component: unknown Version: n/a
Keywords: Cc:
Launchpad Bug:

Description

  • test_sign_bad_perms
  • test_unreadable_config
  • test_private_config_unreadable
  • test_private_config_unreadable_preexisting
  • test_write_config_unwritable_file

These all assume that the test process won't be able to read or write a path where the associated filesystem permission bit is not set. This is only true as long as the process isn't a superuser. If it is, it can do what it wants and the tests fail as a result.

It's not a great idea to run Tahoe-LAFS as a superuser but nothing we do actively _prevents_ you from doing so. Also, right now, it would be convenient to run some of the test jobs on CI as root inside a Docker container (otherwise we need to do an unknown amount of Docker image hacking to make running as another user possible).

So, skip these tests if the test process is root.

Change History (1)

comment:1 Changed at 2023-07-21T13:30:06Z by GitHub <noreply@…>

  • Owner set to GitHub <noreply@…>
  • Resolution set to fixed
  • Status changed from new to closed

In a297d6be/trunk:

Merge pull request #1316 from exarkun/4049.skip-some-when-superuser

Skip some tests when run as superuser

Fixes ticket:4049

Note: See TracTickets for help on using tickets.