mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 14:42:37 +02:00
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:
parent
21a8683a8b
commit
442b6e0704
|
|
@ -1193,7 +1193,7 @@ static int userfaultfd_minor_test(void)
|
||||||
void *expected_page;
|
void *expected_page;
|
||||||
char c;
|
char c;
|
||||||
struct uffd_stats stats = { 0 };
|
struct uffd_stats stats = { 0 };
|
||||||
uint64_t req_features, features_out;
|
uint64_t features = UFFD_FEATURE_MINOR_HUGETLBFS;
|
||||||
|
|
||||||
if (!test_uffdio_minor)
|
if (!test_uffdio_minor)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
@ -1201,18 +1201,10 @@ static int userfaultfd_minor_test(void)
|
||||||
printf("testing minor faults: ");
|
printf("testing minor faults: ");
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
|
|
||||||
if (test_type == TEST_HUGETLB)
|
if (uffd_test_ctx_clear() || uffd_test_ctx_init_ext(&features))
|
||||||
req_features = UFFD_FEATURE_MINOR_HUGETLBFS;
|
|
||||||
else if (test_type == TEST_SHMEM)
|
|
||||||
req_features = UFFD_FEATURE_MINOR_SHMEM;
|
|
||||||
else
|
|
||||||
return 1;
|
return 1;
|
||||||
|
/* If kernel reports the feature isn't supported, skip the test. */
|
||||||
features_out = req_features;
|
if (!(features & UFFD_FEATURE_MINOR_HUGETLBFS)) {
|
||||||
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) {
|
|
||||||
printf("skipping test due to lack of feature support\n");
|
printf("skipping test due to lack of feature support\n");
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
@ -1445,7 +1437,6 @@ static void set_test_type(const char *type)
|
||||||
map_shared = true;
|
map_shared = true;
|
||||||
test_type = TEST_SHMEM;
|
test_type = TEST_SHMEM;
|
||||||
uffd_test_ops = &shmem_uffd_test_ops;
|
uffd_test_ops = &shmem_uffd_test_ops;
|
||||||
test_uffdio_minor = true;
|
|
||||||
} else {
|
} else {
|
||||||
err("Unknown test type: %s", type);
|
err("Unknown test type: %s", type);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user