From 54888c487fd570f72dede8b265ac85b3ad0010f5 Mon Sep 17 00:00:00 2001 From: Pavel Tikhomirov Date: Tue, 22 Feb 2022 11:43:59 +0300 Subject: [PATCH] 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 --- test/zdtm/static/mount_complex_sharing.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/zdtm/static/mount_complex_sharing.c b/test/zdtm/static/mount_complex_sharing.c index b4463c41a..c6402d646 100644 --- a/test/zdtm/static/mount_complex_sharing.c +++ b/test/zdtm/static/mount_complex_sharing.c @@ -5,6 +5,7 @@ #include #include +#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;