Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC DEL 1ns 4cha
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
FMC DEL 1ns 4cha
Commits
f30e3acc
Commit
f30e3acc
authored
Dec 13, 2022
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tst: try again when EAGAIN
Signed-off-by:
Federico Vaga
<
federico.vaga@cern.ch
>
parent
e7d82165
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
test_fmcfd_loop.py
software/pytest/test-01-functionalities/test_fmcfd_loop.py
+9
-2
No files found.
software/pytest/test-01-functionalities/test_fmcfd_loop.py
View file @
f30e3acc
...
...
@@ -82,7 +82,11 @@ class TestFmcfdLoop(object):
while
len
(
ts
)
<
count
and
time
.
time
()
<
timeout
:
if
len
(
fmcfd_tdc
.
poll
())
==
0
:
continue
t
=
fmcfd_tdc
.
read
(
100
,
os
.
O_NONBLOCK
)
try
:
t
=
fmcfd_tdc
.
read
(
100
,
os
.
O_NONBLOCK
)
except
BlockingIOError
:
t
=
fmcfd_tdc
.
read
(
100
,
os
.
O_NONBLOCK
)
assert
len
(
t
)
>
0
ts
=
ts
+
t
assert
len
(
ts
)
==
count
...
...
@@ -108,7 +112,10 @@ class TestFmcfdLoop(object):
while
pending
>
0
and
time
.
time
()
<
timeout
:
if
len
(
fmcfd_tdc
.
poll
())
==
0
:
continue
t
=
fmcfd_tdc
.
read
(
pending
,
os
.
O_NONBLOCK
)
try
:
t
=
fmcfd_tdc
.
read
(
100
,
os
.
O_NONBLOCK
)
except
BlockingIOError
:
t
=
fmcfd_tdc
.
read
(
100
,
os
.
O_NONBLOCK
)
assert
len
(
t
)
>
0
ts
.
extend
(
t
)
pending
-=
len
(
t
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment