From e908a0c8c70073db0e489491aa68c62b01261415 Mon Sep 17 00:00:00 2001 From: Dhanuka Warusadura Date: Tue, 15 Aug 2023 21:22:13 +0530 Subject: [PATCH] zdtm: update check_pages_counts() to support memfd_secret dump stats These changes update `check_pages_counts()` to support `secmempages_written` stat. Signed-off-by: Dhanuka Warusadura --- test/zdtm.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/zdtm.py b/test/zdtm.py index c6e852dc1a3..368968baddf 100755 --- a/test/zdtm.py +++ b/test/zdtm.py @@ -1250,8 +1250,12 @@ def check_pages_counts(self): with open(self.__stats_file("dump"), 'rb') as stfile: stats = crpc.images.load(stfile) stent = stats['entries'][0]['dump'] - stats_written = int(stent['shpages_written']) + int( - stent['pages_written']) + if stent['secmempages_written']: + stats_written = int(stent['secmempages_written']) + int( + stent['pages_written']) + 1 + else: + stats_written = int(stent['shpages_written']) + int( + stent['pages_written']) if self.__stream: self.spawn_criu_image_streamer("extract")