StratoVirt supports two test modes: unit test and mod test. It should be noted that mod test is not fully supported on the x86_64 architecture now.
Unit tests are Rust functions that verify that the non-test code is functioning in the expected manner. We recommend performing unit test execution separately, run StratoVirt unit test as follows:
$ cargo test --workspace --exclude mod_test -- --nocapture --test-threads=1
StratoVirt mod test is an integrated testing method. During the test, the StratoVirt process will be started as the server and communicate through socket and QMP to test the StratoVirt module function.
Before running mod test, we need to compile stratovirt
and virtiofsd
first, and then export the environment variables STRATOVIRT_BINARY
and VIRTIOFSD_BINARY
.
Build StratoVirt:
$ cargo build --workspace --bins --release --target=aarch64-unknown-linux-gnu --all-features
Build virtiofsd:
$ git clone https://gitlab.com/virtio-fs/virtiofsd.git
$ cd virtiofsd
$ cargo build --release
Export the environment variables STRATOVIRT_BINARY
and VIRTIOFSD_BINARY
:
$ export STRATOVIRT_BINARY="/path/to/stratovirt"
$ export VIRTIOFSD_BINARY="/path/to/virtiofsd"
Run StratoVirt mod test as follows:
$ cargo test --all-features -p mod_test -- --nocapture --test-threads=1
Вы можете оставить комментарий после Вход в систему
Неприемлемый контент может быть отображен здесь и не будет показан на странице. Вы можете проверить и изменить его с помощью соответствующей функции редактирования.
Если вы подтверждаете, что содержание не содержит непристойной лексики/перенаправления на рекламу/насилия/вульгарной порнографии/нарушений/пиратства/ложного/незначительного или незаконного контента, связанного с национальными законами и предписаниями, вы можете нажать «Отправить» для подачи апелляции, и мы обработаем ее как можно скорее.
Комментарий ( 0 )