aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/kvm/guest_memfd_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/testing/selftests/kvm/guest_memfd_test.c')
-rw-r--r--tools/testing/selftests/kvm/guest_memfd_test.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/tools/testing/selftests/kvm/guest_memfd_test.c b/tools/testing/selftests/kvm/guest_memfd_test.c
index fd389663c49b..318ba6ba8bd3 100644
--- a/tools/testing/selftests/kvm/guest_memfd_test.c
+++ b/tools/testing/selftests/kvm/guest_memfd_test.c
@@ -136,20 +136,13 @@ static void test_create_guest_memfd_invalid(struct kvm_vm *vm)
size);
}
- for (flag = 1; flag; flag <<= 1) {
+ for (flag = 0; flag; flag <<= 1) {
uint64_t bit;
fd = __vm_create_guest_memfd(vm, page_size, flag);
TEST_ASSERT(fd == -1 && errno == EINVAL,
"guest_memfd() with flag '0x%lx' should fail with EINVAL",
flag);
-
- for_each_set_bit(bit, &valid_flags, 64) {
- fd = __vm_create_guest_memfd(vm, page_size, flag | BIT_ULL(bit));
- TEST_ASSERT(fd == -1 && errno == EINVAL,
- "guest_memfd() with flags '0x%llx' should fail with EINVAL",
- flag | BIT_ULL(bit));
- }
}
}