summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@arm.com>2023-01-13 16:57:02 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-01-15 08:49:08 +0000
commitca8dcdbfab80899c7b3f0ca02bdc918bd7725d37 (patch)
tree3e4e0a535e28d37ec83591b34f677f18aaa60707
parent61bb4d8e75dfaaf980c32fbe992d34f794b7c537 (diff)
downloadpoky-ca8dcdbfab80899c7b3f0ca02bdc918bd7725d37.tar.gz
quilt: fix intermittent failure in faildiff.test
This test assumes that if a child process writes one line to stderr and then another line to stdout, and stderr is redirected to stdout, that the order the lines will be read is stable. This isn't the case and occasionally the lines will be read in a different order. Change the test to ignore line ordering. [ YOCTO #14469 ] (From OE-Core rev: 1ddbe4d2bd8d8da10dac8a054f130fcd1d242219) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-devtools/quilt/quilt.inc1
-rw-r--r--meta/recipes-devtools/quilt/quilt/faildiff-order.patch28
2 files changed, 29 insertions, 0 deletions
diff --git a/meta/recipes-devtools/quilt/quilt.inc b/meta/recipes-devtools/quilt/quilt.inc
index b4284dcafb..f7ff958103 100644
--- a/meta/recipes-devtools/quilt/quilt.inc
+++ b/meta/recipes-devtools/quilt/quilt.inc
@@ -12,6 +12,7 @@ SRC_URI = "${SAVANNAH_GNU_MIRROR}/quilt/quilt-${PV}.tar.gz \
12 file://test.sh \ 12 file://test.sh \
13 file://0001-tests-Allow-different-output-from-mv.patch \ 13 file://0001-tests-Allow-different-output-from-mv.patch \
14 file://fix-grep-3.8.patch \ 14 file://fix-grep-3.8.patch \
15 file://faildiff-order.patch \
15" 16"
16 17
17SRC_URI:append:class-target = " file://gnu_patch_test_fix_target.patch" 18SRC_URI:append:class-target = " file://gnu_patch_test_fix_target.patch"
diff --git a/meta/recipes-devtools/quilt/quilt/faildiff-order.patch b/meta/recipes-devtools/quilt/quilt/faildiff-order.patch
new file mode 100644
index 0000000000..40f3c2636a
--- /dev/null
+++ b/meta/recipes-devtools/quilt/quilt/faildiff-order.patch
@@ -0,0 +1,28 @@
1This test assumes that two lines that are output on different streams (stdout
2and stderr) will be read in the same order, but thanks to buffering that may not
3be the case.
4
5Change the expected lines to be regexs that each match both expected lines, so
6the test always works no matter the actual order the lines are read in.
7
8Bug filed at https://savannah.nongnu.org/bugs/index.php?63651 to discuss a
9proper solution.
10
11Upstream-Status: Inappropriate
12Signed-off-by: Ross Burton <ross.burton@arm.com>
13
14diff --git a/test/faildiff.test b/test/faildiff.test
15index 5afb8e3..5f32f71 100644
16--- a/test/faildiff.test
17+++ b/test/faildiff.test
18@@ -28,8 +28,8 @@ What happens on binary files?
19
20 $ printf "\\003\\000\\001" > test.bin
21 $ quilt diff -pab --no-index
22- >~ (Files|Binary files) a/test\.bin and b/test\.bin differ
23- > Diff failed on file 'test.bin', aborting
24+ >~ (.*[Ff]iles a/test\.bin and b/test\.bin differ|Diff failed on file 'test.bin', aborting)
25+ >~ (.*[Ff]iles a/test\.bin and b/test\.bin differ|Diff failed on file 'test.bin', aborting)
26 $ echo %{?}
27 > 1
28