mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 04:12:04 -04:00
Revert "BACKPORT: FROMGIT: userfaultfd/selftests: exercise minor fault handling shmem support"
This reverts commit 44f2dcd54e168d03c32ef4730596783bff3180f7. 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
41c5a99009
commit
542ffaa634
1 changed files with 5 additions and 14 deletions
|
|
@ -1174,7 +1174,7 @@ static int userfaultfd_minor_test(void)
|
|||
uint8_t expected_byte;
|
||||
void *expected_page;
|
||||
char c;
|
||||
uint64_t req_features, features_out;
|
||||
uint64_t features = UFFD_FEATURE_MINOR_HUGETLBFS;
|
||||
|
||||
if (!test_uffdio_minor)
|
||||
return 0;
|
||||
|
|
@ -1182,18 +1182,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;
|
||||
|
|
@ -1203,7 +1195,7 @@ static int userfaultfd_minor_test(void)
|
|||
uffdio_register.range.len = nr_pages * page_size;
|
||||
uffdio_register.mode = UFFDIO_REGISTER_MODE_MINOR;
|
||||
if (ioctl(uffd, UFFDIO_REGISTER, &uffdio_register)) {
|
||||
perror("register failure");
|
||||
fprintf(stderr, "register failure\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
|
@ -1456,7 +1448,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 {
|
||||
fprintf(stderr, "Unknown test type: %s\n", type), exit(1);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue