mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-25 03:08:27 +08:00
firmware: don't truncate queued RPCs (fixes #985).
This commit is contained in:
parent
58967f14fd
commit
873324d52b
@ -522,7 +522,7 @@ fn process_kern_queued_rpc(stream: &mut TcpStream,
|
||||
let length = NetworkEndian::read_u32(slice) as usize;
|
||||
host_write(stream, host::Reply::RpcRequest { async: true })?;
|
||||
debug!("{:?}", &slice[4..][..length]);
|
||||
stream.write(&slice[4..][..length])?;
|
||||
stream.write_all(&slice[4..][..length])?;
|
||||
Ok(())
|
||||
})
|
||||
}
|
||||
|
29
artiq/test/coredevice/test_stress.py
Normal file
29
artiq/test/coredevice/test_stress.py
Normal file
@ -0,0 +1,29 @@
|
||||
import os
|
||||
import time
|
||||
import unittest
|
||||
|
||||
from artiq.experiment import *
|
||||
from artiq.test.hardware_testbench import ExperimentCase
|
||||
|
||||
|
||||
artiq_low_latency = os.getenv("ARTIQ_LOW_LATENCY")
|
||||
|
||||
|
||||
class _Stress(EnvExperiment):
|
||||
def build(self):
|
||||
self.setattr_device("core")
|
||||
|
||||
@rpc(flags={"async"})
|
||||
def sink(self, data):
|
||||
pass
|
||||
|
||||
@kernel
|
||||
def async_rpc(self, n):
|
||||
for _ in range(n):
|
||||
self.sink(b"")
|
||||
|
||||
|
||||
class StressTest(ExperimentCase):
|
||||
def test_async_rpc(self):
|
||||
exp = self.create(_Stress)
|
||||
exp.async_rpc(16000)
|
Loading…
Reference in New Issue
Block a user