linux/tools/testing
Reiji Watanabe bf10993313 KVM: selftests: kvm_vm_elf_load() and elfhdr_get() should close fd
kvm_vm_elf_load() and elfhdr_get() open one file each, but they
never close the opened file descriptor.  If a test repeatedly
creates and destroys a VM with __vm_create(), which
(directly or indirectly) calls those two functions, the test
might end up getting a open failure with EMFILE.
Fix those two functions to close the file descriptor.

Signed-off-by: Reiji Watanabe <reijiw@google.com>
Reviewed-by: Oliver Upton <oliver.upton@linux.dev>
Reviewed-by: Andrew Jones <andrew.jones@linux.dev>
Reviewed-by: Sean Christopherson <seanjc@google.com>
Link: https://lore.kernel.org/r/20221220170921.2499209-2-reijiw@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
2023-01-24 10:06:30 -08:00
..
crypto/chacha20-s390 tools/testing/crypto: Use vzalloc instead of vmalloc+memset 2022-07-05 14:46:36 +02:00
cxl tools/testing/cxl: Require cache invalidation bypass 2022-12-05 12:33:20 -08:00
fault-injection
ktest ktest.pl: Add shell commands to variables 2022-12-08 23:23:05 -05:00
kunit kunit: tool: make parser preserve whitespace when printing test log 2022-12-12 14:13:48 -07:00
memblock memblock tests: Fix compilation error. 2023-01-04 12:26:59 +02:00
nvdimm libnvdimm: Introduce CONFIG_NVDIMM_SECURITY_TEST flag 2022-12-01 12:42:35 -08:00
radix-tree maple_tree: update copyright dates for test code 2022-12-15 16:37:49 -08:00
scatterlist
selftests KVM: selftests: kvm_vm_elf_load() and elfhdr_get() should close fd 2023-01-24 10:06:30 -08:00
vsock vsock_test: POLLIN + SO_RCVLOWAT test 2022-08-23 10:43:12 +02:00