mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-01-23 02:14:37 +00:00
zdtm: add mntns_compare check to mount_complex_sharing
This way we can check that mount tree topology (including sharing groups) is the same before and after c/r. Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
This commit is contained in:
parent
ad349597b5
commit
54888c487f
1 changed files with 13 additions and 0 deletions
|
|
@ -5,6 +5,7 @@
|
|||
#include <sys/mount.h>
|
||||
#include <linux/limits.h>
|
||||
|
||||
#include "mountinfo.h"
|
||||
#include "zdtmtst.h"
|
||||
|
||||
const char *test_doc = "Check complex sharing options for mounts";
|
||||
|
|
@ -211,6 +212,7 @@ static int mount_loop(void)
|
|||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
struct mntns_zdtm mntns_before, mntns_after;
|
||||
int ret = 1;
|
||||
|
||||
test_init(argc, argv);
|
||||
|
|
@ -223,12 +225,23 @@ int main(int argc, char **argv)
|
|||
if (mount_loop())
|
||||
goto err;
|
||||
|
||||
if (mntns_parse_mountinfo(&mntns_before))
|
||||
goto err;
|
||||
|
||||
test_daemon();
|
||||
test_waitsig();
|
||||
|
||||
if (mntns_parse_mountinfo(&mntns_after))
|
||||
goto err;
|
||||
|
||||
if (mntns_compare(&mntns_before, &mntns_after))
|
||||
goto err;
|
||||
|
||||
pass();
|
||||
ret = 0;
|
||||
err:
|
||||
mntns_free_all(&mntns_before);
|
||||
mntns_free_all(&mntns_after);
|
||||
if (ret)
|
||||
fail();
|
||||
return ret;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue