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
These changes update `check_pages_counts()` to support
`secmempages_written` stat.

Signed-off-by: Dhanuka Warusadura <csx@tuta.io>
  • Loading branch information
warusadura committed Sep 4, 2023
1 parent 1cbbf70 commit e908a0c
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 e908a0c

Please sign in to comment.