summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/ltp/ltp/determinism2.patch
blob: ab08e8e517276d04527ce7944896f0f89b9416a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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 "$@"