diff --git a/test/zdtm/static/mnt_root_ext.c b/test/zdtm/static/mnt_root_ext.c index 6a2eb068c..305e87262 100644 --- a/test/zdtm/static/mnt_root_ext.c +++ b/test/zdtm/static/mnt_root_ext.c @@ -51,6 +51,14 @@ int main(int argc, char **argv) return 1; } + /* + * Make mounts in temporary mntns slave, to prevent propagation to criu mntns + */ + if (mount(NULL, "/", NULL, MS_SLAVE | MS_REC, NULL)) { + pr_perror("make rslave"); + return 1; + } + /* * Populate to the tests root host's rootfs subdir */