mirror of
https://github.com/checkpoint-restore/criu
synced 2025-09-02 07:15:31 +00:00
zdtm: Do not compare maps and fds for non-static tests
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
18
test/zdtm.py
18
test/zdtm.py
@@ -239,7 +239,7 @@ class zdtm_test:
|
|||||||
self.__flavor.fini()
|
self.__flavor.fini()
|
||||||
|
|
||||||
def stop(self):
|
def stop(self):
|
||||||
print "Stop test"
|
self.getpid() # Read the pid from pidfile back
|
||||||
self.kill(signal.SIGTERM)
|
self.kill(signal.SIGTERM)
|
||||||
|
|
||||||
res = tail(self.__name + '.out')
|
res = tail(self.__name + '.out')
|
||||||
@@ -286,6 +286,10 @@ class zdtm_test:
|
|||||||
print open(self.__name + '.out').read()
|
print open(self.__name + '.out').read()
|
||||||
print " <<< " + "=" * 32
|
print " <<< " + "=" * 32
|
||||||
|
|
||||||
|
def static(self):
|
||||||
|
return self.__name.split('/')[2] == 'static'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class inhfd_test:
|
class inhfd_test:
|
||||||
def __init__(self, name, desc, flavor):
|
def __init__(self, name, desc, flavor):
|
||||||
@@ -365,6 +369,9 @@ class inhfd_test:
|
|||||||
def print_output(self):
|
def print_output(self):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
def static(self):
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
test_classes = { 'zdtm': zdtm_test, 'inhfd': inhfd_test }
|
test_classes = { 'zdtm': zdtm_test, 'inhfd': inhfd_test }
|
||||||
|
|
||||||
@@ -505,9 +512,12 @@ def cmp_lists(m1, m2):
|
|||||||
return filter(lambda x: x[0] != x[1], zip(m1, m2))
|
return filter(lambda x: x[0] != x[1], zip(m1, m2))
|
||||||
|
|
||||||
def get_visible_state(test):
|
def get_visible_state(test):
|
||||||
fds = get_fds(test)
|
if test.static():
|
||||||
maps = get_maps(test)
|
fds = get_fds(test)
|
||||||
return (fds, maps)
|
maps = get_maps(test)
|
||||||
|
return (fds, maps)
|
||||||
|
else:
|
||||||
|
return ([], [])
|
||||||
|
|
||||||
def check_visible_state(test, state):
|
def check_visible_state(test, state):
|
||||||
new = get_visible_state(test)
|
new = get_visible_state(test)
|
||||||
|
Reference in New Issue
Block a user