Skip to content

Commit

Permalink
Skip madvise_fracture_flags test if CONFIG_TRANSPARENT_HUGEPAGE is di…
Browse files Browse the repository at this point in the history
…sabled
  • Loading branch information
pcc authored and rocallahan committed Apr 30, 2024
1 parent 822863c commit 42ae00b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/test/madvise_fracture_flags.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 42ae00b

Please sign in to comment.