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