1Upstream-Status: Backport 2Signed-off-by: Ross Burton <ross.burton@arm.com> 3 4From 4dfe7f9e702c85243a71e4de267a13e434b6d6c2 Mon Sep 17 00:00:00 2001 5From: Jean Delvare <jdelvare@suse.de> 6Date: Fri, 20 Jan 2023 12:56:08 +0100 7Subject: [PATCH] test: Fix a race condition 8 9The test suite does not differentiate between stdout and stderr. When 10messages are printed to both, the order in which they will reach us 11is apparently not guaranteed. Ideally this would be deterministic, but 12until then, explicitly test stdout and stderr separately in the test 13case itself. Otherwise the test suite fails randomly, which is a pain 14for distribution package maintainers. 15 16This fixes bug #63651 reported by Ross Burton: 17https://savannah.nongnu.org/bugs/index.php?63651 18 19Signed-off-by: Jean Delvare <jdelvare@suse.de> 20--- 21 test/faildiff.test | 3 ++- 22 1 file changed, 2 insertions(+), 1 deletion(-) 23 24diff --git a/test/faildiff.test b/test/faildiff.test 25index 5afb8e3..0444c15 100644 26--- a/test/faildiff.test 27+++ b/test/faildiff.test 28@@ -27,8 +27,9 @@ What happens on binary files? 29 > File test.bin added to patch %{P}test.diff 30 31 $ printf "\\003\\000\\001" > test.bin 32- $ quilt diff -pab --no-index 33+ $ quilt diff -pab --no-index 2>/dev/null 34 >~ (Files|Binary files) a/test\.bin and b/test\.bin differ 35+ $ quilt diff -pab --no-index >/dev/null 36 > Diff failed on file 'test.bin', aborting 37 $ echo %{?} 38 > 1 39-- 402.34.1 41 42