diff --git a/.github/workflows/xfstests.yml b/.github/workflows/xfstests.yml index 532ff0b15..e5e391be9 100644 --- a/.github/workflows/xfstests.yml +++ b/.github/workflows/xfstests.yml @@ -24,8 +24,7 @@ jobs: override: true - name: Build passthrough binary run: | - cd tests/passthrough - cargo build --release + cargo build --release -p passthrough sudo install -t /usr/sbin/ -m 700 ./target/release/passthrough - name: Setup and run xfstest run: | @@ -45,8 +44,7 @@ jobs: override: true - name: Build overlay binary run: | - cd tests/overlay - cargo build --release + cargo build --release -p overlay sudo install -t /usr/sbin/ -m 700 ./target/release/overlay - name: Setup and run xfstest run: | @@ -66,8 +64,7 @@ jobs: override: true - name: Build overlay binary run: | - cd tests/overlay - cargo build --release + cargo build --release -p overlay sudo install -t /usr/sbin/ -m 700 ./target/release/overlay - name: Setup and run unionmount testsuite run: | diff --git a/Cargo.toml b/Cargo.toml index e7768720c..7fba40f7d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,6 +16,20 @@ repository = "https://github.com/cloud-hypervisor/fuse-backend-rs" homepage = "https://github.com/cloud-hypervisor/" build = "build.rs" +[workspace] +members = [ + "tests/passthrough", + "tests/overlay", +] + +[workspace.dependencies] +# rust-vmm crates +vhost = "0.11.0" +virtio-bindings = "=0.2.4" +virtio-queue = "0.12.0" +vm-memory = "0.14.1" +vmm-sys-util = "0.12.1" + [dependencies] arc-swap = "1.5" async-trait = { version = "0.1.42", optional = true } @@ -30,11 +44,11 @@ nix = "0.24" radix_trie = "0.2.1" tokio = { version = "1", optional = true } tokio-uring = { version = "0.4.0", optional = true } -vmm-sys-util = { version = "0.12.1", optional = true } -vm-memory = { version = "0.14.1", features = ["backend-mmap"] } -virtio-bindings = { version = "=0.2.4", optional = true } -virtio-queue = { version = "0.12.0", optional = true } -vhost = { version = "0.11.0", features = ["vhost-user","vhost-user-backend"], optional = true } +vmm-sys-util = { workspace = true, optional = true } +vm-memory = { workspace = true, features = ["backend-mmap"] } +virtio-bindings = { workspace = true, optional = true } +virtio-queue = { workspace = true, optional = true } +vhost = { workspace = true, features = ["vhost-user","vhost-user-backend"], optional = true } versionize_derive = { version = "0.1.6", optional = true } versionize = { version = "0.2.0", optional = true } diff --git a/tests/overlay/Cargo.toml b/tests/overlay/Cargo.toml index 751ddd7da..4136ab8d9 100644 --- a/tests/overlay/Cargo.toml +++ b/tests/overlay/Cargo.toml @@ -8,7 +8,7 @@ edition = "2021" [dependencies] fuse-backend-rs = { path = "../../", features = ["fusedev"] } log = ">=0.4.6" -vmm-sys-util = ">=0.4" +vmm-sys-util = { workspace = true } libc = ">=0.2.68" simple_logger = ">=1.13.0" signal-hook = ">=0.3.10" diff --git a/tests/passthrough/src/main.rs b/tests/passthrough/src/main.rs index 138d7ab0d..a2b8a48d7 100644 --- a/tests/passthrough/src/main.rs +++ b/tests/passthrough/src/main.rs @@ -70,11 +70,13 @@ impl Daemon { let mut se = FuseSession::new(Path::new(&self.mountpoint), "testpassthrough", "", false).unwrap(); se.mount().unwrap(); - + se.try_with_writer(|writer| { self.server - .notify_resend(writer).map_err(PassthroughFsError::FuseError) - }).map_err(|_| Error::from_raw_os_error(libc::EINVAL))?; + .notify_resend(writer) + .map_err(PassthroughFsError::FuseError) + }) + .map_err(|_| Error::from_raw_os_error(libc::EINVAL))?; for _ in 0..self.thread_cnt { let mut server = FuseServer {