zdtm.py: expect test to fail if crfail flag is set

Submitted by Pavel Tikhomirov on Feb. 12, 2019, 9:48 a.m.

Details

Message ID 20190212094814.12500-1-ptikhomirov@virtuozzo.com
State Accepted
Series "zdtm.py: expect test to fail if crfail flag is set"
Headers show

Commit Message

Pavel Tikhomirov Feb. 12, 2019, 9:48 a.m.
Suppress the false positive fail in criu-live-migration job:
https://ci.openvz.org/job/CRIU/job/criu-live-migration/job/criu-dev/1796/

[criu]# ./test/zdtm.py run -t zdtm/static/overmounted_file -f uns --lazy-migrate

Patch hide | download patch | download mbox

=== Run 1/1 ================ zdtm/static/overmounted_file
=================== Run zdtm/static/overmounted_file in uns ====================
Start test
Test is SUID
./overmounted_file --pidfile=overmounted_file.pid --outfile=overmounted_file.out --dirname=overmounted_file.test
Run criu dump
Test zdtm/static/overmounted_file FAIL at criu dump exited with 1 ######
Send the 9 signal to  49
Wait for zdtm/static/overmounted_file(49) to die for 0.100000

Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
---
 test/zdtm.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/test/zdtm.py b/test/zdtm.py
index 6dbf8c998..04034b01c 100755
--- a/test/zdtm.py
+++ b/test/zdtm.py
@@ -1053,7 +1053,10 @@  join_ns_file = '/run/netns/zdtm_netns'
 			os.close(status_fds[1])
 			if os.read(status_fds[0], 1) != b'\0':
 				ret = ret.wait()
-				raise test_fail_exc("criu %s exited with %s" % (action, ret))
+				if self.__test.blocking():
+					raise test_fail_expected_exc(action)
+				else:
+					raise test_fail_exc("criu %s exited with %s" % (action, ret))
 			os.close(status_fds[0])
 			return ret
 

Comments

Andrei Vagin Feb. 14, 2019, 6:20 p.m.
Applied, thanks!
On Tue, Feb 12, 2019 at 12:48:14PM +0300, Pavel Tikhomirov wrote:
> Suppress the false positive fail in criu-live-migration job:
> https://ci.openvz.org/job/CRIU/job/criu-live-migration/job/criu-dev/1796/
> 
> [criu]# ./test/zdtm.py run -t zdtm/static/overmounted_file -f uns --lazy-migrate
> === Run 1/1 ================ zdtm/static/overmounted_file
> =================== Run zdtm/static/overmounted_file in uns ====================
> Start test
> Test is SUID
> ./overmounted_file --pidfile=overmounted_file.pid --outfile=overmounted_file.out --dirname=overmounted_file.test
> Run criu dump
> Test zdtm/static/overmounted_file FAIL at criu dump exited with 1 ######
> Send the 9 signal to  49
> Wait for zdtm/static/overmounted_file(49) to die for 0.100000
> 
> Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
> ---
>  test/zdtm.py | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/test/zdtm.py b/test/zdtm.py
> index 6dbf8c998..04034b01c 100755
> --- a/test/zdtm.py
> +++ b/test/zdtm.py
> @@ -1053,7 +1053,10 @@ join_ns_file = '/run/netns/zdtm_netns'
>  			os.close(status_fds[1])
>  			if os.read(status_fds[0], 1) != b'\0':
>  				ret = ret.wait()
> -				raise test_fail_exc("criu %s exited with %s" % (action, ret))
> +				if self.__test.blocking():
> +					raise test_fail_expected_exc(action)
> +				else:
> +					raise test_fail_exc("criu %s exited with %s" % (action, ret))
>  			os.close(status_fds[0])
>  			return ret
>  
> -- 
> 2.20.1
>