forked from M-Labs/artiq
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;
|
let length = NetworkEndian::read_u32(slice) as usize;
|
||||||
host_write(stream, host::Reply::RpcRequest { async: true })?;
|
host_write(stream, host::Reply::RpcRequest { async: true })?;
|
||||||
debug!("{:?}", &slice[4..][..length]);
|
debug!("{:?}", &slice[4..][..length]);
|
||||||
stream.write(&slice[4..][..length])?;
|
stream.write_all(&slice[4..][..length])?;
|
||||||
Ok(())
|
Ok(())
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -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