aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmil Fresk <emil.fresk@gmail.com>2023-01-28 20:54:34 +0100
committerHenrik Tjäder <henrik@tjaders.com>2023-03-01 00:33:37 +0100
commitbef6c359a0802cb93c7bf0963d0fca7db540f64b (patch)
tree94521f25a4f61bf1a982272bf58e0f1c65c3aa3d
parent94b00df2c7e82efb9003945bb90675e73ed0f5e0 (diff)
Fix CI for rtic-channel
-rw-r--r--.github/workflows/build.yml2
-rw-r--r--rtic-channel/src/lib.rs8
2 files changed, 5 insertions, 5 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 004a5ec..650fc53 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -482,7 +482,7 @@ jobs:
- name: Run cargo test
working-directory: ./rtic-channel
- run: cargo test --test tests
+ run: cargo test --features testing
# Run test suite
testsmonotonics:
diff --git a/rtic-channel/src/lib.rs b/rtic-channel/src/lib.rs
index 1077b5a..eafa25c 100644
--- a/rtic-channel/src/lib.rs
+++ b/rtic-channel/src/lib.rs
@@ -140,7 +140,7 @@ struct LinkPtr(*mut Option<wait_queue::Link<Waker>>);
impl LinkPtr {
/// This will dereference the pointer stored within and give out an `&mut`.
- unsafe fn get(&self) -> &mut Option<wait_queue::Link<Waker>> {
+ unsafe fn get(&mut self) -> &mut Option<wait_queue::Link<Waker>> {
&mut *self.0
}
}
@@ -203,9 +203,9 @@ impl<'a, T, const N: usize> Sender<'a, T, N> {
let mut link_ptr: Option<wait_queue::Link<Waker>> = None;
// Make this future `Drop`-safe, also shadow the original definition so we can't abuse it.
- let link_ptr = LinkPtr(&mut link_ptr as *mut Option<wait_queue::Link<Waker>>);
+ let mut link_ptr = LinkPtr(&mut link_ptr as *mut Option<wait_queue::Link<Waker>>);
- let link_ptr2 = link_ptr.clone();
+ let mut link_ptr2 = link_ptr.clone();
let dropper = OnDrop::new(|| {
// SAFETY: We only run this closure and dereference the pointer if we have
// exited the `poll_fn` below in the `drop(dropper)` call. The other dereference
@@ -532,7 +532,7 @@ mod tests {
#[tokio::test]
async fn stress_channel() {
- const NUM_RUNS: usize = 1_000;
+ const NUM_RUNS: usize = 1_000000;
const QUEUE_SIZE: usize = 10;
let (s, mut r) = make_channel!(u32, QUEUE_SIZE);