From a6530728475a07aebc313728e42726babbc3cef3 Mon Sep 17 00:00:00 2001
From: Alberto Bertogli <albertito@blitiri.com.ar>
Date: Wed, 15 Jul 2009 15:49:29 -0300
Subject: [PATCH 39/74] tests: Flush stdout before fork()

Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>
---
 tests/behaviour/tf.py  |    1 +
 tests/stress/jiostress |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/tests/behaviour/tf.py b/tests/behaviour/tf.py
index a4fd9b9..9b0a189 100644
--- a/tests/behaviour/tf.py
+++ b/tests/behaviour/tf.py
@@ -38,6 +38,7 @@ def tmppath():
 
 def run_forked(f, *args, **kwargs):
 	"""Runs the function in a different process."""
+	sys.stdout.flush()
 	pid = os.fork()
 	if pid == 0:
 		# child
diff --git a/tests/stress/jiostress b/tests/stress/jiostress
index a6f816b..83973cb 100755
--- a/tests/stress/jiostress
+++ b/tests/stress/jiostress
@@ -106,6 +106,7 @@ class Stresser:
 	def randwrite_fork(self):
 		# do the prep before the fork so we can verify() afterwards
 		nd, start = self.prep_randwrite()
+		sys.stdout.flush()
 		pid = os.fork()
 		if pid == 0:
 			# child
-- 
1.6.2.2.646.gb214

