mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-30 13:58:34 +00:00
zdtm: thp_disable: Verify MADV_NOHUGEPAGE before migration
Add a sanity check for THP_DISABLE. This discovered a broken commit in Google's kernel tree. Signed-off-by: Michał Mirosław <emmir@google.com>
This commit is contained in:
committed by
Andrei Vagin
parent
6006cb6eaf
commit
c75c017e4c
@@ -47,6 +47,21 @@ int main(int argc, char **argv)
|
||||
return -1;
|
||||
}
|
||||
|
||||
test_msg("Fetch pre-migration flags/adv\n");
|
||||
if (get_smaps_bits((unsigned long)area, &new_flags, &new_madv))
|
||||
return -1;
|
||||
|
||||
errno = 0;
|
||||
if (orig_flags != new_flags) {
|
||||
fail("Flags changed %lx -> %lx\n", orig_flags, new_flags);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (orig_madv != new_madv) {
|
||||
fail("Madvs changed %lx -> %lx\n", orig_madv, new_madv);
|
||||
return -1;
|
||||
}
|
||||
|
||||
test_daemon();
|
||||
test_waitsig();
|
||||
|
||||
|
Reference in New Issue
Block a user