Skip to content

Commit

Permalink
zdtm: Cache CRIU feature check results.
Browse files Browse the repository at this point in the history
Make the tests faster by avoiding multiple runs of `criu` with same args
when detecting CRIU features.

Signed-off-by: Michał Mirosław <[email protected]>
  • Loading branch information
osctobe committed Jun 19, 2023
1 parent 8ce79c3 commit c99e6bb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/zdtm.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import datetime
import errno
import fcntl
import functools
import glob
import linecache
import mmap
Expand Down Expand Up @@ -1497,6 +1498,7 @@ def restore(self):
pstree_check_stopped(self.__test.getpid())
pstree_signal(self.__test.getpid(), signal.SIGCONT)

@functools.cache
@staticmethod
def check(feature):
if feature == 'stream':
Expand Down

0 comments on commit c99e6bb

Please sign in to comment.