This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: test_socket fails if using tipc module and SELinux enabled
Type: behavior Stage: resolved
Components: Tests Versions: Python 3.4, Python 3.5, Python 2.7
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: christian.heimes, vajrasky
Priority: normal Keywords: patch

Created on 2014-01-14 09:39 by vajrasky, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
skip_test_if_selinux_tipc.patch vajrasky, 2014-01-14 09:39 review
Messages (3)
msg208088 - (view) Author: Vajrasky Kok (vajrasky) * Date: 2014-01-14 09:39
Enable SELinux (by default it is already enabled). Then load tipc module.

# modprobe tipc

Then using whatever account, execute Lib/test/test_socket.py. You'll get:
FAILED (errors=1, skipped=4)
Traceback (most recent call last):
  File "Lib/test/test_socket.py", line 1740, in <module>
    test_main()
  File "Lib/test/test_socket.py", line 1736, in test_main
    test_support.run_unittest(*tests)
  File "/home/sky/Code/python/cpython2.7/Lib/test/test_support.py", line 1251, in run_unittest
    _run_suite(suite)
  File "/home/sky/Code/python/cpython2.7/Lib/test/test_support.py", line 1234, in _run_suite
    raise TestFailed(err)
test.test_support.TestFailed: Traceback (most recent call last):
  File "Lib/test/test_socket.py", line 1705, in testStream
    msg = self.conn.recv(1024)
error: [Errno 13] Permission denied

Attached the patch to skip the test if we don't have sufficient permission to execute the test.
msg237587 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2015-03-09 00:53
LGTM so can we have a formal patch review please, thanks.
msg373447 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2020-07-10 07:42
The bug report is over six years ago and I haven't seen any TIPC related issues for a while. The test suite has additional guards to skip TIPC tests when the Kernel module is not loaded.
History
Date User Action Args
2022-04-11 14:57:56adminsetgithub: 64456
2020-07-10 07:42:37christian.heimessetstatus: open -> closed

nosy: + christian.heimes
messages: + msg373447

resolution: out of date
stage: resolved
2019-03-15 22:28:14BreamoreBoysetnosy: - BreamoreBoy
2015-03-09 00:53:27BreamoreBoysetnosy: + BreamoreBoy

messages: + msg237587
versions: + Python 3.5, - Python 3.3
2014-01-14 09:39:22vajraskycreate