Commit 239dde56 authored by Federico Vaga's avatar Federico Vaga

tst: regressions are actually true limitations, remove test

Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent bc0b9676
...@@ -24,48 +24,36 @@ class TestDma(object): ...@@ -24,48 +24,36 @@ class TestDma(object):
spec_c.dma_start() spec_c.dma_start()
spec.dma_stop() spec.dma_stop()
@pytest.mark.parametrize("dma_size", @pytest.mark.parametrize("buffer_size",
[0, 1, 2, 3] + \ [2**i for i in range(3, 22)])
[5, 7, 9] + \ def test_dma_read(self, spec, buffer_size):
[2**i for i in range(24)])
def test_dma_read(self, spec, dma_size):
""" """
We just want to see if the DMA engine reports errors. Test the We just want to see if the DMA engine reports errors. Test the
engine with different sizes, but same offset (default: engine with different sizes, but same offset (default:
0x0). On the engine side we will get several transfers 0x0). On the engine side we will get several transfers
(scatterlist) depending on the size. (scatterlist) depending on the size.
Regressions:
- 0: the driver returns immediatly without starting any DMA transfer
- 1, 2, 3, 4: performing transfers of these sizes led to a failure
""" """
spec.dma_start() spec.dma_start()
data1 = spec.dma_read(0, dma_size) data1 = spec.dma_read(0, buffer_size)
assert len(data1) == dma_size data2 = spec.dma_read(0, buffer_size)
data2 = spec.dma_read(0, dma_size)
assert len(data2) == dma_size
spec.dma_stop() spec.dma_stop()
assert len(data1) == buffer_size
assert len(data2) == buffer_size
assert data1 == data2 assert data1 == data2
@pytest.mark.parametrize("dma_size", @pytest.mark.parametrize("buffer_size",
[0, 1, 2, 3] + \ [2**i for i in range(3, 22)])
[5, 7, 9] + \ def test_dma_write(self, spec, buffer_size):
[2**i for i in range(24)])
def test_dma_write(self, spec, dma_size):
""" """
We just want to see if the DMA engine reports errors. Test the We just want to see if the DMA engine reports errors. Test the
engine with different sizes, but same offset (default: engine with different sizes, but same offset (default:
0x0). On the engine side we will get several transfers 0x0). On the engine side we will get several transfers
(scatterlist) depending on the size. (scatterlist) depending on the size.
Regressions:
- 0: the driver returns immediatly without starting any DMA transfer
- 1, 2, 3, 4: performing transfers of these sizes led to a failure
""" """
spec.dma_start() spec.dma_start()
spec.dma_write(0, b"\x00" * dma_size) count = spec.dma_write(0, b"\x00" * buffer_size)
assert count == dma_size assert count == buffer_size
spec.dma_stop() spec.dma_stop()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment