[CRIU] [PATCH] zdtm.py: Relax tail routine
Pavel Emelyanov
xemul at parallels.com
Mon Oct 26 11:45:36 PDT 2015
Write it w/o spawning tail binary %)
Signed-off-by: Pavel Emelyanov <xemul at parallels.com>
---
test/zdtm.py | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/test/zdtm.py b/test/zdtm.py
index 389ff34..f38566d 100755
--- a/test/zdtm.py
+++ b/test/zdtm.py
@@ -130,9 +130,7 @@ flavors = { 'h': host_flavor, 'ns': ns_flavor, 'uns': userns_flavor }
#
def tail(path):
- p = subprocess.Popen(['tail', '-n1', path],
- stdout = subprocess.PIPE)
- return p.stdout.readline()
+ return open(path).readlines().pop().strip()
def rpidfile(path):
return open(path).readline().strip()
--
1.9.3
More information about the CRIU
mailing list