Revert "FROMGIT: userfaultfd/selftests: exercise minor fault handling shmem support"

This reverts commit 2039d96cb7 as an
updated version of the patch-set will be merged later.

Signed-off-by: Lokesh Gidra <lokeshgidra@google.com>
Bug 187930641
Change-Id: Iec5f001d559609b4b3a2239a2b92cd46778437ca
This commit is contained in:
Lokesh Gidra 2021-05-12 07:32:35 -07:00 committed by Suren Baghdasaryan
parent 21a8683a8b
commit 442b6e0704

View File

@ -1193,7 +1193,7 @@ static int userfaultfd_minor_test(void)
void *expected_page;
char c;
struct uffd_stats stats = { 0 };
uint64_t req_features, features_out;
uint64_t features = UFFD_FEATURE_MINOR_HUGETLBFS;
if (!test_uffdio_minor)
return 0;
@ -1201,18 +1201,10 @@ static int userfaultfd_minor_test(void)
printf("testing minor faults: ");
fflush(stdout);
if (test_type == TEST_HUGETLB)
req_features = UFFD_FEATURE_MINOR_HUGETLBFS;
else if (test_type == TEST_SHMEM)
req_features = UFFD_FEATURE_MINOR_SHMEM;
else
if (uffd_test_ctx_clear() || uffd_test_ctx_init_ext(&features))
return 1;
features_out = req_features;
if (uffd_test_ctx_clear() || uffd_test_ctx_init_ext(&features_out))
return 1;
/* If kernel reports required features aren't supported, skip test. */
if ((features_out & req_features) != req_features) {
/* If kernel reports the feature isn't supported, skip the test. */
if (!(features & UFFD_FEATURE_MINOR_HUGETLBFS)) {
printf("skipping test due to lack of feature support\n");
fflush(stdout);
return 0;
@ -1445,7 +1437,6 @@ static void set_test_type(const char *type)
map_shared = true;
test_type = TEST_SHMEM;
uffd_test_ops = &shmem_uffd_test_ops;
test_uffdio_minor = true;
} else {
err("Unknown test type: %s", type);
}