[CRIU] [PATCH] zdtm.py: check for link remap files presence on test end

Stanislav Kinsburskiy skinsbursky at virtuozzo.com
Tue Aug 2 06:19:10 PDT 2016



02.08.2016 14:13, Pavel Emelyanov пишет:
> On 07/28/2016 12:21 PM, Stanislav Kinsburskiy wrote:
>> These files have to be removed after successful restore.
>>
>> Signed-off-by: Stanislav Kinsburskiy <skinsbursky at virtuozzo.com>
>> ---
>>   test/zdtm.py |    7 +++++++
>>   1 file changed, 7 insertions(+)
>>
>> diff --git a/test/zdtm.py b/test/zdtm.py
>> index 52b656e..ece1785 100755
>> --- a/test/zdtm.py
>> +++ b/test/zdtm.py
>> @@ -955,6 +955,13 @@ def check_visible_state(test, state, opts):
>>   			raise test_fail_exc("mounts compare")
>>   
>>   
>> +	import glob
>> +	link_remap_list = glob.glob(os.path.dirname(test.getname()) + '/link_remap*')
> Ugh, there's no need in such a hammer :) Link remaps only get created by
> tests that need --link-remap option.

Sorry, but I don't get what the "hammer" is?
Doing this check unconditionally, regardless --link-remap option?
Or something else?

>> +	if link_remap_list:
>> +		print "%s: link-remap files left: %s" % (test.getname(), link_remap_list)
>> +		raise test_fail_exc("link remaps left")
>> +
>> +
>>   class noop_freezer:
>>   	def __init__(self):
>>   		self.kernel = False
>>
>> .
>>



More information about the CRIU mailing list