File: test-utils-flush-stdout-after-printing.patch

package info (click to toggle)
libsoup3 3.6.5-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,568 kB
  • sloc: ansic: 61,978; python: 202; xml: 97; sh: 84; makefile: 32; javascript: 5
file content (26 lines) | stat: -rw-r--r-- 772 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
From: Michael Catanzaro <mcatanzaro@redhat.com>
Date: Wed, 30 Apr 2025 12:07:01 -0500
Subject: test-utils: flush stdout after printing

test_printf() would be more useful if it were to actually guarantee
that everything has printed; otherwise, it cannot be used to determine
how far we've made it in a test before a hang.

Origin: upstream, 3.7.0, commit:3eec3d8b9b5d8ac1e202d02c715663a440e6a508
---
 tests/test-utils.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/test-utils.c b/tests/test-utils.c
index 37cd00b..62f0b83 100644
--- a/tests/test-utils.c
+++ b/tests/test-utils.c
@@ -143,6 +143,8 @@ debug_printf (int level, const char *format, ...)
 	va_start (args, format);
 	g_vprintf (format, args);
 	va_end (args);
+
+	fflush (stdout);
 }
 
 gboolean