-
Notifications
You must be signed in to change notification settings - Fork 69
Closed
Description
The systemd version is "210"
_______________________ [doctest] systemd.journal.stream _______________________
450 Return a file object wrapping a stream to journal.
451
452 Log messages written to this file as simple newline sepearted text strings
453 are written to the journal.
454
455 The file will be line buffered, so messages are actually sent after a
456 newline character is written.
457
458 >>> from systemd import journal
459 >>> stream = journal.stream('myapp')
UNEXPECTED EXCEPTION: IOError(2, 'No such file or directory')
Traceback (most recent call last):
File "/usr/lib64/python2.7/doctest.py", line 1315, in __run
compileflags, 1) in test.globs
File "<doctest systemd.journal.stream[1]>", line 1, in <module>
File "/home/abuild/rpmbuild/BUILD/python-systemd-233/build/lib.linux-x86_64-2.7/systemd/journal.py", line 489, in stream
fd = stream_fd(identifier, priority, level_prefix)
IOError: [Errno 2] No such file or directory
/home/abuild/rpmbuild/BUILD/python-systemd-233/build/lib.linux-x86_64-2.7/systemd/journal.py:459: UnexpectedException
____________________________ test_notify_no_socket _____________________________
def test_notify_no_socket():
assert notify('READY=1') == False
with skip_enosys():
> assert notify('FDSTORE=1', fds=[]) == False
E NotImplementedError: Compiled without support for sd_pid_notify_with_fds
systemd/test/test_daemon.py:213: NotImplementedError
____________________________ test_notify_bad_socket ____________________________
def test_notify_bad_socket():
os.environ['NOTIFY_SOCKET'] = '/dev/null'
with pytest.raises(connection_error):
notify('READY=1')
with pytest.raises(connection_error):
with skip_enosys():
> notify('FDSTORE=1', fds=[])
E NotImplementedError: Compiled without support for sd_pid_notify_with_fds
systemd/test/test_daemon.py:230: NotImplementedError
___________________________ test_notify_with_socket ____________________________
tmpdir = local('/tmp/pytest-of-abuild/pytest-1/test_notify_with_socket0')
def test_notify_with_socket(tmpdir):
path = tmpdir.join('socket').strpath
sock = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM)
sock.bind(path)
# SO_PASSCRED is not defined in python2.7
SO_PASSCRED = getattr(socket, 'SO_PASSCRED', 16)
sock.setsockopt(socket.SOL_SOCKET, SO_PASSCRED, 1)
os.environ['NOTIFY_SOCKET'] = path
assert notify('READY=1') == True
with skip_enosys():
> assert notify('FDSTORE=1', fds=[]) == True
E NotImplementedError: Compiled without support for sd_pid_notify_with_fds
systemd/test/test_daemon.py:249: NotImplementedError
_____________________________ [doctest] login.rst ______________________________
011 Example: polling for events
012 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
013
014 This example shows that session/uid/seat/machine events can be waited
015 for (using e.g. `poll`). This makes it easy to integrate Monitor in an
016 external event loop:
017
018 >>> import select
019 >>> from systemd import login
020 >>> m = login.Monitor("machine")
UNEXPECTED EXCEPTION: OSError(2, 'No such file or directory')
Traceback (most recent call last):
File "/usr/lib64/python2.7/doctest.py", line 1315, in __run
compileflags, 1) in test.globs
File "<doctest login.rst[2]>", line 1, in <module>
OSError: [Errno 2] No such file or directory
/home/abuild/rpmbuild/BUILD/python-systemd-233/docs/login.rst:20: UnexpectedException
================ 5 failed, 35 passed, 5 skipped in 0.15 seconds ================
Makefile:54: recipe for target 'check' failed
make: *** [check] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.2wPiyk (%check)
Metadata
Metadata
Assignees
Labels
No labels