Skip to contentSkip to conversation

xfstests: use master branch instead of 'for-next'

PATCH New Martin Jansa 1 participant 2 messages Feb 8, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 xfstests: use master branch instead of 'for-next'

---
 meta-filesystems/recipes-utils/xfstests/xfstests_2024.01.14.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-filesystems/recipes-utils/xfstests/xfstests_2024.01.14.bb +1 -1
index d0237649e9..33d441e41e 100644
@@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://LICENSES/GPL-2.0;md5=74274e8a218423e49eefdea80bc55038
 SRCREV = "11914614784735c504f43b5b6baabaa713375984"
 SRCREV_FORMAT = "xfstests_unionmount"
 
-SRC_URI = "git://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git;branch=for-next;name=xfstests \
+SRC_URI = "git://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git;branch=master;name=xfstests \
            git://github.com/amir73il/unionmount-testsuite.git;branch=master;protocol=https;name=unionmount;destsuffix=unionmount-testsuite \
            file://0002-Drop-detached_mounts_propagation-and-remove-sys-moun.patch \
            file://0001-add-missing-FTW_-macros-when-not-available-in-libc.patch \
Signature · 1 line
2.43.0
#1 lore raw

PATCH 2/2 xfstests: drop the upstream rejected install-sh hack

* I'm trying to fix random build failure from world builds:
  tests-install sometimes fails as shown bellow:
cp: cannot stat 'group.list': No such file or directory
...
  mv: failed to preserve ownership for 'group.list': Invalid argument

  whole log:
2023.10.29: http://errors.yoctoproject.org/Errors/Details/752403/
2024.01.14 http://errors.yoctoproject.org/Errors/Details/752404/

* Interestingly I finally triggered this error for first time in my local build (when rebuilding it after reverting this upgrade - which might be just coincidence), here is the log:

While looking at this a bit more, I've noticed that install-sh in:

  # install-sh script in the project is outdated
  # we use the one from the latest libtool to solve installation issues
  # It looks like the upstream is not interested in having it fixed :(
  # https://www.spinics.net/lists/fstests/msg16981.html
  do_configure:prepend() {
      cp ${STAGING_DIR_NATIVE}${datadir}/libtool/build-aux/install-sh ${B}
  }

is copied only to ${B}, but Makefile still has "cp include/install-sh ." which was removed in proposed change for upstream:
https://www.spinics.net/lists/fstests/msg16899.html

but here it isn't, so shouldn't we copy it to ${B}/include to make sure that make won't use the old version?
So I've tried to add:
   cp ${STAGING_DIR_NATIVE}${datadir}/libtool/build-aux/install-sh ${B}/include

in do_configure:prepend and then I've triggered the build failure again
this time with 2024.01.14 version as well by running:
for i in seq -w 1 100; do bitbake -c cleansstate xfstests; bitbake -k xfstests 2>&1 | tee log.xfstests.$i; done

so the issue isn't fixed in the 2024.01.14 version, but maybe it's a bug introduced by our install-sh?
It was rejected by upstream in:
https://www.spinics.net/lists/fstests/msg16928.html

  This install-sh has been used for performance reason, I'd like keep it if possible. Would you please describe the failures you hit in cross-compilation env? It'd be great if we could fix the env issue.

Also the important error isn't:
"mv: failed to preserve ownership for 'group.list': Invalid argument"
because that's shown in all the builds:
xfstests $ grep -c "mv: failed to preserve ownership for 'group.list': Invalid argument" */temp/log.do_install* 2023.10.29-broken/temp/log.do_install:14
2023.10.29-broken/temp/log.do_install.1094046:14 2023.10.29-fixed-after-broken/temp/log.do_install:14 2023.10.29-fixed-after-broken/temp/log.do_install.1094046:14 2023.10.29-fixed-after-broken/temp/log.do_install.1120923:14 2023.10.29/temp/log.do_install:14
2023.10.29/temp/log.do_install.1094046:14
2024.01.14-ok/temp/log.do_install:14
2024.01.14-ok/temp/log.do_install.1186155:14

but the "cp: cannot stat 'group.list': No such file or directory" which is shown only in the ones which in the end failed:

