summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetr Vorel <petr.vorel@gmail.com>2021-05-25 23:59:10 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-05-27 13:21:38 +0100
commit2f97ec19e09e3ef099927681deaf7041a884a935 (patch)
treea05b26f5f5058426fb6d616427fcb7da43892aad
parent6aaaa066ce360da138bfd155b56585bdf814ebd1 (diff)
downloadpoky-2f97ec19e09e3ef099927681deaf7041a884a935.tar.gz
ltp: Update to 20210524
Remove patches accepted in this upstream release * determinism.patch (45530792a, 01fefa08c) * libswapon.patch (2b64c727f) * 0001-open_posix_testsuite-generate-makefiles.sh-Avoid-inc.patch (f38172209) * 0002-Makefile-Avoid-wildcard-determinism-issues.patch (edf60cf6a) * 0003-syscalls-swapon-swapoff-Move-common-library-to-libs.patch (ac140ed58) Removed (test rewritten to new API) * 0007-Fix-test_proc_kill-hanging.patch (From OE-Core rev: d36bd5a532d38c786b87ec15f0eec1d849487fa5) Signed-off-by: Petr Vorel <petr.vorel@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-extended/ltp/ltp/0001-open_posix_testsuite-generate-makefiles.sh-Avoid-inc.patch40
-rw-r--r--meta/recipes-extended/ltp/ltp/0002-Makefile-Avoid-wildcard-determinism-issues.patch310
-rw-r--r--meta/recipes-extended/ltp/ltp/0003-syscalls-swapon-swapoff-Move-common-library-to-libs.patch133
-rw-r--r--meta/recipes-extended/ltp/ltp/0007-Fix-test_proc_kill-hanging.patch32
-rw-r--r--meta/recipes-extended/ltp/ltp/determinism.patch43
-rw-r--r--meta/recipes-extended/ltp/ltp/libswapon.patch368
-rw-r--r--meta/recipes-extended/ltp/ltp_20210524.bb (renamed from meta/recipes-extended/ltp/ltp_20210121.bb)11
7 files changed, 1 insertions, 936 deletions
diff --git a/meta/recipes-extended/ltp/ltp/0001-open_posix_testsuite-generate-makefiles.sh-Avoid-inc.patch b/meta/recipes-extended/ltp/ltp/0001-open_posix_testsuite-generate-makefiles.sh-Avoid-inc.patch
deleted file mode 100644
index c2a70dcb67..0000000000
--- a/meta/recipes-extended/ltp/ltp/0001-open_posix_testsuite-generate-makefiles.sh-Avoid-inc.patch
+++ /dev/null
@@ -1,40 +0,0 @@
1From 2d1d6350af1db28ec520e26d0069a0518950b0a1 Mon Sep 17 00:00:00 2001
2From: Richard Purdie <richard.purdie@linuxfoundation.org>
3Date: Tue, 9 Mar 2021 15:21:11 +0000
4Subject: [PATCH 1/3] open_posix_testsuite/generate-makefiles.sh: Avoid
5 inconsistencies with make version
6
7With make 4.1, INSTALL_TARGETS+=<tab> will add a space to the variable whereas
8with make 4.3, it will not. This leads to differing run.sh files in installed
9in packages which is undesireable. If tests is empty we don't have to add
10the line to the makefiles at all which seems like the easiest way to
11avoid the differences in make behaviour.
12
13Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
14Upstream-Status: Submitted [http://lists.linux.it/pipermail/ltp/2021-March/021386.html]
15
16---
17 .../open_posix_testsuite/scripts/generate-makefiles.sh | 6 +++++-
18 1 file changed, 5 insertions(+), 1 deletion(-)
19
20diff --git a/testcases/open_posix_testsuite/scripts/generate-makefiles.sh b/testcases/open_posix_testsuite/scripts/generate-makefiles.sh
21index 200a631db..4b3aaa4a0 100755
22--- a/testcases/open_posix_testsuite/scripts/generate-makefiles.sh
23+++ b/testcases/open_posix_testsuite/scripts/generate-makefiles.sh
24@@ -148,8 +148,12 @@ EOF
25
26 fi
27
28- cat >> "$makefile.2" <<EOF
29+ if [ ! -z "${tests}" ]; then
30+ cat >> "$makefile.2" <<EOF
31 INSTALL_TARGETS+= ${tests}
32+EOF
33+ fi
34+ cat >> "$makefile.2" <<EOF
35 MAKE_TARGETS+= ${targets}
36
37 EOF
38--
392.27.0
40
diff --git a/meta/recipes-extended/ltp/ltp/0002-Makefile-Avoid-wildcard-determinism-issues.patch b/meta/recipes-extended/ltp/ltp/0002-Makefile-Avoid-wildcard-determinism-issues.patch
deleted file mode 100644
index 4859c3eaed..0000000000
--- a/meta/recipes-extended/ltp/ltp/0002-Makefile-Avoid-wildcard-determinism-issues.patch
+++ /dev/null
@@ -1,310 +0,0 @@
1From 4030e28f2c2296ba138cb5e2495202f8aec7ba32 Mon Sep 17 00:00:00 2001
2From: Richard Purdie <richard.purdie@linuxfoundation.org>
3Date: Tue, 9 Mar 2021 15:21:36 +0000
4Subject: [PATCH 2/3] Makefile: Avoid wildcard determinism issues
5
6wildcard used in Makefiles preserves the order of the files on disk
7which leads to differences in the order the binaries are linked.
8
9This patch tweaks the usage of wildcard to also have a sort, making
10the binaries reproducible. A previous patch massively improved
11the situation but wider testing showed that these other changes can
12have an effect on some binaries, this patch avoids those issues as
13exposed by our wider testing.
14
15Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
16Upstream-Status: Submitted [http://lists.linux.it/pipermail/ltp/2021-March/021388.html]
17
18---
19 include/mk/env_post.mk | 2 +-
20 include/mk/module.mk | 2 +-
21 runtest/Makefile | 2 +-
22 scenario_groups/Makefile | 2 +-
23 testcases/commands/ldd/datafiles/Makefile | 2 +-
24 testcases/kernel/hotplug/memory_hotplug/Makefile | 3 ++-
25 testcases/kernel/io/disktest/Makefile | 2 +-
26 testcases/kernel/io/disktest/Makefile.linux | 4 ++--
27 testcases/kernel/sched/hyperthreading/ht_affinity/Makefile | 2 +-
28 testcases/kernel/sched/hyperthreading/ht_enabled/Makefile | 2 +-
29 testcases/kernel/sched/sched_stress/Makefile | 2 +-
30 testcases/kernel/syscalls/lchown/Makefile | 2 +-
31 testcases/kernel/syscalls/migrate_pages/Makefile | 2 +-
32 testcases/kernel/syscalls/move_pages/Makefile | 2 +-
33 testcases/kernel/syscalls/utils/compat_16.mk | 2 +-
34 testcases/kernel/syscalls/utils/newer_64.mk | 2 +-
35 testcases/misc/math/float/Makefile | 2 +-
36 testcases/network/nfs/nfs_stress/nfs05_make_tree.c | 4 ++--
37 testcases/network/nfsv4/locks/Makefile | 2 +-
38 utils/sctp/func_tests/Makefile | 2 +-
39 20 files changed, 23 insertions(+), 22 deletions(-)
40
41diff --git a/include/mk/env_post.mk b/include/mk/env_post.mk
42index d52ad9f0b..1d22f9c53 100644
43--- a/include/mk/env_post.mk
44+++ b/include/mk/env_post.mk
45@@ -47,7 +47,7 @@ LDFLAGS += -L$(top_builddir)/lib/android_libpthread
46 LDFLAGS += -L$(top_builddir)/lib/android_librt
47 endif
48
49-MAKE_TARGETS ?= $(notdir $(patsubst %.c,%,$(wildcard $(abs_srcdir)/*.c)))
50+MAKE_TARGETS ?= $(notdir $(patsubst %.c,%,$(sort $(wildcard $(abs_srcdir)/*.c))))
51 MAKE_TARGETS := $(filter-out $(FILTER_OUT_MAKE_TARGETS),$(MAKE_TARGETS))
52
53 # with only *.dwo, .[0-9]+.dwo can not be cleaned
54diff --git a/include/mk/module.mk b/include/mk/module.mk
55index 95fb8336a..6c8814b96 100644
56--- a/include/mk/module.mk
57+++ b/include/mk/module.mk
58@@ -42,7 +42,7 @@ endif
59
60 ifneq ($(filter install clean,$(MAKECMDGOALS)),)
61 MAKE_TARGETS := $(filter-out %.ko, $(MAKE_TARGETS))
62-MAKE_TARGETS += $(wildcard *.ko)
63+MAKE_TARGETS += $(sort $(wildcard *.ko))
64 endif
65
66 CLEAN_TARGETS += .dep_modules *.mod built-in.a
67diff --git a/runtest/Makefile b/runtest/Makefile
68index b7caaee06..6a1565b6a 100644
69--- a/runtest/Makefile
70+++ b/runtest/Makefile
71@@ -36,7 +36,7 @@ ifneq ($(WITH_POWER_MANAGEMENT_TESTSUITE),yes)
72 UNWANTED_FILES += power_management_tests
73 endif
74
75-INSTALL_TARGETS := $(filter-out $(UNWANTED_FILES),$(notdir $(patsubst $(abs_srcdir)/%,%,$(wildcard $(abs_srcdir)/*))))
76+INSTALL_TARGETS := $(filter-out $(UNWANTED_FILES),$(notdir $(patsubst $(abs_srcdir)/%,%,$(sort $(wildcard $(abs_srcdir)/*)))))
77
78 MAKE_TARGETS :=
79
80diff --git a/scenario_groups/Makefile b/scenario_groups/Makefile
81index 2978675d9..fcbc92708 100644
82--- a/scenario_groups/Makefile
83+++ b/scenario_groups/Makefile
84@@ -31,7 +31,7 @@ UNWANTED_FILES := Makefile
85
86 INSTALL_MODE := 00644
87
88-INSTALL_TARGETS := $(filter-out $(UNWANTED_FILES),$(notdir $(patsubst $(abs_srcdir)/%,%,$(wildcard $(abs_srcdir)/*))))
89+INSTALL_TARGETS := $(filter-out $(UNWANTED_FILES),$(notdir $(patsubst $(abs_srcdir)/%,%,$(sort $(wildcard $(abs_srcdir)/*)))))
90
91 MAKE_TARGETS :=
92
93diff --git a/testcases/commands/ldd/datafiles/Makefile b/testcases/commands/ldd/datafiles/Makefile
94index d8bcf5c06..01c352052 100644
95--- a/testcases/commands/ldd/datafiles/Makefile
96+++ b/testcases/commands/ldd/datafiles/Makefile
97@@ -21,7 +21,7 @@ CPPFLAGS += -fpic
98
99 INSTALL_TARGETS := ldd*.so lddfile.out
100
101-LDD_C_FILES := $(wildcard $(abs_srcdir)/lddfile*.c)
102+LDD_C_FILES := $(sort $(wildcard $(abs_srcdir)/lddfile*.c))
103 LDD_SO_FILES := $(patsubst $(abs_srcdir)/%.c,%.obj.so,$(LDD_C_FILES))
104 MAKE_TARGETS := lddfile.out
105 CLEAN_TARGETS += *.obj $(LDD_SO_FILES)
106diff --git a/testcases/kernel/hotplug/memory_hotplug/Makefile b/testcases/kernel/hotplug/memory_hotplug/Makefile
107index d1ba65e65..38a77a2ba 100644
108--- a/testcases/kernel/hotplug/memory_hotplug/Makefile
109+++ b/testcases/kernel/hotplug/memory_hotplug/Makefile
110@@ -31,6 +31,7 @@ LDLIBS := $(filter-out -lltp,$(LDLIBS))
111
112 MAKE_TARGETS := memtoy
113
114-memtoy: $(patsubst $(abs_srcdir)/%.c,%.o,$(wildcard $(abs_srcdir)/*.c))
115+memtoy: $(patsubst $(abs_srcdir)/%.c,%.o,$(sort $(wildcard $(abs_srcdir)/*.c)))
116+
117
118 include $(top_srcdir)/include/mk/generic_leaf_target.mk
119diff --git a/testcases/kernel/io/disktest/Makefile b/testcases/kernel/io/disktest/Makefile
120index d10d98434..3a3a9cbf0 100644
121--- a/testcases/kernel/io/disktest/Makefile
122+++ b/testcases/kernel/io/disktest/Makefile
123@@ -209,7 +209,7 @@ LDLIBS += -lpthread
124
125 MAKE_TARGETS := disktest
126
127-OBJS := $(patsubst $(abs_srcdir)/%.c,%.o,$(wildcard $(abs_srcdir)/*.c))
128+OBJS := $(patsubst $(abs_srcdir)/%.c,%.o,$(sort $(wildcard $(abs_srcdir)/*.c)))
129
130 disktest-$(VER):
131 mkdir -p "$@"
132diff --git a/testcases/kernel/io/disktest/Makefile.linux b/testcases/kernel/io/disktest/Makefile.linux
133index ea45b5a57..0f3aab622 100644
134--- a/testcases/kernel/io/disktest/Makefile.linux
135+++ b/testcases/kernel/io/disktest/Makefile.linux
136@@ -167,8 +167,8 @@ mandir=/usr/share/man
137
138 VER=`grep VER_STR main.h | awk -F\" '{print $$2}'`
139 GBLHDRS=main.h globals.h defs.h
140-ALLHDRS=$(wildcard *.h)
141-SRCS=$(wildcard *.c)
142+ALLHDRS=$(sort $(wildcard *.h))
143+SRCS=$(sort $(wildcard *.c))
144 OBJS=$(SRCS:.c=.o)
145
146 CFLAGS += -g -Wall -O -D"LINUX" -D"_THREAD_SAFE" -D"_GNU_SOURCE" -D"_LARGE_FILES" -D"_LARGEFILE64_SOURCE" -D"_FILE_OFFSET_BITS=64" $(RPM_OPT_FLAGS)
147diff --git a/testcases/kernel/sched/hyperthreading/ht_affinity/Makefile b/testcases/kernel/sched/hyperthreading/ht_affinity/Makefile
148index 10fec96dc..6b64bd261 100644
149--- a/testcases/kernel/sched/hyperthreading/ht_affinity/Makefile
150+++ b/testcases/kernel/sched/hyperthreading/ht_affinity/Makefile
151@@ -28,6 +28,6 @@ INSTALL_TARGETS := smt_smp_affinity.sh
152
153 MAKE_TARGETS := ht_affinity
154
155-$(MAKE_TARGETS): $(patsubst $(abs_srcdir)/%.c,%.o,$(wildcard $(abs_srcdir)/*.c))
156+$(MAKE_TARGETS): $(patsubst $(abs_srcdir)/%.c,%.o,$(sort $(wildcard $(abs_srcdir)/*.c)))
157
158 include $(top_srcdir)/include/mk/generic_leaf_target.mk
159diff --git a/testcases/kernel/sched/hyperthreading/ht_enabled/Makefile b/testcases/kernel/sched/hyperthreading/ht_enabled/Makefile
160index 9c1e139d6..585ff1383 100644
161--- a/testcases/kernel/sched/hyperthreading/ht_enabled/Makefile
162+++ b/testcases/kernel/sched/hyperthreading/ht_enabled/Makefile
163@@ -28,6 +28,6 @@ INSTALL_TARGETS := smt_smp_enabled.sh
164
165 MAKE_TARGETS := ht_enabled
166
167-$(MAKE_TARGETS): $(patsubst $(abs_srcdir)/%.c,%.o,$(wildcard $(abs_srcdir)/*.c))
168+$(MAKE_TARGETS): $(patsubst $(abs_srcdir)/%.c,%.o,$(sort $(wildcard $(abs_srcdir)/*.c)))
169
170 include $(top_srcdir)/include/mk/generic_leaf_target.mk
171diff --git a/testcases/kernel/sched/sched_stress/Makefile b/testcases/kernel/sched/sched_stress/Makefile
172index b76126c73..4dbbf3477 100644
173--- a/testcases/kernel/sched/sched_stress/Makefile
174+++ b/testcases/kernel/sched/sched_stress/Makefile
175@@ -10,7 +10,7 @@ INSTALL_TARGETS := sched_stress.sh
176
177 LDLIBS += -lpthread
178
179-MAKE_TARGETS := $(filter-out sched,$(patsubst $(abs_srcdir)/%.c,%,$(wildcard $(abs_srcdir)/*.c)))
180+MAKE_TARGETS := $(filter-out sched,$(patsubst $(abs_srcdir)/%.c,%,$(sort $(wildcard $(abs_srcdir)/*.c))))
181
182 RM += -r
183
184diff --git a/testcases/kernel/syscalls/lchown/Makefile b/testcases/kernel/syscalls/lchown/Makefile
185index 13d39cb81..305fee281 100644
186--- a/testcases/kernel/syscalls/lchown/Makefile
187+++ b/testcases/kernel/syscalls/lchown/Makefile
188@@ -5,7 +5,7 @@ top_srcdir ?= ../../../..
189
190 include $(top_srcdir)/include/mk/testcases.mk
191
192-SRCS := $(wildcard $(abs_srcdir)/lchown*.c)
193+SRCS := $(sort $(wildcard $(abs_srcdir)/lchown*.c))
194
195 include $(abs_srcdir)/../utils/compat_16.mk
196
197diff --git a/testcases/kernel/syscalls/migrate_pages/Makefile b/testcases/kernel/syscalls/migrate_pages/Makefile
198index 46912b025..9cf3ce526 100644
199--- a/testcases/kernel/syscalls/migrate_pages/Makefile
200+++ b/testcases/kernel/syscalls/migrate_pages/Makefile
201@@ -5,7 +5,7 @@ top_srcdir ?= ../../../..
202
203 include $(top_srcdir)/include/mk/testcases.mk
204
205-MAKE_TARGETS := $(patsubst $(abs_srcdir)/%.c,%,$(wildcard $(abs_srcdir)/*[0-9].c))
206+MAKE_TARGETS := $(patsubst $(abs_srcdir)/%.c,%,$(sort $(wildcard $(abs_srcdir)/*[0-9].c)))
207 $(MAKE_TARGETS): %: migrate_pages_common.o
208
209 CPPFLAGS += -I$(abs_srcdir)/../utils/
210diff --git a/testcases/kernel/syscalls/move_pages/Makefile b/testcases/kernel/syscalls/move_pages/Makefile
211index cd7ff6349..4b22160ed 100644
212--- a/testcases/kernel/syscalls/move_pages/Makefile
213+++ b/testcases/kernel/syscalls/move_pages/Makefile
214@@ -7,7 +7,7 @@ include $(top_srcdir)/include/mk/testcases.mk
215
216 CPPFLAGS += -I$(abs_srcdir)/../utils
217
218-MAKE_TARGETS := $(patsubst $(abs_srcdir)/%.c,%,$(wildcard $(abs_srcdir)/*[0-9].c))
219+MAKE_TARGETS := $(patsubst $(abs_srcdir)/%.c,%,$(sort $(wildcard $(abs_srcdir)/*[0-9].c)))
220
221 $(MAKE_TARGETS): %: move_pages_support.o
222
223diff --git a/testcases/kernel/syscalls/utils/compat_16.mk b/testcases/kernel/syscalls/utils/compat_16.mk
224index a0ff8f558..e81a00c40 100644
225--- a/testcases/kernel/syscalls/utils/compat_16.mk
226+++ b/testcases/kernel/syscalls/utils/compat_16.mk
227@@ -50,7 +50,7 @@
228
229 CPPFLAGS += -I$(abs_srcdir) -I$(abs_srcdir)/../utils
230
231-SRCS ?= $(wildcard $(abs_srcdir)/*.c)
232+SRCS ?= $(sort $(wildcard $(abs_srcdir)/*.c))
233
234 MAKE_TARGETS := $(notdir $(patsubst %.c,%,$(SRCS)))
235 MAKE_TARGETS_OBJS_WO_COMPAT_16 := $(addsuffix .o,$(MAKE_TARGETS))
236diff --git a/testcases/kernel/syscalls/utils/newer_64.mk b/testcases/kernel/syscalls/utils/newer_64.mk
237index 8cd7e03c8..5e798057a 100644
238--- a/testcases/kernel/syscalls/utils/newer_64.mk
239+++ b/testcases/kernel/syscalls/utils/newer_64.mk
240@@ -25,7 +25,7 @@
241
242 CPPFLAGS += -I$(abs_srcdir) -I$(abs_srcdir)/../utils
243
244-SRCS ?= $(wildcard $(abs_srcdir)/*.c)
245+SRCS ?= $(sort $(wildcard $(abs_srcdir)/*.c))
246
247 MAKE_TARGETS := $(notdir $(patsubst %.c,%,$(SRCS)))
248
249diff --git a/testcases/misc/math/float/Makefile b/testcases/misc/math/float/Makefile
250index 79dda35d6..5f4cb0f6c 100644
251--- a/testcases/misc/math/float/Makefile
252+++ b/testcases/misc/math/float/Makefile
253@@ -27,6 +27,6 @@ include $(top_srcdir)/include/mk/testcases.mk
254 LDLIBS += -lpthread -lm
255
256 # main.c doesn't compile...
257-MAKE_TARGETS := $(patsubst $(abs_srcdir)/%.c,%,$(wildcard $(abs_srcdir)/float*.c))
258+MAKE_TARGETS := $(patsubst $(abs_srcdir)/%.c,%,$(sort $(wildcard $(abs_srcdir)/float*.c)))
259
260 include $(top_srcdir)/include/mk/generic_trunk_target.mk
261diff --git a/testcases/network/nfs/nfs_stress/nfs05_make_tree.c b/testcases/network/nfs/nfs_stress/nfs05_make_tree.c
262index 12c86799d..23c520d9d 100644
263--- a/testcases/network/nfs/nfs_stress/nfs05_make_tree.c
264+++ b/testcases/network/nfs/nfs_stress/nfs05_make_tree.c
265@@ -104,7 +104,7 @@ static void *thread_fn(LTP_ATTRIBUTE_UNUSED void *args)
266 "\treturn 0;\n}\n";
267
268 const char make_buf_n[] = "CFLAGS := -O -w -g\n"
269- "SRCS=$(wildcard *.c)\n"
270+ "SRCS=$(sort $(wildcard *.c))\n"
271 "TARGETS=$(SRCS:.c=)\n"
272 "all: $(TARGETS)\n"
273 "$(TARGETS): %: %.c\n"
274@@ -114,7 +114,7 @@ static void *thread_fn(LTP_ATTRIBUTE_UNUSED void *args)
275
276 const char make_buf[] = "CFLAGS := -O -w -g\n"
277 "SUBDIR = dir\n"
278- "SRCS=$(wildcard *.c)\n"
279+ "SRCS=$(sort $(wildcard *.c))\n"
280 "TARGETS=$(SRCS:.c=)\n"
281 "all: $(SUBDIR) $(TARGETS)\n"
282 "$(TARGETS): %: %.c\n"
283diff --git a/testcases/network/nfsv4/locks/Makefile b/testcases/network/nfsv4/locks/Makefile
284index 5812dea3a..05941c892 100644
285--- a/testcases/network/nfsv4/locks/Makefile
286+++ b/testcases/network/nfsv4/locks/Makefile
287@@ -28,6 +28,6 @@ MAKE_TARGETS := locktests
288
289 LDLIBS += -lpthread
290
291-$(MAKE_TARGETS): $(patsubst $(abs_srcdir)/%.c,%.o,$(wildcard $(abs_srcdir)/*.c))
292+$(MAKE_TARGETS): $(patsubst $(abs_srcdir)/%.c,%.o,$(sort $(wildcard $(abs_srcdir)/*.c)))
293
294 include $(top_srcdir)/include/mk/generic_leaf_target.mk
295diff --git a/utils/sctp/func_tests/Makefile b/utils/sctp/func_tests/Makefile
296index d296c652a..a17107853 100644
297--- a/utils/sctp/func_tests/Makefile
298+++ b/utils/sctp/func_tests/Makefile
299@@ -30,7 +30,7 @@ LDFLAGS += $(addprefix -L$(abs_builddir)/../,lib testlib)
300
301 LDLIBS += -lsctputil -lsctp -lpthread
302
303-V4_TARGETS := $(patsubst $(abs_srcdir)/%.c,%,$(wildcard $(abs_srcdir)/*.c))
304+V4_TARGETS := $(patsubst $(abs_srcdir)/%.c,%,$(sort $(wildcard $(abs_srcdir)/*.c)))
305
306 V6_TARGETS := test_basic_v6 test_fragments_v6 test_getname_v6 \
307 test_inaddr_any_v6 test_peeloff_v6 \
308--
3092.27.0
310
diff --git a/meta/recipes-extended/ltp/ltp/0003-syscalls-swapon-swapoff-Move-common-library-to-libs.patch b/meta/recipes-extended/ltp/ltp/0003-syscalls-swapon-swapoff-Move-common-library-to-libs.patch
deleted file mode 100644
index 5ace82dba5..0000000000
--- a/meta/recipes-extended/ltp/ltp/0003-syscalls-swapon-swapoff-Move-common-library-to-libs.patch
+++ /dev/null
@@ -1,133 +0,0 @@
1From 0653f1d809d0cc13f84facb9d2d82d984ac4d0ac Mon Sep 17 00:00:00 2001
2From: Richard Purdie <richard.purdie@linuxfoundation.org>
3Date: Tue, 9 Mar 2021 15:25:16 +0000
4Subject: [PATCH 3/3] syscalls/swapon/swapoff: Move common library to libs/
5
6There is a race/determinism issue with libswapon currently as depending on
7which makefile path builds it, the debug paths may be "../swapon/libswapon.c"
8or "libswapon.c". To avoid the determinism issue, move libswapon to libs/
9and use it from the shared location.
10
11The header is moved to the common includes directory to match and
12the Makefile.inc fragment can be dropped.
13
14Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
15Upstream-Status: Submitted [http://lists.linux.it/pipermail/ltp/2021-March/021387.html]
16
17---
18 .../kernel/syscalls/swapon => include}/libswapon.h | 0
19 libs/libltpswapon/Makefile | 12 ++++++++++++
20 .../swapon => libs/libltpswapon}/libswapon.c | 0
21 testcases/kernel/syscalls/swapoff/Makefile | 7 +++++--
22 testcases/kernel/syscalls/swapoff/Makefile.inc | 6 ------
23 testcases/kernel/syscalls/swapoff/swapoff01.c | 2 +-
24 testcases/kernel/syscalls/swapoff/swapoff02.c | 2 +-
25 testcases/kernel/syscalls/swapon/Makefile | 6 +++---
26 8 files changed, 22 insertions(+), 13 deletions(-)
27 rename {testcases/kernel/syscalls/swapon => include}/libswapon.h (100%)
28 create mode 100644 libs/libltpswapon/Makefile
29 rename {testcases/kernel/syscalls/swapon => libs/libltpswapon}/libswapon.c (100%)
30 delete mode 100644 testcases/kernel/syscalls/swapoff/Makefile.inc
31
32diff --git a/testcases/kernel/syscalls/swapon/libswapon.h b/include/libswapon.h
33similarity index 100%
34rename from testcases/kernel/syscalls/swapon/libswapon.h
35rename to include/libswapon.h
36diff --git a/libs/libltpswapon/Makefile b/libs/libltpswapon/Makefile
37new file mode 100644
38index 000000000..8f738338b
39--- /dev/null
40+++ b/libs/libltpswapon/Makefile
41@@ -0,0 +1,12 @@
42+# SPDX-License-Identifier: GPL-2.0-or-later
43+#
44+# Copyright (C) Richard Purdie <richard.purdie@linuxfoundation.org>
45+
46+top_srcdir ?= ../..
47+
48+include $(top_srcdir)/include/mk/env_pre.mk
49+
50+INTERNAL_LIB := libltpswapon.a
51+
52+include $(top_srcdir)/include/mk/lib.mk
53+include $(top_srcdir)/include/mk/generic_leaf_target.mk
54diff --git a/testcases/kernel/syscalls/swapon/libswapon.c b/libs/libltpswapon/libswapon.c
55similarity index 100%
56rename from testcases/kernel/syscalls/swapon/libswapon.c
57rename to libs/libltpswapon/libswapon.c
58diff --git a/testcases/kernel/syscalls/swapoff/Makefile b/testcases/kernel/syscalls/swapoff/Makefile
59index fbfbe0441..a74374605 100644
60--- a/testcases/kernel/syscalls/swapoff/Makefile
61+++ b/testcases/kernel/syscalls/swapoff/Makefile
62@@ -3,7 +3,10 @@
63
64 top_srcdir ?= ../../../..
65
66+LTPLIBS = ltpswapon
67+
68 include $(top_srcdir)/include/mk/testcases.mk
69-include $(abs_srcdir)/./Makefile.inc
70+
71+LTPLDLIBS = -lltpswapon
72+
73 include $(top_srcdir)/include/mk/generic_leaf_target.mk
74-$(MAKE_TARGETS): %: ../swapon/libswapon.o
75diff --git a/testcases/kernel/syscalls/swapoff/Makefile.inc b/testcases/kernel/syscalls/swapoff/Makefile.inc
76deleted file mode 100644
77index 65350cbeb..000000000
78--- a/testcases/kernel/syscalls/swapoff/Makefile.inc
79+++ /dev/null
80@@ -1,6 +0,0 @@
81-LIBDIR += ../swapon/
82-LIBSWAPON := $(LIBDIR)/libswapon.o
83-$(LIBSWAPON):
84- $(MAKE) -C $(LIBDIR)
85-CPPFLAGS += -I$(abs_srcdir)/$(LIBDIR)
86-LDFLAGS += -L$(abs_builddir)/$(LIBDIR)
87diff --git a/testcases/kernel/syscalls/swapoff/swapoff01.c b/testcases/kernel/syscalls/swapoff/swapoff01.c
88index e115269c0..87a217a89 100644
89--- a/testcases/kernel/syscalls/swapoff/swapoff01.c
90+++ b/testcases/kernel/syscalls/swapoff/swapoff01.c
91@@ -25,7 +25,7 @@
92 #include <stdlib.h>
93 #include "config.h"
94 #include "lapi/syscalls.h"
95-#include "../swapon/libswapon.h"
96+#include "libswapon.h"
97
98 static void setup(void);
99 static void cleanup(void);
100diff --git a/testcases/kernel/syscalls/swapoff/swapoff02.c b/testcases/kernel/syscalls/swapoff/swapoff02.c
101index 8954f975f..60cd66c26 100644
102--- a/testcases/kernel/syscalls/swapoff/swapoff02.c
103+++ b/testcases/kernel/syscalls/swapoff/swapoff02.c
104@@ -33,7 +33,7 @@
105 #include "test.h"
106 #include "lapi/syscalls.h"
107 #include "safe_macros.h"
108-#include "../swapon/libswapon.h"
109+#include "libswapon.h"
110
111 static void setup(void);
112 static void cleanup(void);
113diff --git a/testcases/kernel/syscalls/swapon/Makefile b/testcases/kernel/syscalls/swapon/Makefile
114index 97113a447..57ec45d48 100644
115--- a/testcases/kernel/syscalls/swapon/Makefile
116+++ b/testcases/kernel/syscalls/swapon/Makefile
117@@ -8,10 +8,10 @@ endif
118
119 top_srcdir ?= ../../../..
120
121+LTPLIBS = ltpswapon
122+
123 include $(top_srcdir)/include/mk/testcases.mk
124
125-FILTER_OUT_MAKE_TARGETS := libswapon
126+LTPLDLIBS = -lltpswapon
127
128 include $(top_srcdir)/include/mk/generic_leaf_target.mk
129-
130-$(MAKE_TARGETS): %: libswapon.o
131--
1322.27.0
133
diff --git a/meta/recipes-extended/ltp/ltp/0007-Fix-test_proc_kill-hanging.patch b/meta/recipes-extended/ltp/ltp/0007-Fix-test_proc_kill-hanging.patch
deleted file mode 100644
index 0e7264574f..0000000000
--- a/meta/recipes-extended/ltp/ltp/0007-Fix-test_proc_kill-hanging.patch
+++ /dev/null
@@ -1,32 +0,0 @@
1From f4fafbdffae3a63c81f65cef98c72dda26283e06 Mon Sep 17 00:00:00 2001
2From: Dengke Du <dengke.du@windriver.com>
3Date: Wed, 8 Feb 2017 16:17:17 +0800
4Subject: [PATCH] Fix test_proc_kill hanging
5
6Sometimes the signal is delivered to memcg_process before the framework took
7into consideration its pid entered in the tasks. Fixed by delaying the signal
8send command.
9
10Upstream-Status: Pending
11
12Signed-off-by: George Nita <george.nita@enea.com>
13Signed-off-by: Dengke Du <dengke.du@windriver.com>
14---
15 testcases/kernel/controllers/memcg/functional/memcg_lib.sh | 1 +
16 1 file changed, 1 insertion(+)
17
18diff --git a/testcases/kernel/controllers/memcg/functional/memcg_lib.sh b/testcases/kernel/controllers/memcg/functional/memcg_lib.sh
19index aadaae4..deea5d6 100755
20--- a/testcases/kernel/controllers/memcg/functional/memcg_lib.sh
21+++ b/testcases/kernel/controllers/memcg/functional/memcg_lib.sh
22@@ -291,6 +291,7 @@ test_proc_kill()
23 pid=$!
24 TST_CHECKPOINT_WAIT 0
25 echo $pid > tasks
26+ sleep 1
27
28 signal_memcg_process $pid $3
29
30--
312.7.4
32
diff --git a/meta/recipes-extended/ltp/ltp/determinism.patch b/meta/recipes-extended/ltp/ltp/determinism.patch
deleted file mode 100644
index 76d40721b8..0000000000
--- a/meta/recipes-extended/ltp/ltp/determinism.patch
+++ /dev/null
@@ -1,43 +0,0 @@
1open_posix_testsuite/generate-makefiles.sh: Fix determinism issue
2
3Currently the list of tests is generated by the order of the files found
4within the directories. This results in differences in the run.sh and
5Makefiles. Within Yocto Project this results in differing target
6test packages. The fix is simple, just sort the output from locate-test.
7
8mk/lib.mk: Sort wildcard expansion for determinism
9
10The order of the objects linked into libltp.a varies depending on the
11order of the files found on disk. This results in most ltp binaries
12differing depending on that order too.
13
14Sort the wildcard expansion of *.c which leads to reproducible binaries.
15
16Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17Upstream-Status: Submitted [http://lists.linux.it/pipermail/ltp/2021-March/021272.html http://lists.linux.it/pipermail/ltp/2021-March/021273.html]
18
19Index: git/testcases/open_posix_testsuite/scripts/generate-makefiles.sh
20===================================================================
21--- git.orig/testcases/open_posix_testsuite/scripts/generate-makefiles.sh
22+++ git/testcases/open_posix_testsuite/scripts/generate-makefiles.sh
23@@ -24,7 +24,7 @@ generate_locate_test_makefile() {
24
25 echo "Generating $maketype Makefiles"
26
27- locate-test --$maketype | sed -e 's,^./,,g' > make-gen.$maketype
28+ locate-test --$maketype | sed -e 's,^./,,g' | sort > make-gen.$maketype
29
30 generate_makefiles make-gen.$maketype $*
31
32Index: git/include/mk/lib.mk
33===================================================================
34--- git.orig/include/mk/lib.mk
35+++ git/include/mk/lib.mk
36@@ -50,6 +50,7 @@ endif
37 MAKE_TARGETS += $(LIB)
38
39 LIBSRCS ?= $(wildcard $(abs_srcdir)/*.c)
40+LIBSRCS := $(sort $(LIBSRCS))
41 LIBSRCS := $(abspath $(LIBSRCS))
42 LIBSRCS := $(subst $(abs_srcdir)/,,$(wildcard $(LIBSRCS)))
43 LIBSRCS := $(filter-out $(FILTER_OUT_LIBSRCS),$(LIBSRCS))
diff --git a/meta/recipes-extended/ltp/ltp/libswapon.patch b/meta/recipes-extended/ltp/ltp/libswapon.patch
deleted file mode 100644
index 07b0dcefcf..0000000000
--- a/meta/recipes-extended/ltp/ltp/libswapon.patch
+++ /dev/null
@@ -1,368 +0,0 @@
1Index: git/libs/libltpswapon/Makefile
2===================================================================
3--- /dev/null
4+++ git/libs/libltpswapon/Makefile
5@@ -0,0 +1,12 @@
6+# SPDX-License-Identifier: GPL-2.0-or-later
7+#
8+# Copyright (C) Richard Purdie <richard.purdie@linuxfoundation.org>
9+
10+top_srcdir ?= ../..
11+
12+include $(top_srcdir)/include/mk/env_pre.mk
13+
14+INTERNAL_LIB := libltpswapon.a
15+
16+include $(top_srcdir)/include/mk/lib.mk
17+include $(top_srcdir)/include/mk/generic_leaf_target.mk
18Index: git/libs/libltpswapon/libswapon.c
19===================================================================
20--- /dev/null
21+++ git/libs/libltpswapon/libswapon.c
22@@ -0,0 +1,90 @@
23+/*
24+ * Copyright (c) 2013 Oracle and/or its affiliates. All Rights Reserved.
25+ *
26+ * This program is free software; you can redistribute it and/or
27+ * modify it under the terms of the GNU General Public License as
28+ * published by the Free Software Foundation; either version 2 of
29+ * the License, or (at your option) any later version.
30+ *
31+ * This program is distributed in the hope that it would be useful,
32+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
33+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
34+ * GNU General Public License for more details.
35+ *
36+ * You should have received a copy of the GNU General Public License
37+ * along with this program; if not, write the Free Software Foundation,
38+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
39+ *
40+ * Author: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
41+ *
42+ */
43+
44+#include <errno.h>
45+#include "lapi/syscalls.h"
46+#include "test.h"
47+#include "libswapon.h"
48+
49+/*
50+ * Make a swap file
51+ */
52+int make_swapfile(void (cleanup)(void), const char *swapfile, int safe)
53+{
54+ if (!tst_fs_has_free(NULL, ".", sysconf(_SC_PAGESIZE) * 10,
55+ TST_BYTES)) {
56+ tst_brkm(TBROK, cleanup,
57+ "Insufficient disk space to create swap file");
58+ }
59+
60+ /* create file */
61+ if (tst_fill_file(swapfile, 0,
62+ sysconf(_SC_PAGESIZE), 10) != 0) {
63+ tst_brkm(TBROK, cleanup, "Failed to create swapfile");
64+ }
65+
66+ /* make the file swapfile */
67+ const char *argv[2 + 1];
68+ argv[0] = "mkswap";
69+ argv[1] = swapfile;
70+ argv[2] = NULL;
71+
72+ return tst_cmd(cleanup, argv, "/dev/null", "/dev/null", safe);
73+}
74+
75+/*
76+ * Check swapon/swapoff support status of filesystems or files
77+ * we are testing on.
78+ */
79+void is_swap_supported(void (cleanup)(void), const char *filename)
80+{
81+ int fibmap = tst_fibmap(filename);
82+ long fs_type = tst_fs_type(cleanup, filename);
83+ const char *fstype = tst_fs_type_name(fs_type);
84+
85+ int ret = make_swapfile(NULL, filename, 1);
86+ if (ret != 0) {
87+ if (fibmap == 1) {
88+ tst_brkm(TCONF, cleanup,
89+ "mkswap on %s not supported", fstype);
90+ } else {
91+ tst_brkm(TFAIL, cleanup,
92+ "mkswap on %s failed", fstype);
93+ }
94+ }
95+
96+ TEST(ltp_syscall(__NR_swapon, filename, 0));
97+ if (TEST_RETURN == -1) {
98+ if (fibmap == 1 && errno == EINVAL) {
99+ tst_brkm(TCONF, cleanup,
100+ "Swapfile on %s not implemented", fstype);
101+ } else {
102+ tst_brkm(TFAIL | TERRNO, cleanup,
103+ "swapon on %s failed", fstype);
104+ }
105+ }
106+
107+ TEST(ltp_syscall(__NR_swapoff, filename, 0));
108+ if (TEST_RETURN == -1) {
109+ tst_brkm(TFAIL | TERRNO, cleanup,
110+ "swapoff on %s failed", fstype);
111+ }
112+}
113Index: git/testcases/kernel/syscalls/swapoff/Makefile
114===================================================================
115--- git.orig/testcases/kernel/syscalls/swapoff/Makefile
116+++ git/testcases/kernel/syscalls/swapoff/Makefile
117@@ -3,7 +3,11 @@
118
119 top_srcdir ?= ../../../..
120
121+LTPLIBS = ltpswapon
122+
123 include $(top_srcdir)/include/mk/testcases.mk
124-include $(abs_srcdir)/./Makefile.inc
125+
126+LTPLDLIBS = -lltpswapon
127+
128 include $(top_srcdir)/include/mk/generic_leaf_target.mk
129-$(MAKE_TARGETS): %: ../swapon/libswapon.o
130+
131Index: git/testcases/kernel/syscalls/swapoff/Makefile.inc
132===================================================================
133--- git.orig/testcases/kernel/syscalls/swapoff/Makefile.inc
134+++ /dev/null
135@@ -1,6 +0,0 @@
136-LIBDIR += ../swapon/
137-LIBSWAPON := $(LIBDIR)/libswapon.o
138-$(LIBSWAPON):
139- $(MAKE) -C $(LIBDIR)
140-CPPFLAGS += -I$(abs_srcdir)/$(LIBDIR)
141-LDFLAGS += -L$(abs_builddir)/$(LIBDIR)
142Index: git/testcases/kernel/syscalls/swapon/Makefile
143===================================================================
144--- git.orig/testcases/kernel/syscalls/swapon/Makefile
145+++ git/testcases/kernel/syscalls/swapon/Makefile
146@@ -8,10 +8,10 @@ endif
147
148 top_srcdir ?= ../../../..
149
150+LTPLIBS = ltpswapon
151+
152 include $(top_srcdir)/include/mk/testcases.mk
153
154-FILTER_OUT_MAKE_TARGETS := libswapon
155+LTPLDLIBS = -lltpswapon
156
157 include $(top_srcdir)/include/mk/generic_leaf_target.mk
158-
159-$(MAKE_TARGETS): %: libswapon.o
160Index: git/testcases/kernel/syscalls/swapon/libswapon.c
161===================================================================
162--- git.orig/testcases/kernel/syscalls/swapon/libswapon.c
163+++ /dev/null
164@@ -1,90 +0,0 @@
165-/*
166- * Copyright (c) 2013 Oracle and/or its affiliates. All Rights Reserved.
167- *
168- * This program is free software; you can redistribute it and/or
169- * modify it under the terms of the GNU General Public License as
170- * published by the Free Software Foundation; either version 2 of
171- * the License, or (at your option) any later version.
172- *
173- * This program is distributed in the hope that it would be useful,
174- * but WITHOUT ANY WARRANTY; without even the implied warranty of
175- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
176- * GNU General Public License for more details.
177- *
178- * You should have received a copy of the GNU General Public License
179- * along with this program; if not, write the Free Software Foundation,
180- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
181- *
182- * Author: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
183- *
184- */
185-
186-#include <errno.h>
187-#include "lapi/syscalls.h"
188-#include "test.h"
189-#include "libswapon.h"
190-
191-/*
192- * Make a swap file
193- */
194-int make_swapfile(void (cleanup)(void), const char *swapfile, int safe)
195-{
196- if (!tst_fs_has_free(NULL, ".", sysconf(_SC_PAGESIZE) * 10,
197- TST_BYTES)) {
198- tst_brkm(TBROK, cleanup,
199- "Insufficient disk space to create swap file");
200- }
201-
202- /* create file */
203- if (tst_fill_file(swapfile, 0,
204- sysconf(_SC_PAGESIZE), 10) != 0) {
205- tst_brkm(TBROK, cleanup, "Failed to create swapfile");
206- }
207-
208- /* make the file swapfile */
209- const char *argv[2 + 1];
210- argv[0] = "mkswap";
211- argv[1] = swapfile;
212- argv[2] = NULL;
213-
214- return tst_cmd(cleanup, argv, "/dev/null", "/dev/null", safe);
215-}
216-
217-/*
218- * Check swapon/swapoff support status of filesystems or files
219- * we are testing on.
220- */
221-void is_swap_supported(void (cleanup)(void), const char *filename)
222-{
223- int fibmap = tst_fibmap(filename);
224- long fs_type = tst_fs_type(cleanup, filename);
225- const char *fstype = tst_fs_type_name(fs_type);
226-
227- int ret = make_swapfile(NULL, filename, 1);
228- if (ret != 0) {
229- if (fibmap == 1) {
230- tst_brkm(TCONF, cleanup,
231- "mkswap on %s not supported", fstype);
232- } else {
233- tst_brkm(TFAIL, cleanup,
234- "mkswap on %s failed", fstype);
235- }
236- }
237-
238- TEST(ltp_syscall(__NR_swapon, filename, 0));
239- if (TEST_RETURN == -1) {
240- if (fibmap == 1 && errno == EINVAL) {
241- tst_brkm(TCONF, cleanup,
242- "Swapfile on %s not implemented", fstype);
243- } else {
244- tst_brkm(TFAIL | TERRNO, cleanup,
245- "swapon on %s failed", fstype);
246- }
247- }
248-
249- TEST(ltp_syscall(__NR_swapoff, filename, 0));
250- if (TEST_RETURN == -1) {
251- tst_brkm(TFAIL | TERRNO, cleanup,
252- "swapoff on %s failed", fstype);
253- }
254-}
255Index: git/testcases/kernel/syscalls/swapon/libswapon.h
256===================================================================
257--- git.orig/testcases/kernel/syscalls/swapon/libswapon.h
258+++ /dev/null
259@@ -1,39 +0,0 @@
260-/*
261- * Copyright (c) 2013 Oracle and/or its affiliates. All Rights Reserved.
262- *
263- * This program is free software; you can redistribute it and/or
264- * modify it under the terms of the GNU General Public License as
265- * published by the Free Software Foundation; either version 2 of
266- * the License, or (at your option) any later version.
267- *
268- * This program is distributed in the hope that it would be useful,
269- * but WITHOUT ANY WARRANTY; without even the implied warranty of
270- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
271- * GNU General Public License for more details.
272- *
273- * You should have received a copy of the GNU General Public License
274- * along with this program; if not, write the Free Software Foundation,
275- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
276- *
277- * Author: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
278- *
279- */
280-
281-/*
282- * Contains common content for all swapon tests
283- */
284-
285-#ifndef __LIBSWAPON_H__
286-#define __LIBSWAPON_H__
287-
288-/*
289- * Make a swap file
290- */
291-int make_swapfile(void (cleanup)(void), const char *swapfile, int safe);
292-
293-/*
294- * Check swapon/swapoff support status of filesystems or files
295- * we are testing on.
296- */
297-void is_swap_supported(void (cleanup)(void), const char *filename);
298-#endif /* __LIBSWAPON_H__ */
299Index: git/testcases/kernel/syscalls/swapoff/swapoff01.c
300===================================================================
301--- git.orig/testcases/kernel/syscalls/swapoff/swapoff01.c
302+++ git/testcases/kernel/syscalls/swapoff/swapoff01.c
303@@ -25,7 +25,7 @@
304 #include <stdlib.h>
305 #include "config.h"
306 #include "lapi/syscalls.h"
307-#include "../swapon/libswapon.h"
308+#include "libswapon.h"
309
310 static void setup(void);
311 static void cleanup(void);
312Index: git/testcases/kernel/syscalls/swapoff/swapoff02.c
313===================================================================
314--- git.orig/testcases/kernel/syscalls/swapoff/swapoff02.c
315+++ git/testcases/kernel/syscalls/swapoff/swapoff02.c
316@@ -33,7 +33,7 @@
317 #include "test.h"
318 #include "lapi/syscalls.h"
319 #include "safe_macros.h"
320-#include "../swapon/libswapon.h"
321+#include "libswapon.h"
322
323 static void setup(void);
324 static void cleanup(void);
325Index: git/include/libswapon.h
326===================================================================
327--- /dev/null
328+++ git/include/libswapon.h
329@@ -0,0 +1,39 @@
330+/*
331+ * Copyright (c) 2013 Oracle and/or its affiliates. All Rights Reserved.
332+ *
333+ * This program is free software; you can redistribute it and/or
334+ * modify it under the terms of the GNU General Public License as
335+ * published by the Free Software Foundation; either version 2 of
336+ * the License, or (at your option) any later version.
337+ *
338+ * This program is distributed in the hope that it would be useful,
339+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
340+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
341+ * GNU General Public License for more details.
342+ *
343+ * You should have received a copy of the GNU General Public License
344+ * along with this program; if not, write the Free Software Foundation,
345+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
346+ *
347+ * Author: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
348+ *
349+ */
350+
351+/*
352+ * Contains common content for all swapon tests
353+ */
354+
355+#ifndef __LIBSWAPON_H__
356+#define __LIBSWAPON_H__
357+
358+/*
359+ * Make a swap file
360+ */
361+int make_swapfile(void (cleanup)(void), const char *swapfile, int safe);
362+
363+/*
364+ * Check swapon/swapoff support status of filesystems or files
365+ * we are testing on.
366+ */
367+void is_swap_supported(void (cleanup)(void), const char *filename);
368+#endif /* __LIBSWAPON_H__ */
diff --git a/meta/recipes-extended/ltp/ltp_20210121.bb b/meta/recipes-extended/ltp/ltp_20210524.bb
index e1ffd0ddf4..4328b1efee 100644
--- a/meta/recipes-extended/ltp/ltp_20210121.bb
+++ b/meta/recipes-extended/ltp/ltp_20210524.bb
@@ -27,19 +27,10 @@ CFLAGS_append_x86-64 = " -fomit-frame-pointer"
27 27
28CFLAGS_append_powerpc64 = " -D__SANE_USERSPACE_TYPES__" 28CFLAGS_append_powerpc64 = " -D__SANE_USERSPACE_TYPES__"
29CFLAGS_append_mipsarchn64 = " -D__SANE_USERSPACE_TYPES__" 29CFLAGS_append_mipsarchn64 = " -D__SANE_USERSPACE_TYPES__"
30SRCREV = "4d005621edd109d119627eb9210b224a63bf22cb" 30SRCREV = "0fb171f2beddaf64bd27597577c206c0f892b3cd"
31
32# remove at next version upgrade or when output changes
33PR = "r4"
34HASHEQUIV_HASH_VERSION .= ".4"
35 31
36SRC_URI = "git://github.com/linux-test-project/ltp.git \ 32SRC_URI = "git://github.com/linux-test-project/ltp.git \
37 file://0007-Fix-test_proc_kill-hanging.patch \
38 file://0001-Remove-OOM-tests-from-runtest-mm.patch \ 33 file://0001-Remove-OOM-tests-from-runtest-mm.patch \
39 file://determinism.patch \
40 file://0001-open_posix_testsuite-generate-makefiles.sh-Avoid-inc.patch \
41 file://0002-Makefile-Avoid-wildcard-determinism-issues.patch \
42 file://0003-syscalls-swapon-swapoff-Move-common-library-to-libs.patch \
43 file://disable_hanging_tests.patch \ 34 file://disable_hanging_tests.patch \
44 " 35 "
45 36