From: Ilya Dryomov Date: Mon, 7 Apr 2025 10:40:50 +0000 (+0200) Subject: test/librbd/test_notify.py: force line-buffered output X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=dc008248597a979a52575f1fecc14b2c377a5822;p=ceph.git test/librbd/test_notify.py: force line-buffered output "master" and "slave" invocations are intended to run in parallel and coordinate between themselves. Ensure that their respective output is properly timestamped and ordered in teuthology.log file. Fixes: https://tracker.ceph.com/issues/70831 Signed-off-by: Ilya Dryomov (cherry picked from commit 49dbabcecec7c458a6d2ddfbd8e14a6ec419b953) --- diff --git a/src/test/librbd/test_notify.py b/src/test/librbd/test_notify.py index 03ecf1263a8cd..4840add8dc452 100755 --- a/src/test/librbd/test_notify.py +++ b/src/test/librbd/test_notify.py @@ -1,4 +1,5 @@ #!/usr/bin/python3 +import functools import os import sys import time @@ -14,6 +15,8 @@ from rbd import (RBD, RBD_FEATURE_FAST_DIFF, RBD_FLAG_OBJECT_MAP_INVALID) +print = functools.partial(print, flush=True) + POOL_NAME='rbd' PARENT_IMG_NAME='test_notify_parent' CLONE_IMG_NAME='test_notify_clone'