]> code.ossystems Code Review - openembedded-core.git/commitdiff
ltp: Fix another determinism issue
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 5 Mar 2021 23:20:47 +0000 (23:20 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 6 Mar 2021 22:34:13 +0000 (22:34 +0000)
After the other fixes there remained occasional problems. Fix another makefile
sorting problem affecting the disktest binary.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-extended/ltp/ltp/determinism2.patch [new file with mode: 0644]
meta/recipes-extended/ltp/ltp_20210121.bb

diff --git a/meta/recipes-extended/ltp/ltp/determinism2.patch b/meta/recipes-extended/ltp/ltp/determinism2.patch
new file mode 100644 (file)
index 0000000..ab08e8e
--- /dev/null
@@ -0,0 +1,24 @@
+testcases/kernel/io/disktest: Fix determinism issue
+
+The order of the objects linked into the test varies depending on the
+order of the files found on disk. This results in the disktest binary
+differing depending on that order.
+
+Sort the wildcard expansion of *.c which leads to reproducible binaries.
+
+Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
+Upstream-Status: Pending
+
+Index: git/testcases/kernel/io/disktest/Makefile
+===================================================================
+--- git.orig/testcases/kernel/io/disktest/Makefile
++++ git/testcases/kernel/io/disktest/Makefile
+@@ -209,7 +209,7 @@ LDLIBS             += -lpthread
+ MAKE_TARGETS  := disktest
+-OBJS          := $(patsubst $(abs_srcdir)/%.c,%.o,$(wildcard $(abs_srcdir)/*.c))
++OBJS          := $(patsubst $(abs_srcdir)/%.c,%.o,$(sort $(wildcard $(abs_srcdir)/*.c)))
+ disktest-$(VER):
+       mkdir -p "$@"
index 593f07087c4432df54cd28fb1ab6f1561c689448..325574a50e92a3f909856e6484132c09c615812d 100644 (file)
@@ -30,8 +30,8 @@ CFLAGS_append_mipsarchn64 = " -D__SANE_USERSPACE_TYPES__"
 SRCREV = "4d005621edd109d119627eb9210b224a63bf22cb"
 
 # remove at next version upgrade or when output changes
-PR = "r1"
-HASHEQUIV_HASH_VERSION .= ".1"
+PR = "r2"
+HASHEQUIV_HASH_VERSION .= ".2"
 
 SRC_URI = "git://github.com/linux-test-project/ltp.git \
            file://0001-build-Add-option-to-select-libc-implementation.patch \
@@ -39,6 +39,7 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git \
            file://0001-Add-more-musl-exclusions.patch \
            file://0001-Remove-OOM-tests-from-runtest-mm.patch \
            file://determinism.patch \
+           file://determinism2.patch \
            "
 
 S = "${WORKDIR}/git"