Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip madvise_fracture_flags test if CONFIG_TRANSPARENT_HUGEPAGE is di… #3734

Merged
merged 1 commit into from
Apr 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Skip madvise_fracture_flags test if CONFIG_TRANSPARENT_HUGEPAGE is di…
…sabled
pcc committed Apr 24, 2024
commit 6e676df0dd3342422749f1dfb44371d93641db1f
5 changes: 5 additions & 0 deletions src/test/madvise_fracture_flags.c
Original file line number Diff line number Diff line change
@@ -36,6 +36,11 @@ int main(__attribute__((unused)) int argc, __attribute__((unused)) char** argv)
char *probe_map = mmap(NULL, PROBE_REGION_SIZE, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_NORESERVE, -1, 0);
test_assert(probe_map != MAP_FAILED);
ret = madvise(probe_map, PROBE_REGION_SIZE, MADV_HUGEPAGE);
if (ret == -1 && errno == EINVAL) {
atomic_puts("Skipping test: CONFIG_TRANSPARENT_HUGEPAGE is disabled");
atomic_puts("EXIT-SUCCESS");
return 77;
}
test_assert(ret == 0);
ret = madvise(probe_map, PROBE_REGION_SIZE, MADV_DONTDUMP);
test_assert(ret == 0);