OrangePi_CM5/tools/testing/selftests/kvm
Vitaly Kuznetsov 8d0f56c2ed KVM: selftests: Make sure kvm_create_max_vcpus test won't hit RLIMIT_NOFILE
[ Upstream commit 908fa88e420f30dde6d80f092795a18ec72ca6d3 ]

With the elevated 'KVM_CAP_MAX_VCPUS' value kvm_create_max_vcpus test
may hit RLIMIT_NOFILE limits:

 # ./kvm_create_max_vcpus
 KVM_CAP_MAX_VCPU_ID: 4096
 KVM_CAP_MAX_VCPUS: 1024
 Testing creating 1024 vCPUs, with IDs 0...1023.
 /dev/kvm not available (errno: 24), skipping test

Adjust RLIMIT_NOFILE limits to make sure KVM_CAP_MAX_VCPUS fds can be
opened. Note, raising hard limit ('rlim_max') requires CAP_SYS_RESOURCE
capability which is generally not needed to run kvm selftests (but without
raising the limit the test is doomed to fail anyway).

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Message-Id: <20211123135953.667434-1-vkuznets@redhat.com>
[Skip the test if the hard limit can be raised. - Paolo]
Reviewed-by: Sean Christopherson <seanjc@google.com>
Tested-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-12-22 09:30:50 +01:00
..
aarch64 KVM: selftests: Add blessed SVE registers to get-reg-list 2020-11-08 06:03:02 -05:00
include KVM: selftests: Introduce the dirty log perf test 2020-11-08 06:04:08 -05:00
lib KVM: selftests: Fix nested SVM tests when built with clang 2021-11-18 14:04:10 +01:00
s390x selftests: KVM: s390: check for registers to NOT change on reset 2020-03-16 17:59:09 +01:00
x86_64 selftests: kvm: fix mismatched fclose() after popen() 2021-11-18 14:03:59 +01:00
.gitignore KVM: selftests: Introduce the dirty log perf test 2020-11-08 06:04:08 -05:00
Makefile KVM: selftests: Introduce the dirty log perf test 2020-11-08 06:04:08 -05:00
config selftests: kvm: Adding config fragments 2019-08-09 16:52:38 +02:00
demand_paging_test.c KVM: selftests: Make the number of vcpus global 2020-11-08 06:04:03 -05:00
dirty_log_perf_test.c KVM: selftests: allow two iterations of dirty_log_perf_test 2020-11-09 09:45:17 -05:00
dirty_log_test.c KVM: selftests: Drop pointless vm_create wrapper 2020-11-08 06:03:36 -05:00
kvm_create_max_vcpus.c KVM: selftests: Make sure kvm_create_max_vcpus test won't hit RLIMIT_NOFILE 2021-12-22 09:30:50 +01:00
set_memory_region_test.c selftests: kvm/set_memory_region_test: Fix race in move region test 2020-12-03 12:38:58 -05:00
steal_time.c selftests: KVM: Align SMCCC call with the spec in steal_time 2021-10-09 14:40:57 +02:00