diff options
author | Oleksandr Tymoshenko <ovt@google.com> | 2022-07-15 23:15:42 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-07-29 17:25:06 +0200 |
commit | 0791309aa0eb2d39c116ff95bab120e53b0c8f94 (patch) | |
tree | b24e9b38559e2760376511157911080e803d5a43 /tools/testing/selftests/vm | |
parent | cfd3a9be0ac423be41afcc7a07d708056bf097a8 (diff) |
Revert "selftest/vm: verify mmap addr in mremap_test"
This reverts commit e8b9989597daac896b3400b7005f24bf15233d9a.
The upstream commit 9c85a9bae267 ("selftest/vm: verify mmap addr in
mremap_test") was backported as commit a17404fcbfd0 ("selftest/vm:
verify mmap addr in mremap_test"). Repeated backport introduced the
duplicate of function get_mmap_min_addr to the file breakign the vm
selftest build.
Fixes: e8b9989597da ("selftest/vm: verify mmap addr in mremap_test")
Signed-off-by: Oleksandr Tymoshenko <ovt@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/testing/selftests/vm')
-rw-r--r-- | tools/testing/selftests/vm/mremap_test.c | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/tools/testing/selftests/vm/mremap_test.c b/tools/testing/selftests/vm/mremap_test.c index efcbf537b3d5..e3ce33a9954e 100644 --- a/tools/testing/selftests/vm/mremap_test.c +++ b/tools/testing/selftests/vm/mremap_test.c @@ -66,35 +66,6 @@ enum { .expect_failure = should_fail \ } -/* Returns mmap_min_addr sysctl tunable from procfs */ -static unsigned long long get_mmap_min_addr(void) -{ - FILE *fp; - int n_matched; - static unsigned long long addr; - - if (addr) - return addr; - - fp = fopen("/proc/sys/vm/mmap_min_addr", "r"); - if (fp == NULL) { - ksft_print_msg("Failed to open /proc/sys/vm/mmap_min_addr: %s\n", - strerror(errno)); - exit(KSFT_SKIP); - } - - n_matched = fscanf(fp, "%llu", &addr); - if (n_matched != 1) { - ksft_print_msg("Failed to read /proc/sys/vm/mmap_min_addr: %s\n", - strerror(errno)); - fclose(fp); - exit(KSFT_SKIP); - } - - fclose(fp); - return addr; -} - /* * Returns false if the requested remap region overlaps with an * existing mapping (e.g text, stack) else returns true. |