lkml.org 
[lkml]   [2017]   [Jul]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V2] selftests/vm: Add tests to validate mirror functionality with mremap
On Tue 25-07-17 12:06:57, Anshuman Khandual wrote:
[...]
> diff --git a/tools/testing/selftests/vm/mremap_mirror_private_anon.c b/tools/testing/selftests/vm/mremap_mirror_private_anon.c
[...]
> + ptr = mmap(NULL, alloc_size, PROT_READ | PROT_WRITE,
> + MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
> + if (ptr == MAP_FAILED) {
> + perror("map() failed");
> + return -1;
> + }
> + memset(ptr, PATTERN, alloc_size);
> +
> + mirror_ptr = (char *) mremap(ptr, 0, alloc_size, MREMAP_MAYMOVE);
> + if (mirror_ptr == MAP_FAILED) {
> + perror("mremap() failed");
> + return -1;
> + }

What is the point of this test? It will break with Mike's patch very
soon. Btw. it never worked.
--
Michal Hocko
SUSE Labs

\
 
 \ /
  Last update: 2017-07-25 15:36    [W:0.063 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site