#3748 new defect

Fix Python 3 testing for Nix Packaging

Reported by: maylee Owned by: itamarst
Priority: normal Milestone: Integration and Unit Testing
Component: unknown Version: n/a
Keywords: Cc:
Launchpad Bug:

Description

A new Tahoe-LAFS package for Nix is here:

https://github.com/aaronjanse/nixpkgs/tree/aj2021jul-tahoe

However, there are issues with tests. Specifically, Nix runs tests in a chroot without internet access, which breaks tests like test_listen_on_zero_with_host

It is suggested that we should fix, delete, or somehow mark as needing special attention any unit tests that require internet access to pass. However, to prevent blocking the Nix packaging work, the names of any such tests should be added to this ticket so it's easier for someone to address the issue later.

In the meantime, could the Nix packaging mark them to be skipped (or deleting them or whatever the prevailing Nix convention for dealing with such things is now).

Additionally, it's been noted that test_listen_on_zero_with_host is already marked as "todo". Does it still manage to fail in the Nix build environment somehow? "todo" is supposed to mean "it will fail but the test suite should still be considered passing". test_ported_modules_exist was a useful tool during the Python 3 porting process but since that has largely concluded at this point perhaps that test (and ... even ... the whole test_python3.py module?) could be removed.

Change History (7)

comment:1 Changed at 2021-07-20T18:17:01Z by maylee

  • Milestone changed from undecided to Integration and Unit Testing
  • Owner set to itamarst

comment:2 Changed at 2021-07-21T16:26:22Z by maylee

The test_python3.py module can be removed, according to itamarst.

Version 0, edited at 2021-07-21T16:26:22Z by maylee (next)

comment:3 Changed at 2021-07-22T03:33:56Z by aaronjanse

In the meantime, could the Nix packaging mark them to be skipped

Yep! I think this is probably the best solution long-term (rather than forcing upstream Tahoe-LAFS to manage things), since other people do want internet-connected tests to be run, and Nixpkgs is familiar with handling scenarios where some tests cannot run due to the sandbox.

I mostly wanted to make sure that disabling the Python 3 tests wouldn't cause Bad Things to happen. It sounds like it's okay to tell Nix to skip the Python 3 tests, so that's what I'll do :-)

comment:4 Changed at 2021-07-27T17:45:51Z by itamarst

Opened #3751 to delete the Python 3-porting related tests, e.g. test_python3.py. I will implement that myself.

comment:5 Changed at 2021-07-28T10:26:37Z by maylee

Opened a new ticket for listing the tests: https://tahoe-lafs.org/trac/tahoe-lafs/ticket/3752#ticket

Last edited at 2021-07-28T10:26:57Z by maylee (previous) (diff)

comment:7 Changed at 2021-08-02T13:53:28Z by itamarst

OK, PR is merged, so test_python3.py should no longer be an impediment for anything else you need to do to get tests to run in Nix.

Note: See TracTickets for help on using tickets.