From: Ross Burton <ross.bur...@arm.com>

Signed-off-by: Ross Burton <ross.bur...@arm.com>
Signed-off-by: Luca Ceresoli <luca.ceres...@bootlin.com>
Signed-off-by: Richard Purdie <richard.pur...@linuxfoundation.org>
(cherry picked from commit 50b81a263187af4452d3b99967bffd01c6ddb476)
Signed-off-by: Steve Sakoman <st...@sakoman.com>
---
 .../quilt/quilt/faildiff-order.patch          | 47 ++++++++++++-------
 1 file changed, 30 insertions(+), 17 deletions(-)

diff --git a/meta/recipes-devtools/quilt/quilt/faildiff-order.patch 
b/meta/recipes-devtools/quilt/quilt/faildiff-order.patch
index 40f3c2636a..f22065a250 100644
--- a/meta/recipes-devtools/quilt/quilt/faildiff-order.patch
+++ b/meta/recipes-devtools/quilt/quilt/faildiff-order.patch
@@ -1,28 +1,41 @@
-This test assumes that two lines that are output on different streams (stdout
-and stderr) will be read in the same order, but thanks to buffering that may 
not
-be the case.
+Upstream-Status: Backport
+Signed-off-by: Ross Burton <ross.bur...@arm.com>
 
-Change the expected lines to be regexs that each match both expected lines, so
-the test always works no matter the actual order the lines are read in.
+From 4dfe7f9e702c85243a71e4de267a13e434b6d6c2 Mon Sep 17 00:00:00 2001
+From: Jean Delvare <jdelv...@suse.de>
+Date: Fri, 20 Jan 2023 12:56:08 +0100
+Subject: [PATCH] test: Fix a race condition
 
-Bug filed at https://savannah.nongnu.org/bugs/index.php?63651 to discuss a
-proper solution.
+The test suite does not differentiate between stdout and stderr. When
+messages are printed to both, the order in which they will reach us
+is apparently not guaranteed. Ideally this would be deterministic, but
+until then, explicitly test stdout and stderr separately in the test
+case itself. Otherwise the test suite fails randomly, which is a pain
+for distribution package maintainers.
 
-Upstream-Status: Inappropriate
-Signed-off-by: Ross Burton <ross.bur...@arm.com>
+This fixes bug #63651 reported by Ross Burton:
+https://savannah.nongnu.org/bugs/index.php?63651
+
+Signed-off-by: Jean Delvare <jdelv...@suse.de>
+---
+ test/faildiff.test | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/test/faildiff.test b/test/faildiff.test
-index 5afb8e3..5f32f71 100644
+index 5afb8e3..0444c15 100644
 --- a/test/faildiff.test
 +++ b/test/faildiff.test
-@@ -28,8 +28,8 @@ What happens on binary files?
+@@ -27,8 +27,9 @@ What happens on binary files?
+       > File test.bin added to patch %{P}test.diff
  
        $ printf "\\003\\000\\001" > test.bin
-       $ quilt diff -pab --no-index
--      >~ (Files|Binary files) a/test\.bin and b/test\.bin differ
--      > Diff failed on file 'test.bin', aborting
-+      >~ (.*[Ff]iles a/test\.bin and b/test\.bin differ|Diff failed on file 
'test.bin', aborting)
-+      >~ (.*[Ff]iles a/test\.bin and b/test\.bin differ|Diff failed on file 
'test.bin', aborting)
+-      $ quilt diff -pab --no-index
++      $ quilt diff -pab --no-index 2>/dev/null
+       >~ (Files|Binary files) a/test\.bin and b/test\.bin differ
++      $ quilt diff -pab --no-index >/dev/null
+       > Diff failed on file 'test.bin', aborting
        $ echo %{?}
        > 1
- 
+-- 
+2.34.1
+
-- 
2.34.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#177467): 
https://lists.openembedded.org/g/openembedded-core/message/177467
Mute This Topic: https://lists.openembedded.org/mt/97097221/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to