diff options
author | Mike Gilbert <floppym@gentoo.org> | 2017-02-21 18:58:44 -0500 |
---|---|---|
committer | Mike Gilbert <floppym@gentoo.org> | 2017-02-21 18:59:16 -0500 |
commit | ba81c88850a194ddccc120cc2f936e2bdbac24a8 (patch) | |
tree | a133ffab7a2c1dd8023f57d999bd3e0d0a1e268d /dev-python/python-systemd | |
parent | net-analyzer/darkstat: Fix dependencies. (diff) | |
download | gentoo-ba81c88850a194ddccc120cc2f936e2bdbac24a8.tar.gz gentoo-ba81c88850a194ddccc120cc2f936e2bdbac24a8.tar.bz2 gentoo-ba81c88850a194ddccc120cc2f936e2bdbac24a8.zip |
dev-python/python-systemd: xfail test_notify_with_socket if bind() fails
Bug: https://bugs.gentoo.org/610368
Package-Manager: Portage-2.3.3_p56, Repoman-2.3.1_p49
Diffstat (limited to 'dev-python/python-systemd')
-rw-r--r-- | dev-python/python-systemd/files/233-xfail-bind.patch | 31 | ||||
-rw-r--r-- | dev-python/python-systemd/python-systemd-233.ebuild | 6 |
2 files changed, 36 insertions, 1 deletions
diff --git a/dev-python/python-systemd/files/233-xfail-bind.patch b/dev-python/python-systemd/files/233-xfail-bind.patch new file mode 100644 index 000000000000..bb0fb761bd59 --- /dev/null +++ b/dev-python/python-systemd/files/233-xfail-bind.patch @@ -0,0 +1,31 @@ +From 1c0d575f7c058f227d27b1cb92d3936d0c170a5f Mon Sep 17 00:00:00 2001 +From: Mike Gilbert <floppym@gentoo.org> +Date: Tue, 21 Feb 2017 17:34:28 -0500 +Subject: [PATCH] test_daemon: xfail test_notify_with_socket if bind() fails + +This bind() call may fail if TMPDIR is too long. + +Bug: https://bugs.gentoo.org/610368 +--- + systemd/test/test_daemon.py | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/systemd/test/test_daemon.py b/systemd/test/test_daemon.py +index e827e1d..7733552 100644 +--- a/systemd/test/test_daemon.py ++++ b/systemd/test/test_daemon.py +@@ -238,7 +238,10 @@ def test_notify_bad_socket(): + def test_notify_with_socket(tmpdir): + path = tmpdir.join('socket').strpath + sock = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM) +- sock.bind(path) ++ try: ++ sock.bind(path) ++ except socket.error as e: ++ pytest.xfail('failed to bind socket (%s)' % e) + # SO_PASSCRED is not defined in python2.7 + SO_PASSCRED = getattr(socket, 'SO_PASSCRED', 16) + sock.setsockopt(socket.SOL_SOCKET, SO_PASSCRED, 1) +-- +2.11.1 + diff --git a/dev-python/python-systemd/python-systemd-233.ebuild b/dev-python/python-systemd/python-systemd-233.ebuild index fbca17a286f2..3550384d778e 100644 --- a/dev-python/python-systemd/python-systemd-233.ebuild +++ b/dev-python/python-systemd/python-systemd-233.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2016 Gentoo Foundation +# Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Id$ @@ -26,6 +26,10 @@ RDEPEND="${COMMON_DEPEND} !sys-apps/systemd[python(-)] " +PATCHES=( + "${FILESDIR}"/233-xfail-bind.patch +) + python_test() { pushd "${BUILD_DIR}/lib" > /dev/null || die "${EPYTHON}" -m pytest -v . || die |