From 316e949c40e23d6633564f6d741d15b751caecd2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Aug 2022 15:01:45 +0000 Subject: [PATCH 1/2] build(deps): bump rust-vmm-ci from `99fe2eb` to `258161e` Bumps [rust-vmm-ci](https://github.com/rust-vmm/rust-vmm-ci) from `99fe2eb` to `258161e`. - [Release notes](https://github.com/rust-vmm/rust-vmm-ci/releases) - [Commits](https://github.com/rust-vmm/rust-vmm-ci/compare/99fe2eb2e05d1b2cbeed6fb00b754e8f1c5b2f81...258161e88af86e1fb1fb188de25fd0e1f9d26d0a) --- updated-dependencies: - dependency-name: rust-vmm-ci dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- rust-vmm-ci | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust-vmm-ci b/rust-vmm-ci index 99fe2eb..258161e 160000 --- a/rust-vmm-ci +++ b/rust-vmm-ci @@ -1 +1 @@ -Subproject commit 99fe2eb2e05d1b2cbeed6fb00b754e8f1c5b2f81 +Subproject commit 258161e88af86e1fb1fb188de25fd0e1f9d26d0a From f5d74d4e9cb8cd40ae7b5a1b834b69f8347d0e02 Mon Sep 17 00:00:00 2001 From: Viresh Kumar Date: Tue, 30 Aug 2022 14:37:43 +0530 Subject: [PATCH 2/2] gpio: Update test's while loop to avoid test failure The "test_gpio_process_events_multi_success" test currently hangs with an update to a newer version of Rust. The code here tries to read the value, locked, for each GPIO one by one. The values are updated in another thread with the help of write lock. More discussion around this issue can be found here. https://github.com/rust-lang/rust/issues/101194 Taking the lock only once fixes it for now. Signed-off-by: Viresh Kumar --- gpio/src/vhu_gpio.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/gpio/src/vhu_gpio.rs b/gpio/src/vhu_gpio.rs index ae09ef0..f9f206b 100644 --- a/gpio/src/vhu_gpio.rs +++ b/gpio/src/vhu_gpio.rs @@ -929,10 +929,13 @@ mod tests { backend.process_events(desc_chains.clone(), &vring).unwrap(); - while backend.handles.read().unwrap()[GPIO as usize].is_some() - || backend.handles.read().unwrap()[(GPIO + 1) as usize].is_some() - || backend.handles.read().unwrap()[(GPIO + 2) as usize].is_some() - {} + while { + let h = backend.handles.read().unwrap(); + + h[GPIO as usize].is_some() + || h[(GPIO + 1) as usize].is_some() + || h[(GPIO + 2) as usize].is_some() + } {} validate_desc_chains(desc_chains, VIRTIO_GPIO_IRQ_STATUS_VALID, None); }