Fix Python 3 testing for Nix Packaging #3748

Open
opened 2021-07-20 18:14:01 +00:00 by maylee · 6 comments
maylee commented 2021-07-20 18:14:01 +00:00
Owner

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.

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.
tahoe-lafs added the
unknown
normal
defect
n/a
labels 2021-07-20 18:14:01 +00:00
tahoe-lafs added this to the undecided milestone 2021-07-20 18:14:01 +00:00
tahoe-lafs modified the milestone from undecided to Integration and Unit Testing 2021-07-20 18:17:01 +00:00
itamarst was assigned by tahoe-lafs 2021-07-20 18:17:01 +00:00
maylee commented 2021-07-21 16:26:22 +00:00
Author
Owner

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

The `test_python3.py` module can be removed, according to itamarst.
aaronjanse commented 2021-07-22 03:33:56 +00:00
Author
Owner

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 :-)

> 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 :-)

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

Opened #3751 to delete the Python 3-porting related tests, e.g. `test_python3.py`. I will implement that myself.
maylee commented 2021-07-28 10:26:37 +00:00
Author
Owner

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

Opened a new ticket for listing the tests: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/3752#ticket>
PR for #3751 <https://github.com/tahoe-lafs/tahoe-lafs/pull/1098>

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.

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.
Sign in to join this conversation.
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Reference: tahoe-lafs/trac-2024-07-25#3748
No description provided.