kata-containers / kata-containers

Kata Containers is an open source project and community working to build a standard implementation of lightweight Virtual Machines (VMs) that feel and perform like containers, but provide the workload isolation and security advantages of VMs. https://katacontainers.io/
Apache License 2.0
5.08k stars 1k forks source link

tests: Extend vfio-ap hotplug test to use a zcrypttest tool #9859

Open BbolroC opened 1 week ago

BbolroC commented 1 week ago

So far, the vfio-ap test has only been verifying the attachment of the device to a VM guest for a {hot,cold}-plug via lszcrypt from s390-tools (https://github.com/ibm-s390-linux/s390-tools). This PR introduces a functional test for the device for a hot-plug via a new tool zcrypttest. The following steps are required to achieve this goal:

Each step corresponds to a single commit. You can find a detailed description in each commit.

The extended test has already run in the s390x nightly test (e.g. https://github.com/kata-containers/kata-containers/actions/runs/9542189133/job/26296583157) since the 14th of June and no test failure has been observed:

ioctl_test: running
ioctl_test: Finished successful
simple_test: running
simple_test: Successful processing of one default CPRB on queue 05.001f
simple_test: Finished successful
simple_one_thread_test: running
simple_one_thread_test: 1000 default CPRBs sent on queue 05.001f
simple_one_thread_test: Finished successful
simple_multi_threads_test: running
simple_multi_threads_test: working with 2 threads each 16000 messages on queue 05.001f
simple_multi_threads_test: working with 4 threads each 8000 messages on queue 05.001f
simple_multi_threads_test: working with 8 threads each 4000 messages on queue 05.001f
simple_multi_threads_test: working with 16 threads each 2000 messages on queue 05.001f
simple_multi_threads_test: working with 32 threads each 1000 messages on queue 05.001f
simple_multi_threads_test: Finished successful
multi_thread_stress_test: running
multi_thread_stress_test on queue 05.001f
multi_thread_stress_test: Finished successful
load_balance_domains_test: running
load_balance_domains_test: Warning - skipping test because #domains < 2
load_balance_card_test: running
load_balance_card_test: Warning - skipping type 'A' test because # of cards < 2
load_balance_card_test: Warning - skipping type 'C' test because # of cards < 2
load_balance_card_test: Warning - skipping type 'P' test because # of cards < 2
load_balance_card_test: Finished successful
cca_mex_processing_test: running
cca_mex_processing_test: Warning - skipping test because #domains < 2
cca_card_and_domain_addressing_test: running
cca_card_and_domain_addressing_test: Warning - skipping test because #domains < 2
ep11_target_addressing_test: running
ep11_target_addressing_test: Warning - skipping test because #domains < 2
cca_hwrng_test: running
cca_hwrng_test: Warning - skipping test because #domains < 2
hang_after_offline_online_test: running
hang_after_offline_online_test on queue 05.001f
hang_after_offline_online_test on queue 05.001f
hang_after_offline_online_test on queue 05.001f
hang_after_offline_online_test on queue 05.001f
hang_after_offline_online_test on queue 05.001f
hang_after_offline_online_test on queue 05.001f
hang_after_offline_online_test on queue 05.001f
hang_after_offline_online_test on queue 05.001f
hang_after_offline_online_test on queue 05.001f
hang_after_offline_online_test on queue 05.001f
hang_after_offline_online_test: Finished successful
main: All tests successful

Signed-off-by: Hyounggyu Choi Hyounggyu.Choi@ibm.com

BbolroC commented 1 week ago

FYI: @hbrueckner