From 0b6bc75d3a993eb4377c9a7045a284941b53a35c Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Mon, 31 Jul 2023 16:15:21 +0200 Subject: [PATCH] tests: Ensure sufficient nofile limit for VFIO tests The VFIO tests based on the NVMe emulation framework require cause a high number of file descriptors to be opened on the system. On systems with a low limit on opened files, tests like test_vfio_user can possibly fail with "too many open files" exeption. This issue is fixed by raising the corresponding limit. A tricky detail here is, that the limit has to be changed in the test container and not on the host. As the the container is executed in the privileged mode, the setting in it will override the host value. Related: #5426 Signed-off-by: Anatol Belski --- scripts/run_integration_tests_x86_64.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/run_integration_tests_x86_64.sh b/scripts/run_integration_tests_x86_64.sh index b6dc9ddfd..45c47c133 100755 --- a/scripts/run_integration_tests_x86_64.sh +++ b/scripts/run_integration_tests_x86_64.sh @@ -185,6 +185,9 @@ sudo chmod a+rwX /dev/hugepages # Update max locked memory to 'unlimited' to avoid issues with vDPA ulimit -l unlimited +# Set number of open descriptors high enough for VFIO tests to run +ulimit -n 4096 + export RUST_BACKTRACE=1 time cargo test $test_features "common_parallel::$test_filter" -- ${test_binary_args[*]} RES=$?