All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ltp: Fix another determinism issue
@ 2021-03-06 22:34 Richard Purdie
  0 siblings, 0 replies; only message in thread
From: Richard Purdie @ 2021-03-06 22:34 UTC (permalink / raw)
  To: openembedded-core

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>
---
 .../ltp/ltp/determinism2.patch                | 24 +++++++++++++++++++
 meta/recipes-extended/ltp/ltp_20210121.bb     |  5 ++--
 2 files changed, 27 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-extended/ltp/ltp/determinism2.patch

diff --git a/meta/recipes-extended/ltp/ltp/determinism2.patch b/meta/recipes-extended/ltp/ltp/determinism2.patch
new file mode 100644
index 00000000000..ab08e8e5172
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/determinism2.patch
@@ -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 "$@"
diff --git a/meta/recipes-extended/ltp/ltp_20210121.bb b/meta/recipes-extended/ltp/ltp_20210121.bb
index 593f07087c4..325574a50e9 100644
--- a/meta/recipes-extended/ltp/ltp_20210121.bb
+++ b/meta/recipes-extended/ltp/ltp_20210121.bb
@@ -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"
-- 
2.27.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-03-06 22:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-06 22:34 [PATCH] ltp: Fix another determinism issue Richard Purdie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.