[CRIU] [RESEND v2 4/5] zdtm: call getpid() during gone if pid is zero

Adrian Reber adrian at lisas.de
Tue May 23 02:42:14 PDT 2017


From: Adrian Reber <areber at redhat.com>

If calling gone() without ever calling getpid() before leads to
backtrace. Just call getpid() to avoid that.

Signed-off-by: Adrian Reber <areber at redhat.com>
---
 test/zdtm.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/test/zdtm.py b/test/zdtm.py
index 19fbec2..b5062ea 100755
--- a/test/zdtm.py
+++ b/test/zdtm.py
@@ -500,6 +500,8 @@ class zdtm_test:
 		return self.__getcropts() + self.__freezer.getropts() + self.__desc.get('ropts', '').split()
 
 	def gone(self, force = True):
+		if self.__pid == 0:
+			self.getpid()
 		if not self.auto_reap:
 			pid, status = os.waitpid(int(self.__pid), 0)
 			if pid != int(self.__pid):
-- 
1.8.3.1



More information about the CRIU mailing list