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 Oct 15, 2023
1 parent c62c398 commit d8af0b0
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 @@ -1257,8 +1257,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 d8af0b0

Please sign in to comment.