vhost-device/vhost-device-scsi/test
Manos Pitsidianakis a1e013286f Move all crates to workspace root
Having all the workspace crates under the crates/ directory is
unnecessary. Rust documentation itself recommends all crates to be in
the root directory:

https://doc.rust-lang.org/book/ch14-03-cargo-workspaces.html#creating-the-second-package-in-the-workspace

I paste the text content here, in case the online page ever changes or
becomes unavailable:

    ## Creating the Second Package in the Workspace

    Next, let’s create another member package in the workspace and call it add_one. Change the top-level Cargo.toml to specify the add_one path in the members list:

    Filename: Cargo.toml

    [workspace]

    members = [
        "adder",
        "add_one",
    ]

    Then generate a new library crate named add_one:

    $ cargo new add_one --lib
         Created library `add_one` package

    Your add directory should now have these directories and files:

    ├── Cargo.lock
    ├── Cargo.toml
    ├── add_one
    │   ├── Cargo.toml
    │   └── src
    │       └── lib.rs
    ├── adder
    │   ├── Cargo.toml
    │   └── src
    │       └── main.rs
    └── target

Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
2023-10-16 12:03:57 +05:30
..
.containerignore Move all crates to workspace root 2023-10-16 12:03:57 +05:30
.gitignore Move all crates to workspace root 2023-10-16 12:03:57 +05:30
Containerfile Move all crates to workspace root 2023-10-16 12:03:57 +05:30
invoke-test.sh Move all crates to workspace root 2023-10-16 12:03:57 +05:30
README.md Move all crates to workspace root 2023-10-16 12:03:57 +05:30
start-test.sh Move all crates to workspace root 2023-10-16 12:03:57 +05:30
test-script.sh Move all crates to workspace root 2023-10-16 12:03:57 +05:30

Testing tools

This folder contains some tooling for tests

Prerequisites

For running these tests, you need a KVM enabled x86_64 machine and podman.

vhost-device-scsi must have been built already.

Performed tests

Right now, the test harness will only run blktests against the target device (these tests are probably testing the guest kernel more than the actual device).

Test execution

Triggering the build of the necessary container images and invoking the tests is done by calling ./invoke-test.sh.

That will build the Containerfile, launch a container and invoke ./start-test.sh inside of the container. That will download a Fedora cloud image, launch the daemon, launch QEMU, waits until it is up and triggers the test execution.

Results will be downloaded into a timestamped folder under results/.

Other test tools

Some quick and dirty fuzzing code is available at https://github.com/Ablu/vhost-device/tree/scsi-fuzzing.