Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 761742 - dev-python/rpyc is missing tests
Summary: dev-python/rpyc is missing tests
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Andrey Grozin
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-26 08:21 UTC by Michał Górny
Modified: 2021-01-13 15:40 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2020-12-26 08:21:19 UTC
The upstream repository definitely has tests.  Please fix.
Comment 1 Andrey Grozin gentoo-dev 2020-12-27 09:28:45 UTC
rpyc is about interaction of python programs on different computers; tests, naturally, use localhost everywhere. Many tests start server processes listening on localhost:18878, start clients and check if they can communicate. Are such tests allowed in src_test()? Some tests need sshd running and assume that
ssh localhost
requires no password. Such tests should be disabled, I suppose.

A strange observation: when I run all test filesone-by-one as
python test_foo.py
they all succeed (with running sshd). But if I use pytest (or nosetests) in the package directory, some tests fail (or hang). Seems different tests interfere somehow.
Comment 2 Andrey Grozin gentoo-dev 2020-12-27 09:39:56 UTC
One more question, sorry. Some tests are run only if some external packages are installed (e.g., numpy, pandas, gevent, even gdb). What should I do?
1. Allow this automagic behavior
2. Disable all such tests
3. Introduce a bunch of USE flags to DEPEND on these packages if FEATURES=test
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2020-12-27 10:13:57 UTC
Starting local servers on localhost is fine.  The general idea is that if it works with FEATURES=network-sandbox, it's fine.

Tests relying on system sshd should be disabled indeed.  Well, unless you can start some kind of local sshd and direct it to use it, preferably some kind of fake/honeypot sshd, so that we don't accidentally open up network access to the build account.

It is possible that not all tests are run when you run the files directly.  Try running pytest on each file separately and see what happens.

Optional test deps are fine.  Generally hard test-depend on them, so that all tests are actually run while arch-testing and people get reproducible results.  If something is not packaged, ignore it.
Comment 4 Larry the Git Cow gentoo-dev 2021-01-13 15:40:18 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f31c367c05e0894d626cd08e896b5c94c44bc61d

commit f31c367c05e0894d626cd08e896b5c94c44bc61d
Author:     Andrey Grozin <grozin@gentoo.org>
AuthorDate: 2021-01-13 15:39:26 +0000
Commit:     Andrey Grozin <grozin@gentoo.org>
CommitDate: 2021-01-13 15:39:58 +0000

    dev-python/rpyc: bump to 5.0.1
    
    Closes: https://bugs.gentoo.org/761742
    Package-Manager: Portage-3.0.13, Repoman-3.0.2
    Signed-off-by: Andrey Grozin <grozin@gentoo.org>

 dev-python/rpyc/Manifest          |  1 +
 dev-python/rpyc/metadata.xml      |  7 +++++
 dev-python/rpyc/rpyc-5.0.1.ebuild | 57 +++++++++++++++++++++++++++++++++++++++
 3 files changed, 65 insertions(+)