Skip to content

Commit

Permalink
zdtm: update check_pages_counts() to support memfd_secret dump stats
Browse files Browse the repository at this point in the history
Signed-off-by: Dhanuka Warusadura <[email protected]>
  • Loading branch information
warusadura committed Aug 19, 2023
1 parent bb40c97 commit e732724
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/zdtm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit e732724

Please sign in to comment.