xfstests $ grep cp */temp/log.do_install*
2023.10.29-broken/temp/log.do_install:cp: cannot stat 'group.list': No such file or directory 2023.10.29-broken/temp/log.do_install.1094046:cp: cannot stat 'group.list': No such file or directory 2023.10.29-fixed-after-broken/temp/log.do_install.1094046:cp: cannot stat 'group.list': No such file or directory 2023.10.29/temp/log.do_install:cp: cannot stat 'group.list': No such file or directory 2023.10.29/temp/log.do_install.1094046:cp: cannot stat 'group.list': No such file or directory

So I guess we should just drop this install-sh hack from do_configure completely as cross-compilation seems to be fixed upstream already in:
https://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git/commit/?id=5d20084fefaf09e86be26d7c71bd1c7ac2a2b35c

xfstests/2024.01.14-ok/git $ git log --oneline include/install-sh fa993e51 include/: spdx license conversion
da7916f7 build: Use the original install-sh file from SGI

xfstests/2024.01.14-ok/git $ git log --oneline install-sh
5d20084f build: allow cros-compilation on chromeOS
e3ca126a xfstests: respect DESTDIR when installing
fa6a7868 xfsqa: more sh to bash conversions
491d467f Add GPL license plate to SGI's files.
d259454b Update copyright annotations and license boilerplates to correspond with SGI Legals preferences. Merge of master-melb:xfs-cmds:24329a by kenmcd. 3ef12e38 Update copyright dates (again)
bc4eb461 Undoes mod:     xfs-cmds:slinx:120772a Undo xfs-cmds:slinx:120772a, inadvertently whacked a previous mod.
8ce73f86 Update copyright dates
db6944ec need a copy of this here too.

* buildhistory doesn't show any difference, so all the files are installed in the same location as before

---
 .../xfstests/xfstests_2024.01.14.bb           | 20 +++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)
meta-filesystems/recipes-utils/xfstests/xfstests_2024.01.14.bb +14 -6
index 33d441e41e..711637a70d 100644
@@ -16,6 +16,7 @@ SRCREV_unionmount = "e3825b16b46f4c4574a1a69909944c059835f914"
 
 S = "${WORKDIR}/git"
 
+# brokensep because m4/package_globals.m4 calls ". ./VERSION" (and that's not the only issue)
 inherit autotools-brokensep useradd
 
 DEPENDS += "xfsprogs acl"
@@ -44,15 +45,22 @@ USERADD_PARAM:${PN} = "-U -m fsgqa; -N 123456-fsgqa; -N fsgqa2"
 EXTRA_OECONF = "INSTALL_USER=root INSTALL_GROUP=root"
 
 TARGET_CC_ARCH:append:libc-musl = " -D_LARGEFILE64_SOURCE"
-# install-sh script in the project is outdated
-# we use the one from the latest libtool to solve installation issues
-# It looks like the upstream is not interested in having it fixed :(
-# https://www.spinics.net/lists/fstests/msg16981.html
+
 do_configure:prepend() {
-    cp ${STAGING_DIR_NATIVE}${datadir}/libtool/build-aux/install-sh ${B}
+    # this is done by Makefile configure target, but we don't call it in do_configure
+    cp -a ${S}/include/install-sh .
 }
 
-do_install:append() {
+# Not sure if this is needed, but with old install-sh it was sometimes failing with:
+# cp: cannot stat 'group.list': No such file or directory
+# http://errors.yoctoproject.org/Errors/Details/752404/
+# PARALLEL_MAKEINST = "-j1"
+
+do_install:prepend() {
+    # otherwise install-sh duplicates DESTDIR prefix
+    export DIST_ROOT="/" DIST_MANIFEST="" DESTDIR="${D}"
+    oe_runmake install
+
     unionmount_target_dir=${D}/usr/xfstests/unionmount-testsuite
     install -d ${D}/usr/xfstests/unionmount-testsuite/tests
     install -D ${WORKDIR}/unionmount-testsuite/tests/* -t $unionmount_target_dir/tests
Signature · 1 line
2.43.0