Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Simple PCIe FMC carrier SPEC
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
50
Issues
50
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
Simple PCIe FMC carrier SPEC
Commits
59adb80d
Commit
59adb80d
authored
Jun 30, 2020
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tst: add test for zero size buffers
Signed-off-by:
Federico Vaga
<
federico.vaga@cern.ch
>
parent
239dde56
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
test_dma.py
pytest/test_dma.py
+15
-0
No files found.
pytest/test_dma.py
View file @
59adb80d
...
...
@@ -24,6 +24,21 @@ class TestDma(object):
spec_c
.
dma_start
()
spec
.
dma_stop
()
def
test_dma_no_buffer
(
self
,
spec
):
"""
The DMA engine should not return an error on a 0 length DMA
transfer. Instead, it returns 0 byte transfered.
"""
spec
.
dma_start
()
data
=
spec
.
dma_read
(
0
,
0
)
spec
.
dma_stop
()
assert
len
(
data
)
==
0
spec
.
dma_start
()
count
=
spec
.
dma_write
(
0
,
b
""
)
spec
.
dma_stop
()
assert
count
==
0
@
pytest
.
mark
.
parametrize
(
"buffer_size"
,
[
2
**
i
for
i
in
range
(
3
,
22
)])
def
test_dma_read
(
self
,
spec
,
buffer_size
):
...
...
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