From patchwork Fri Jan 13 16:57:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 18106 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id D7812C54EBE for ; Fri, 13 Jan 2023 16:57:06 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.93248.1673629025477453221 for ; Fri, 13 Jan 2023 08:57:05 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id CF6D0FEC; Fri, 13 Jan 2023 08:57:46 -0800 (PST) Received: from oss-tx204.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 35B7A3F67D; Fri, 13 Jan 2023 08:57:04 -0800 (PST) From: Ross Burton To: openembedded-core@lists.openembedded.org Cc: nd@arm.com Subject: [PATCH 1/2] quilt: rewrite ptest glue Date: Fri, 13 Jan 2023 16:57:01 +0000 Message-Id: <20230113165702.1312882-1-ross.burton@arm.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 13 Jan 2023 16:57:06 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/175840 The ptest glue was overly complex. Not as many files are needed to be installed if we tell it to use the system's quilt tools, there's no need for a custom Makefile just to set some environment variables, and /usr/bin/ed doesn't appear to be used at all. Signed-off-by: Ross Burton --- meta/recipes-devtools/quilt/quilt.inc | 28 ++++++++------------- meta/recipes-devtools/quilt/quilt/Makefile | 14 ----------- meta/recipes-devtools/quilt/quilt/run-ptest | 7 +++--- meta/recipes-devtools/quilt/quilt/test.sh | 25 +++++++++++++++++- 4 files changed, 38 insertions(+), 36 deletions(-) delete mode 100644 meta/recipes-devtools/quilt/quilt/Makefile diff --git a/meta/recipes-devtools/quilt/quilt.inc b/meta/recipes-devtools/quilt/quilt.inc index ec69705093b..b4284dcafb3 100644 --- a/meta/recipes-devtools/quilt/quilt.inc +++ b/meta/recipes-devtools/quilt/quilt.inc @@ -9,7 +9,6 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" SRC_URI = "${SAVANNAH_GNU_MIRROR}/quilt/quilt-${PV}.tar.gz \ file://run-ptest \ - file://Makefile \ file://test.sh \ file://0001-tests-Allow-different-output-from-mv.patch \ file://fix-grep-3.8.patch \ @@ -61,17 +60,12 @@ do_install:append:class-native () { touch ${D}${sysconfdir}/quiltrc } -do_compile_ptest() { - oe_runmake bin/patch-wrapper test/.depend -} - do_install_ptest() { - tar -c --exclude=\*.in bin/ | ( cd ${D}${PTEST_PATH} && tar -xf - ) - tar -c --exclude=\*.in compat/ | ( cd ${D}${PTEST_PATH} && tar -xf - ) - tar -c --exclude=\*.in quilt/ | ( cd ${D}${PTEST_PATH} && tar -xf - ) - tar -c --exclude=mail.test --exclude=delete.test test/ | ( cd ${D}${PTEST_PATH} && tar -xf - && chmod 777 test) - cp ${WORKDIR}/Makefile ${D}${PTEST_PATH} - cp ${WORKDIR}/test.sh ${D}${PTEST_PATH} + install ${WORKDIR}/test.sh ${D}${PTEST_PATH} + mkdir ${D}${PTEST_PATH}/test + install ${S}/test/* ${D}${PTEST_PATH}/test + # mail needs a MTA, and the patch-wrapper is disabled + rm -f ${D}${PTEST_PATH}/test/mail.test ${D}${PTEST_PATH}/test/patch-wrapper.test } PACKAGES += "guards guards-doc" @@ -85,9 +79,9 @@ FILES:guards-doc = "${mandir}/man1/guards.1" RDEPENDS:${PN} = "bash patch diffstat bzip2 util-linux less" RDEPENDS:${PN}:class-native = "diffstat-native patch-native bzip2-native" -RDEPENDS:${PN}-ptest = "make file sed gawk diffutils findutils ed perl \ - perl-module-filehandle perl-module-getopt-std \ - perl-module-posix perl-module-file-temp \ - perl-module-text-parsewords perl-module-overloading \ - bash util-linux-getopt patch \ - " +RDEPENDS:${PN}-ptest += "file sed gawk diffutils findutils ed perl \ + perl-module-filehandle perl-module-getopt-std \ + perl-module-posix perl-module-file-temp \ + perl-module-text-parsewords perl-module-overloading \ + bash util-linux-getopt \ + " diff --git a/meta/recipes-devtools/quilt/quilt/Makefile b/meta/recipes-devtools/quilt/quilt/Makefile deleted file mode 100644 index 1f6cd2479ca..00000000000 --- a/meta/recipes-devtools/quilt/quilt/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -PATH := $(CURDIR)/bin:$(CURDIR)/compat:$(PATH) -QUILT_DIR := $(CURDIR)/quilt -QUILTRC := $(CURDIR)/test/test.quiltrc -export QUILT_DIR QUILTRC -CHECK_ENV := P=patches/; _P=../patches/; export P _P; -CHECK_ENV += QUILT_PC=.pc; export QUILT_PC --include test/.depend - -check-% : test/%.test - @LANG=C; LC_ALL=C; \ - export LANG LC_ALL; \ - $(CHECK_ENV); \ - cd $( X-Patchwork-Id: 18107 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id B69EFC54EBE for ; Fri, 13 Jan 2023 16:57:16 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.93259.1673629026464340999 for ; Fri, 13 Jan 2023 08:57:06 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 77BB5106F; Fri, 13 Jan 2023 08:57:47 -0800 (PST) Received: from oss-tx204.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D6A993F67D; Fri, 13 Jan 2023 08:57:04 -0800 (PST) From: Ross Burton To: openembedded-core@lists.openembedded.org Cc: nd@arm.com Subject: [PATCH 2/2] quilt: fix intermittent failure in faildiff.test Date: Fri, 13 Jan 2023 16:57:02 +0000 Message-Id: <20230113165702.1312882-2-ross.burton@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230113165702.1312882-1-ross.burton@arm.com> References: <20230113165702.1312882-1-ross.burton@arm.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 13 Jan 2023 16:57:16 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/175841 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 ] Signed-off-by: Ross Burton --- meta/recipes-devtools/quilt/quilt.inc | 1 + .../quilt/quilt/faildiff-order.patch | 28 +++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 meta/recipes-devtools/quilt/quilt/faildiff-order.patch diff --git a/meta/recipes-devtools/quilt/quilt.inc b/meta/recipes-devtools/quilt/quilt.inc index b4284dcafb3..f7ff958103e 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 \ file://test.sh \ file://0001-tests-Allow-different-output-from-mv.patch \ file://fix-grep-3.8.patch \ + file://faildiff-order.patch \ " SRC_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 00000000000..40f3c2636a5 --- /dev/null +++ b/meta/recipes-devtools/quilt/quilt/faildiff-order.patch @@ -0,0 +1,28 @@ +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. + +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. + +Bug filed at https://savannah.nongnu.org/bugs/index.php?63651 to discuss a +proper solution. + +Upstream-Status: Inappropriate +Signed-off-by: Ross Burton + +diff --git a/test/faildiff.test b/test/faildiff.test +index 5afb8e3..5f32f71 100644 +--- a/test/faildiff.test ++++ b/test/faildiff.test +@@ -28,8 +28,8 @@ What happens on binary files? + + $ 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) + $ echo %{?} + > 1 +