vhost-device/crates
Manos Pitsidianakis 8a1deef49a vsock: use tempfile in tests
Tests were run in a series before the previous commit because of a
testing failure (#232), and masked a bug. This is not necessary anymore
since the bug was fixed in the previous commit.

Instead of reverting to running the tests without the #[serial]
attribute, make every test self-contained by using unique temp
directories in each test run.

Test files that refer to sockets need to be unique because they risk
sharing filenames with other tests after refactoring. Since these tests
create/use/free resources, they should take care not to litter /tmp/ and
not share any file with other tests.

This commit uses a unique temp dir as location of test run files instead
of `/tmp/`. It adds a new dev-dependency, `tempfile`.

Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
2023-07-11 13:01:41 +05:30
..
gpio Add CHANGELOG.md to all crates 2023-07-07 22:06:45 +05:30
i2c Add CHANGELOG.md to all crates 2023-07-07 22:06:45 +05:30
rng Add CHANGELOG.md to all crates 2023-07-07 22:06:45 +05:30
scsi Add CHANGELOG.md to all crates 2023-07-07 22:06:45 +05:30
vsock vsock: use tempfile in tests 2023-07-11 13:01:41 +05:30