summaryrefslogtreecommitdiff
path: root/test/py/unittests.py
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ideasonboard.com>2022-05-27 17:44:23 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-05-27 22:02:31 +0300
commit210ce547a42ca559592efaef069648ddfe0d2945 (patch)
tree08440f63961739e06ab80088471e965f9eeb86e2 /test/py/unittests.py
parentccfcf5f2356fc3bd1dfb825652b2f05738651b46 (diff)
py: Add CameraManager.read_event()
Add CameraManager.read_event() so that the user does not need to call os.read(). We use eventfd, and we must always read 8 bytes. Hiding that inside read_event() makes sense. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'test/py/unittests.py')
-rwxr-xr-xtest/py/unittests.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/test/py/unittests.py b/test/py/unittests.py
index 7dede33b..8c445bc9 100755
--- a/test/py/unittests.py
+++ b/test/py/unittests.py
@@ -7,7 +7,6 @@ from collections import defaultdict
import errno
import gc
import libcamera as libcam
-import os
import selectors
import time
import typing
@@ -278,7 +277,7 @@ class SimpleCaptureMethods(CameraTesterBase):
while running:
events = sel.select()
for key, _ in events:
- os.read(key.fd, 8)
+ cm.read_event()
ready_reqs = cm.get_ready_requests()