ltp: Fixing determinism issues
PATCH v2 1/1 ltp: Fixing determinism issues
Add a patch adding sorting to a couple of points in the Makefiles which removes most of the determinism issues in ltp.
Build swapon before the main build to ensure libswapon.o is built deterministically as it races with swapoff.
All issues reported on the upstream mailing list.
Signed-off-by Richard Purdie <[email protected]>
--- meta/lib/oeqa/selftest/cases/reproducible.py | 1 - .../ltp/ltp/determinism.patch | 43 +++++++++++++++++++ meta/recipes-extended/ltp/ltp_20210121.bb | 13 ++++++ 3 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-extended/ltp/ltp/determinism.patch
meta/lib/oeqa/selftest/cases/reproducible.py +0 -1
@@ -34,7 +34,6 @@ exclude_packages = [ 'go-runtime', 'go_', 'go-', - 'ltp', 'meson', 'ovmf-shell-efi', 'perf',
meta/recipes-extended/ltp/ltp/determinism.patch new file +43 -0
43 lines not on this page · raw message
meta/recipes-extended/ltp/ltp_20210121.bb +13 -0
@@ -29,11 +29,16 @@ CFLAGS_append_powerpc64 = " -D__SANE_USERSPACE_TYPES__" CFLAGS_append_mipsarchn64 = " -D__SANE_USERSPACE_TYPES__" SRCREV = "4d005621edd109d119627eb9210b224a63bf22cb" +# remove at next version upgrade or when output changes +PR = "r1" +HASHEQUIV_HASH_VERSION .= ".1" + SRC_URI = "git://github.com/linux-test-project/ltp.git \ file://0001-build-Add-option-to-select-libc-implementation.patch \ file://0007-Fix-test_proc_kill-hanging.patch \ file://0001-Add-more-musl-exclusions.patch \ file://0001-Remove-OOM-tests-from-runtest-mm.patch \ + file://determinism.patch \ " S = "${WORKDIR}/git"
@@ -51,6 +56,14 @@ EXTRA_OECONF = " --with-realtime-testsuite --with-open-posix-testsuite " # ltp network/rpc test cases ftbfs when libtirpc is found EXTRA_OECONF += " --without-tirpc " +do_compile_prepend() { + # Reported at http://lists.linux.it/pipermail/ltp/2021-March/021274.html + # Avoid a race over construction of libswapon.o which is built by swapon and swapoff + # but the object differs depending upon which one built it + # ("../swapon/libswapon.c" vs "libswapon.c" references) + make -C ${B}/testcases/kernel/syscalls/swapon/ +} + do_install(){ install -d ${D}${prefix}/ oe_runmake DESTDIR=${D} SKIP_IDCHECK=1 install
Signature · 1 line
2.27.0