Skip to content

Commit d8af0b0

Browse files
committed
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 <[email protected]>
1 parent c62c398 commit d8af0b0

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

test/zdtm.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1257,8 +1257,12 @@ def check_pages_counts(self):
12571257
with open(self.__stats_file("dump"), 'rb') as stfile:
12581258
stats = crpc.images.load(stfile)
12591259
stent = stats['entries'][0]['dump']
1260-
stats_written = int(stent['shpages_written']) + int(
1261-
stent['pages_written'])
1260+
if stent['secmempages_written']:
1261+
stats_written = int(stent['secmempages_written']) + int(
1262+
stent['pages_written']) + 1
1263+
else:
1264+
stats_written = int(stent['shpages_written']) + int(
1265+
stent['pages_written'])
12621266

12631267
if self.__stream:
12641268
self.spawn_criu_image_streamer("extract")

0 commit comments

Comments
 (0)