From 2f97ec19e09e3ef099927681deaf7041a884a935 Mon Sep 17 00:00:00 2001 From: Petr Vorel Date: Tue, 25 May 2021 23:59:10 +0200 Subject: 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 Signed-off-by: Richard Purdie --- ...testsuite-generate-makefiles.sh-Avoid-inc.patch | 40 --- ...akefile-Avoid-wildcard-determinism-issues.patch | 310 ----------------- ...wapon-swapoff-Move-common-library-to-libs.patch | 133 -------- .../ltp/ltp/0007-Fix-test_proc_kill-hanging.patch | 32 -- meta/recipes-extended/ltp/ltp/determinism.patch | 43 --- meta/recipes-extended/ltp/ltp/libswapon.patch | 368 --------------------- meta/recipes-extended/ltp/ltp_20210121.bb | 148 --------- meta/recipes-extended/ltp/ltp_20210524.bb | 139 ++++++++ 8 files changed, 139 insertions(+), 1074 deletions(-) delete mode 100644 meta/recipes-extended/ltp/ltp/0001-open_posix_testsuite-generate-makefiles.sh-Avoid-inc.patch delete mode 100644 meta/recipes-extended/ltp/ltp/0002-Makefile-Avoid-wildcard-determinism-issues.patch delete mode 100644 meta/recipes-extended/ltp/ltp/0003-syscalls-swapon-swapoff-Move-common-library-to-libs.patch delete mode 100644 meta/recipes-extended/ltp/ltp/0007-Fix-test_proc_kill-hanging.patch delete mode 100644 meta/recipes-extended/ltp/ltp/determinism.patch delete mode 100644 meta/recipes-extended/ltp/ltp/libswapon.patch delete mode 100644 meta/recipes-extended/ltp/ltp_20210121.bb create mode 100644 meta/recipes-extended/ltp/ltp_20210524.bb 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 @@ -From 2d1d6350af1db28ec520e26d0069a0518950b0a1 Mon Sep 17 00:00:00 2001 -From: Richard Purdie -Date: Tue, 9 Mar 2021 15:21:11 +0000 -Subject: [PATCH 1/3] open_posix_testsuite/generate-makefiles.sh: Avoid - inconsistencies with make version - -With make 4.1, INSTALL_TARGETS+= will add a space to the variable whereas -with make 4.3, it will not. This leads to differing run.sh files in installed -in packages which is undesireable. If tests is empty we don't have to add -the line to the makefiles at all which seems like the easiest way to -avoid the differences in make behaviour. - -Signed-off-by: Richard Purdie -Upstream-Status: Submitted [http://lists.linux.it/pipermail/ltp/2021-March/021386.html] - ---- - .../open_posix_testsuite/scripts/generate-makefiles.sh | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/testcases/open_posix_testsuite/scripts/generate-makefiles.sh b/testcases/open_posix_testsuite/scripts/generate-makefiles.sh -index 200a631db..4b3aaa4a0 100755 ---- a/testcases/open_posix_testsuite/scripts/generate-makefiles.sh -+++ b/testcases/open_posix_testsuite/scripts/generate-makefiles.sh -@@ -148,8 +148,12 @@ EOF - - fi - -- cat >> "$makefile.2" <> "$makefile.2" <> "$makefile.2" < -Date: Tue, 9 Mar 2021 15:21:36 +0000 -Subject: [PATCH 2/3] Makefile: Avoid wildcard determinism issues - -wildcard used in Makefiles preserves the order of the files on disk -which leads to differences in the order the binaries are linked. - -This patch tweaks the usage of wildcard to also have a sort, making -the binaries reproducible. A previous patch massively improved -the situation but wider testing showed that these other changes can -have an effect on some binaries, this patch avoids those issues as -exposed by our wider testing. - -Signed-off-by: Richard Purdie -Upstream-Status: Submitted [http://lists.linux.it/pipermail/ltp/2021-March/021388.html] - ---- - include/mk/env_post.mk | 2 +- - include/mk/module.mk | 2 +- - runtest/Makefile | 2 +- - scenario_groups/Makefile | 2 +- - testcases/commands/ldd/datafiles/Makefile | 2 +- - testcases/kernel/hotplug/memory_hotplug/Makefile | 3 ++- - testcases/kernel/io/disktest/Makefile | 2 +- - testcases/kernel/io/disktest/Makefile.linux | 4 ++-- - testcases/kernel/sched/hyperthreading/ht_affinity/Makefile | 2 +- - testcases/kernel/sched/hyperthreading/ht_enabled/Makefile | 2 +- - testcases/kernel/sched/sched_stress/Makefile | 2 +- - testcases/kernel/syscalls/lchown/Makefile | 2 +- - testcases/kernel/syscalls/migrate_pages/Makefile | 2 +- - testcases/kernel/syscalls/move_pages/Makefile | 2 +- - testcases/kernel/syscalls/utils/compat_16.mk | 2 +- - testcases/kernel/syscalls/utils/newer_64.mk | 2 +- - testcases/misc/math/float/Makefile | 2 +- - testcases/network/nfs/nfs_stress/nfs05_make_tree.c | 4 ++-- - testcases/network/nfsv4/locks/Makefile | 2 +- - utils/sctp/func_tests/Makefile | 2 +- - 20 files changed, 23 insertions(+), 22 deletions(-) - -diff --git a/include/mk/env_post.mk b/include/mk/env_post.mk -index d52ad9f0b..1d22f9c53 100644 ---- a/include/mk/env_post.mk -+++ b/include/mk/env_post.mk -@@ -47,7 +47,7 @@ LDFLAGS += -L$(top_builddir)/lib/android_libpthread - LDFLAGS += -L$(top_builddir)/lib/android_librt - endif - --MAKE_TARGETS ?= $(notdir $(patsubst %.c,%,$(wildcard $(abs_srcdir)/*.c))) -+MAKE_TARGETS ?= $(notdir $(patsubst %.c,%,$(sort $(wildcard $(abs_srcdir)/*.c)))) - MAKE_TARGETS := $(filter-out $(FILTER_OUT_MAKE_TARGETS),$(MAKE_TARGETS)) - - # with only *.dwo, .[0-9]+.dwo can not be cleaned -diff --git a/include/mk/module.mk b/include/mk/module.mk -index 95fb8336a..6c8814b96 100644 ---- a/include/mk/module.mk -+++ b/include/mk/module.mk -@@ -42,7 +42,7 @@ endif - - ifneq ($(filter install clean,$(MAKECMDGOALS)),) - MAKE_TARGETS := $(filter-out %.ko, $(MAKE_TARGETS)) --MAKE_TARGETS += $(wildcard *.ko) -+MAKE_TARGETS += $(sort $(wildcard *.ko)) - endif - - CLEAN_TARGETS += .dep_modules *.mod built-in.a -diff --git a/runtest/Makefile b/runtest/Makefile -index b7caaee06..6a1565b6a 100644 ---- a/runtest/Makefile -+++ b/runtest/Makefile -@@ -36,7 +36,7 @@ ifneq ($(WITH_POWER_MANAGEMENT_TESTSUITE),yes) - UNWANTED_FILES += power_management_tests - endif - --INSTALL_TARGETS := $(filter-out $(UNWANTED_FILES),$(notdir $(patsubst $(abs_srcdir)/%,%,$(wildcard $(abs_srcdir)/*)))) -+INSTALL_TARGETS := $(filter-out $(UNWANTED_FILES),$(notdir $(patsubst $(abs_srcdir)/%,%,$(sort $(wildcard $(abs_srcdir)/*))))) - - MAKE_TARGETS := - -diff --git a/scenario_groups/Makefile b/scenario_groups/Makefile -index 2978675d9..fcbc92708 100644 ---- a/scenario_groups/Makefile -+++ b/scenario_groups/Makefile -@@ -31,7 +31,7 @@ UNWANTED_FILES := Makefile - - INSTALL_MODE := 00644 - --INSTALL_TARGETS := $(filter-out $(UNWANTED_FILES),$(notdir $(patsubst $(abs_srcdir)/%,%,$(wildcard $(abs_srcdir)/*)))) -+INSTALL_TARGETS := $(filter-out $(UNWANTED_FILES),$(notdir $(patsubst $(abs_srcdir)/%,%,$(sort $(wildcard $(abs_srcdir)/*))))) - - MAKE_TARGETS := - -diff --git a/testcases/commands/ldd/datafiles/Makefile b/testcases/commands/ldd/datafiles/Makefile -index d8bcf5c06..01c352052 100644 ---- a/testcases/commands/ldd/datafiles/Makefile -+++ b/testcases/commands/ldd/datafiles/Makefile -@@ -21,7 +21,7 @@ CPPFLAGS += -fpic - - INSTALL_TARGETS := ldd*.so lddfile.out - --LDD_C_FILES := $(wildcard $(abs_srcdir)/lddfile*.c) -+LDD_C_FILES := $(sort $(wildcard $(abs_srcdir)/lddfile*.c)) - LDD_SO_FILES := $(patsubst $(abs_srcdir)/%.c,%.obj.so,$(LDD_C_FILES)) - MAKE_TARGETS := lddfile.out - CLEAN_TARGETS += *.obj $(LDD_SO_FILES) -diff --git a/testcases/kernel/hotplug/memory_hotplug/Makefile b/testcases/kernel/hotplug/memory_hotplug/Makefile -index d1ba65e65..38a77a2ba 100644 ---- a/testcases/kernel/hotplug/memory_hotplug/Makefile -+++ b/testcases/kernel/hotplug/memory_hotplug/Makefile -@@ -31,6 +31,7 @@ LDLIBS := $(filter-out -lltp,$(LDLIBS)) - - MAKE_TARGETS := memtoy - --memtoy: $(patsubst $(abs_srcdir)/%.c,%.o,$(wildcard $(abs_srcdir)/*.c)) -+memtoy: $(patsubst $(abs_srcdir)/%.c,%.o,$(sort $(wildcard $(abs_srcdir)/*.c))) -+ - - include $(top_srcdir)/include/mk/generic_leaf_target.mk -diff --git a/testcases/kernel/io/disktest/Makefile b/testcases/kernel/io/disktest/Makefile -index d10d98434..3a3a9cbf0 100644 ---- a/testcases/kernel/io/disktest/Makefile -+++ b/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/testcases/kernel/io/disktest/Makefile.linux b/testcases/kernel/io/disktest/Makefile.linux -index ea45b5a57..0f3aab622 100644 ---- a/testcases/kernel/io/disktest/Makefile.linux -+++ b/testcases/kernel/io/disktest/Makefile.linux -@@ -167,8 +167,8 @@ mandir=/usr/share/man - - VER=`grep VER_STR main.h | awk -F\" '{print $$2}'` - GBLHDRS=main.h globals.h defs.h --ALLHDRS=$(wildcard *.h) --SRCS=$(wildcard *.c) -+ALLHDRS=$(sort $(wildcard *.h)) -+SRCS=$(sort $(wildcard *.c)) - OBJS=$(SRCS:.c=.o) - - 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) -diff --git a/testcases/kernel/sched/hyperthreading/ht_affinity/Makefile b/testcases/kernel/sched/hyperthreading/ht_affinity/Makefile -index 10fec96dc..6b64bd261 100644 ---- a/testcases/kernel/sched/hyperthreading/ht_affinity/Makefile -+++ b/testcases/kernel/sched/hyperthreading/ht_affinity/Makefile -@@ -28,6 +28,6 @@ INSTALL_TARGETS := smt_smp_affinity.sh - - MAKE_TARGETS := ht_affinity - --$(MAKE_TARGETS): $(patsubst $(abs_srcdir)/%.c,%.o,$(wildcard $(abs_srcdir)/*.c)) -+$(MAKE_TARGETS): $(patsubst $(abs_srcdir)/%.c,%.o,$(sort $(wildcard $(abs_srcdir)/*.c))) - - include $(top_srcdir)/include/mk/generic_leaf_target.mk -diff --git a/testcases/kernel/sched/hyperthreading/ht_enabled/Makefile b/testcases/kernel/sched/hyperthreading/ht_enabled/Makefile -index 9c1e139d6..585ff1383 100644 ---- a/testcases/kernel/sched/hyperthreading/ht_enabled/Makefile -+++ b/testcases/kernel/sched/hyperthreading/ht_enabled/Makefile -@@ -28,6 +28,6 @@ INSTALL_TARGETS := smt_smp_enabled.sh - - MAKE_TARGETS := ht_enabled - --$(MAKE_TARGETS): $(patsubst $(abs_srcdir)/%.c,%.o,$(wildcard $(abs_srcdir)/*.c)) -+$(MAKE_TARGETS): $(patsubst $(abs_srcdir)/%.c,%.o,$(sort $(wildcard $(abs_srcdir)/*.c))) - - include $(top_srcdir)/include/mk/generic_leaf_target.mk -diff --git a/testcases/kernel/sched/sched_stress/Makefile b/testcases/kernel/sched/sched_stress/Makefile -index b76126c73..4dbbf3477 100644 ---- a/testcases/kernel/sched/sched_stress/Makefile -+++ b/testcases/kernel/sched/sched_stress/Makefile -@@ -10,7 +10,7 @@ INSTALL_TARGETS := sched_stress.sh - - LDLIBS += -lpthread - --MAKE_TARGETS := $(filter-out sched,$(patsubst $(abs_srcdir)/%.c,%,$(wildcard $(abs_srcdir)/*.c))) -+MAKE_TARGETS := $(filter-out sched,$(patsubst $(abs_srcdir)/%.c,%,$(sort $(wildcard $(abs_srcdir)/*.c)))) - - RM += -r - -diff --git a/testcases/kernel/syscalls/lchown/Makefile b/testcases/kernel/syscalls/lchown/Makefile -index 13d39cb81..305fee281 100644 ---- a/testcases/kernel/syscalls/lchown/Makefile -+++ b/testcases/kernel/syscalls/lchown/Makefile -@@ -5,7 +5,7 @@ top_srcdir ?= ../../../.. - - include $(top_srcdir)/include/mk/testcases.mk - --SRCS := $(wildcard $(abs_srcdir)/lchown*.c) -+SRCS := $(sort $(wildcard $(abs_srcdir)/lchown*.c)) - - include $(abs_srcdir)/../utils/compat_16.mk - -diff --git a/testcases/kernel/syscalls/migrate_pages/Makefile b/testcases/kernel/syscalls/migrate_pages/Makefile -index 46912b025..9cf3ce526 100644 ---- a/testcases/kernel/syscalls/migrate_pages/Makefile -+++ b/testcases/kernel/syscalls/migrate_pages/Makefile -@@ -5,7 +5,7 @@ top_srcdir ?= ../../../.. - - include $(top_srcdir)/include/mk/testcases.mk - --MAKE_TARGETS := $(patsubst $(abs_srcdir)/%.c,%,$(wildcard $(abs_srcdir)/*[0-9].c)) -+MAKE_TARGETS := $(patsubst $(abs_srcdir)/%.c,%,$(sort $(wildcard $(abs_srcdir)/*[0-9].c))) - $(MAKE_TARGETS): %: migrate_pages_common.o - - CPPFLAGS += -I$(abs_srcdir)/../utils/ -diff --git a/testcases/kernel/syscalls/move_pages/Makefile b/testcases/kernel/syscalls/move_pages/Makefile -index cd7ff6349..4b22160ed 100644 ---- a/testcases/kernel/syscalls/move_pages/Makefile -+++ b/testcases/kernel/syscalls/move_pages/Makefile -@@ -7,7 +7,7 @@ include $(top_srcdir)/include/mk/testcases.mk - - CPPFLAGS += -I$(abs_srcdir)/../utils - --MAKE_TARGETS := $(patsubst $(abs_srcdir)/%.c,%,$(wildcard $(abs_srcdir)/*[0-9].c)) -+MAKE_TARGETS := $(patsubst $(abs_srcdir)/%.c,%,$(sort $(wildcard $(abs_srcdir)/*[0-9].c))) - - $(MAKE_TARGETS): %: move_pages_support.o - -diff --git a/testcases/kernel/syscalls/utils/compat_16.mk b/testcases/kernel/syscalls/utils/compat_16.mk -index a0ff8f558..e81a00c40 100644 ---- a/testcases/kernel/syscalls/utils/compat_16.mk -+++ b/testcases/kernel/syscalls/utils/compat_16.mk -@@ -50,7 +50,7 @@ - - CPPFLAGS += -I$(abs_srcdir) -I$(abs_srcdir)/../utils - --SRCS ?= $(wildcard $(abs_srcdir)/*.c) -+SRCS ?= $(sort $(wildcard $(abs_srcdir)/*.c)) - - MAKE_TARGETS := $(notdir $(patsubst %.c,%,$(SRCS))) - MAKE_TARGETS_OBJS_WO_COMPAT_16 := $(addsuffix .o,$(MAKE_TARGETS)) -diff --git a/testcases/kernel/syscalls/utils/newer_64.mk b/testcases/kernel/syscalls/utils/newer_64.mk -index 8cd7e03c8..5e798057a 100644 ---- a/testcases/kernel/syscalls/utils/newer_64.mk -+++ b/testcases/kernel/syscalls/utils/newer_64.mk -@@ -25,7 +25,7 @@ - - CPPFLAGS += -I$(abs_srcdir) -I$(abs_srcdir)/../utils - --SRCS ?= $(wildcard $(abs_srcdir)/*.c) -+SRCS ?= $(sort $(wildcard $(abs_srcdir)/*.c)) - - MAKE_TARGETS := $(notdir $(patsubst %.c,%,$(SRCS))) - -diff --git a/testcases/misc/math/float/Makefile b/testcases/misc/math/float/Makefile -index 79dda35d6..5f4cb0f6c 100644 ---- a/testcases/misc/math/float/Makefile -+++ b/testcases/misc/math/float/Makefile -@@ -27,6 +27,6 @@ include $(top_srcdir)/include/mk/testcases.mk - LDLIBS += -lpthread -lm - - # main.c doesn't compile... --MAKE_TARGETS := $(patsubst $(abs_srcdir)/%.c,%,$(wildcard $(abs_srcdir)/float*.c)) -+MAKE_TARGETS := $(patsubst $(abs_srcdir)/%.c,%,$(sort $(wildcard $(abs_srcdir)/float*.c))) - - include $(top_srcdir)/include/mk/generic_trunk_target.mk -diff --git a/testcases/network/nfs/nfs_stress/nfs05_make_tree.c b/testcases/network/nfs/nfs_stress/nfs05_make_tree.c -index 12c86799d..23c520d9d 100644 ---- a/testcases/network/nfs/nfs_stress/nfs05_make_tree.c -+++ b/testcases/network/nfs/nfs_stress/nfs05_make_tree.c -@@ -104,7 +104,7 @@ static void *thread_fn(LTP_ATTRIBUTE_UNUSED void *args) - "\treturn 0;\n}\n"; - - const char make_buf_n[] = "CFLAGS := -O -w -g\n" -- "SRCS=$(wildcard *.c)\n" -+ "SRCS=$(sort $(wildcard *.c))\n" - "TARGETS=$(SRCS:.c=)\n" - "all: $(TARGETS)\n" - "$(TARGETS): %: %.c\n" -@@ -114,7 +114,7 @@ static void *thread_fn(LTP_ATTRIBUTE_UNUSED void *args) - - const char make_buf[] = "CFLAGS := -O -w -g\n" - "SUBDIR = dir\n" -- "SRCS=$(wildcard *.c)\n" -+ "SRCS=$(sort $(wildcard *.c))\n" - "TARGETS=$(SRCS:.c=)\n" - "all: $(SUBDIR) $(TARGETS)\n" - "$(TARGETS): %: %.c\n" -diff --git a/testcases/network/nfsv4/locks/Makefile b/testcases/network/nfsv4/locks/Makefile -index 5812dea3a..05941c892 100644 ---- a/testcases/network/nfsv4/locks/Makefile -+++ b/testcases/network/nfsv4/locks/Makefile -@@ -28,6 +28,6 @@ MAKE_TARGETS := locktests - - LDLIBS += -lpthread - --$(MAKE_TARGETS): $(patsubst $(abs_srcdir)/%.c,%.o,$(wildcard $(abs_srcdir)/*.c)) -+$(MAKE_TARGETS): $(patsubst $(abs_srcdir)/%.c,%.o,$(sort $(wildcard $(abs_srcdir)/*.c))) - - include $(top_srcdir)/include/mk/generic_leaf_target.mk -diff --git a/utils/sctp/func_tests/Makefile b/utils/sctp/func_tests/Makefile -index d296c652a..a17107853 100644 ---- a/utils/sctp/func_tests/Makefile -+++ b/utils/sctp/func_tests/Makefile -@@ -30,7 +30,7 @@ LDFLAGS += $(addprefix -L$(abs_builddir)/../,lib testlib) - - LDLIBS += -lsctputil -lsctp -lpthread - --V4_TARGETS := $(patsubst $(abs_srcdir)/%.c,%,$(wildcard $(abs_srcdir)/*.c)) -+V4_TARGETS := $(patsubst $(abs_srcdir)/%.c,%,$(sort $(wildcard $(abs_srcdir)/*.c))) - - V6_TARGETS := test_basic_v6 test_fragments_v6 test_getname_v6 \ - test_inaddr_any_v6 test_peeloff_v6 \ --- -2.27.0 - 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 @@ -From 0653f1d809d0cc13f84facb9d2d82d984ac4d0ac Mon Sep 17 00:00:00 2001 -From: Richard Purdie -Date: Tue, 9 Mar 2021 15:25:16 +0000 -Subject: [PATCH 3/3] syscalls/swapon/swapoff: Move common library to libs/ - -There is a race/determinism issue with libswapon currently as depending on -which makefile path builds it, the debug paths may be "../swapon/libswapon.c" -or "libswapon.c". To avoid the determinism issue, move libswapon to libs/ -and use it from the shared location. - -The header is moved to the common includes directory to match and -the Makefile.inc fragment can be dropped. - -Signed-off-by: Richard Purdie -Upstream-Status: Submitted [http://lists.linux.it/pipermail/ltp/2021-March/021387.html] - ---- - .../kernel/syscalls/swapon => include}/libswapon.h | 0 - libs/libltpswapon/Makefile | 12 ++++++++++++ - .../swapon => libs/libltpswapon}/libswapon.c | 0 - testcases/kernel/syscalls/swapoff/Makefile | 7 +++++-- - testcases/kernel/syscalls/swapoff/Makefile.inc | 6 ------ - testcases/kernel/syscalls/swapoff/swapoff01.c | 2 +- - testcases/kernel/syscalls/swapoff/swapoff02.c | 2 +- - testcases/kernel/syscalls/swapon/Makefile | 6 +++--- - 8 files changed, 22 insertions(+), 13 deletions(-) - rename {testcases/kernel/syscalls/swapon => include}/libswapon.h (100%) - create mode 100644 libs/libltpswapon/Makefile - rename {testcases/kernel/syscalls/swapon => libs/libltpswapon}/libswapon.c (100%) - delete mode 100644 testcases/kernel/syscalls/swapoff/Makefile.inc - -diff --git a/testcases/kernel/syscalls/swapon/libswapon.h b/include/libswapon.h -similarity index 100% -rename from testcases/kernel/syscalls/swapon/libswapon.h -rename to include/libswapon.h -diff --git a/libs/libltpswapon/Makefile b/libs/libltpswapon/Makefile -new file mode 100644 -index 000000000..8f738338b ---- /dev/null -+++ b/libs/libltpswapon/Makefile -@@ -0,0 +1,12 @@ -+# SPDX-License-Identifier: GPL-2.0-or-later -+# -+# Copyright (C) Richard Purdie -+ -+top_srcdir ?= ../.. -+ -+include $(top_srcdir)/include/mk/env_pre.mk -+ -+INTERNAL_LIB := libltpswapon.a -+ -+include $(top_srcdir)/include/mk/lib.mk -+include $(top_srcdir)/include/mk/generic_leaf_target.mk -diff --git a/testcases/kernel/syscalls/swapon/libswapon.c b/libs/libltpswapon/libswapon.c -similarity index 100% -rename from testcases/kernel/syscalls/swapon/libswapon.c -rename to libs/libltpswapon/libswapon.c -diff --git a/testcases/kernel/syscalls/swapoff/Makefile b/testcases/kernel/syscalls/swapoff/Makefile -index fbfbe0441..a74374605 100644 ---- a/testcases/kernel/syscalls/swapoff/Makefile -+++ b/testcases/kernel/syscalls/swapoff/Makefile -@@ -3,7 +3,10 @@ - - top_srcdir ?= ../../../.. - -+LTPLIBS = ltpswapon -+ - include $(top_srcdir)/include/mk/testcases.mk --include $(abs_srcdir)/./Makefile.inc -+ -+LTPLDLIBS = -lltpswapon -+ - include $(top_srcdir)/include/mk/generic_leaf_target.mk --$(MAKE_TARGETS): %: ../swapon/libswapon.o -diff --git a/testcases/kernel/syscalls/swapoff/Makefile.inc b/testcases/kernel/syscalls/swapoff/Makefile.inc -deleted file mode 100644 -index 65350cbeb..000000000 ---- a/testcases/kernel/syscalls/swapoff/Makefile.inc -+++ /dev/null -@@ -1,6 +0,0 @@ --LIBDIR += ../swapon/ --LIBSWAPON := $(LIBDIR)/libswapon.o --$(LIBSWAPON): -- $(MAKE) -C $(LIBDIR) --CPPFLAGS += -I$(abs_srcdir)/$(LIBDIR) --LDFLAGS += -L$(abs_builddir)/$(LIBDIR) -diff --git a/testcases/kernel/syscalls/swapoff/swapoff01.c b/testcases/kernel/syscalls/swapoff/swapoff01.c -index e115269c0..87a217a89 100644 ---- a/testcases/kernel/syscalls/swapoff/swapoff01.c -+++ b/testcases/kernel/syscalls/swapoff/swapoff01.c -@@ -25,7 +25,7 @@ - #include - #include "config.h" - #include "lapi/syscalls.h" --#include "../swapon/libswapon.h" -+#include "libswapon.h" - - static void setup(void); - static void cleanup(void); -diff --git a/testcases/kernel/syscalls/swapoff/swapoff02.c b/testcases/kernel/syscalls/swapoff/swapoff02.c -index 8954f975f..60cd66c26 100644 ---- a/testcases/kernel/syscalls/swapoff/swapoff02.c -+++ b/testcases/kernel/syscalls/swapoff/swapoff02.c -@@ -33,7 +33,7 @@ - #include "test.h" - #include "lapi/syscalls.h" - #include "safe_macros.h" --#include "../swapon/libswapon.h" -+#include "libswapon.h" - - static void setup(void); - static void cleanup(void); -diff --git a/testcases/kernel/syscalls/swapon/Makefile b/testcases/kernel/syscalls/swapon/Makefile -index 97113a447..57ec45d48 100644 ---- a/testcases/kernel/syscalls/swapon/Makefile -+++ b/testcases/kernel/syscalls/swapon/Makefile -@@ -8,10 +8,10 @@ endif - - top_srcdir ?= ../../../.. - -+LTPLIBS = ltpswapon -+ - include $(top_srcdir)/include/mk/testcases.mk - --FILTER_OUT_MAKE_TARGETS := libswapon -+LTPLDLIBS = -lltpswapon - - include $(top_srcdir)/include/mk/generic_leaf_target.mk -- --$(MAKE_TARGETS): %: libswapon.o --- -2.27.0 - 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 @@ -From f4fafbdffae3a63c81f65cef98c72dda26283e06 Mon Sep 17 00:00:00 2001 -From: Dengke Du -Date: Wed, 8 Feb 2017 16:17:17 +0800 -Subject: [PATCH] Fix test_proc_kill hanging - -Sometimes the signal is delivered to memcg_process before the framework took -into consideration its pid entered in the tasks. Fixed by delaying the signal -send command. - -Upstream-Status: Pending - -Signed-off-by: George Nita -Signed-off-by: Dengke Du ---- - testcases/kernel/controllers/memcg/functional/memcg_lib.sh | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/testcases/kernel/controllers/memcg/functional/memcg_lib.sh b/testcases/kernel/controllers/memcg/functional/memcg_lib.sh -index aadaae4..deea5d6 100755 ---- a/testcases/kernel/controllers/memcg/functional/memcg_lib.sh -+++ b/testcases/kernel/controllers/memcg/functional/memcg_lib.sh -@@ -291,6 +291,7 @@ test_proc_kill() - pid=$! - TST_CHECKPOINT_WAIT 0 - echo $pid > tasks -+ sleep 1 - - signal_memcg_process $pid $3 - --- -2.7.4 - 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 @@ -open_posix_testsuite/generate-makefiles.sh: Fix determinism issue - -Currently the list of tests is generated by the order of the files found -within the directories. This results in differences in the run.sh and -Makefiles. Within Yocto Project this results in differing target -test packages. The fix is simple, just sort the output from locate-test. - -mk/lib.mk: Sort wildcard expansion for determinism - -The order of the objects linked into libltp.a varies depending on the -order of the files found on disk. This results in most ltp binaries -differing depending on that order too. - -Sort the wildcard expansion of *.c which leads to reproducible binaries. - -Signed-off-by: Richard Purdie -Upstream-Status: Submitted [http://lists.linux.it/pipermail/ltp/2021-March/021272.html http://lists.linux.it/pipermail/ltp/2021-March/021273.html] - -Index: git/testcases/open_posix_testsuite/scripts/generate-makefiles.sh -=================================================================== ---- git.orig/testcases/open_posix_testsuite/scripts/generate-makefiles.sh -+++ git/testcases/open_posix_testsuite/scripts/generate-makefiles.sh -@@ -24,7 +24,7 @@ generate_locate_test_makefile() { - - echo "Generating $maketype Makefiles" - -- locate-test --$maketype | sed -e 's,^./,,g' > make-gen.$maketype -+ locate-test --$maketype | sed -e 's,^./,,g' | sort > make-gen.$maketype - - generate_makefiles make-gen.$maketype $* - -Index: git/include/mk/lib.mk -=================================================================== ---- git.orig/include/mk/lib.mk -+++ git/include/mk/lib.mk -@@ -50,6 +50,7 @@ endif - MAKE_TARGETS += $(LIB) - - LIBSRCS ?= $(wildcard $(abs_srcdir)/*.c) -+LIBSRCS := $(sort $(LIBSRCS)) - LIBSRCS := $(abspath $(LIBSRCS)) - LIBSRCS := $(subst $(abs_srcdir)/,,$(wildcard $(LIBSRCS))) - 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 @@ -Index: git/libs/libltpswapon/Makefile -=================================================================== ---- /dev/null -+++ git/libs/libltpswapon/Makefile -@@ -0,0 +1,12 @@ -+# SPDX-License-Identifier: GPL-2.0-or-later -+# -+# Copyright (C) Richard Purdie -+ -+top_srcdir ?= ../.. -+ -+include $(top_srcdir)/include/mk/env_pre.mk -+ -+INTERNAL_LIB := libltpswapon.a -+ -+include $(top_srcdir)/include/mk/lib.mk -+include $(top_srcdir)/include/mk/generic_leaf_target.mk -Index: git/libs/libltpswapon/libswapon.c -=================================================================== ---- /dev/null -+++ git/libs/libltpswapon/libswapon.c -@@ -0,0 +1,90 @@ -+/* -+ * Copyright (c) 2013 Oracle and/or its affiliates. All Rights Reserved. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * This program is distributed in the hope that it would be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write the Free Software Foundation, -+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ * Author: Stanislav Kholmanskikh -+ * -+ */ -+ -+#include -+#include "lapi/syscalls.h" -+#include "test.h" -+#include "libswapon.h" -+ -+/* -+ * Make a swap file -+ */ -+int make_swapfile(void (cleanup)(void), const char *swapfile, int safe) -+{ -+ if (!tst_fs_has_free(NULL, ".", sysconf(_SC_PAGESIZE) * 10, -+ TST_BYTES)) { -+ tst_brkm(TBROK, cleanup, -+ "Insufficient disk space to create swap file"); -+ } -+ -+ /* create file */ -+ if (tst_fill_file(swapfile, 0, -+ sysconf(_SC_PAGESIZE), 10) != 0) { -+ tst_brkm(TBROK, cleanup, "Failed to create swapfile"); -+ } -+ -+ /* make the file swapfile */ -+ const char *argv[2 + 1]; -+ argv[0] = "mkswap"; -+ argv[1] = swapfile; -+ argv[2] = NULL; -+ -+ return tst_cmd(cleanup, argv, "/dev/null", "/dev/null", safe); -+} -+ -+/* -+ * Check swapon/swapoff support status of filesystems or files -+ * we are testing on. -+ */ -+void is_swap_supported(void (cleanup)(void), const char *filename) -+{ -+ int fibmap = tst_fibmap(filename); -+ long fs_type = tst_fs_type(cleanup, filename); -+ const char *fstype = tst_fs_type_name(fs_type); -+ -+ int ret = make_swapfile(NULL, filename, 1); -+ if (ret != 0) { -+ if (fibmap == 1) { -+ tst_brkm(TCONF, cleanup, -+ "mkswap on %s not supported", fstype); -+ } else { -+ tst_brkm(TFAIL, cleanup, -+ "mkswap on %s failed", fstype); -+ } -+ } -+ -+ TEST(ltp_syscall(__NR_swapon, filename, 0)); -+ if (TEST_RETURN == -1) { -+ if (fibmap == 1 && errno == EINVAL) { -+ tst_brkm(TCONF, cleanup, -+ "Swapfile on %s not implemented", fstype); -+ } else { -+ tst_brkm(TFAIL | TERRNO, cleanup, -+ "swapon on %s failed", fstype); -+ } -+ } -+ -+ TEST(ltp_syscall(__NR_swapoff, filename, 0)); -+ if (TEST_RETURN == -1) { -+ tst_brkm(TFAIL | TERRNO, cleanup, -+ "swapoff on %s failed", fstype); -+ } -+} -Index: git/testcases/kernel/syscalls/swapoff/Makefile -=================================================================== ---- git.orig/testcases/kernel/syscalls/swapoff/Makefile -+++ git/testcases/kernel/syscalls/swapoff/Makefile -@@ -3,7 +3,11 @@ - - top_srcdir ?= ../../../.. - -+LTPLIBS = ltpswapon -+ - include $(top_srcdir)/include/mk/testcases.mk --include $(abs_srcdir)/./Makefile.inc -+ -+LTPLDLIBS = -lltpswapon -+ - include $(top_srcdir)/include/mk/generic_leaf_target.mk --$(MAKE_TARGETS): %: ../swapon/libswapon.o -+ -Index: git/testcases/kernel/syscalls/swapoff/Makefile.inc -=================================================================== ---- git.orig/testcases/kernel/syscalls/swapoff/Makefile.inc -+++ /dev/null -@@ -1,6 +0,0 @@ --LIBDIR += ../swapon/ --LIBSWAPON := $(LIBDIR)/libswapon.o --$(LIBSWAPON): -- $(MAKE) -C $(LIBDIR) --CPPFLAGS += -I$(abs_srcdir)/$(LIBDIR) --LDFLAGS += -L$(abs_builddir)/$(LIBDIR) -Index: git/testcases/kernel/syscalls/swapon/Makefile -=================================================================== ---- git.orig/testcases/kernel/syscalls/swapon/Makefile -+++ git/testcases/kernel/syscalls/swapon/Makefile -@@ -8,10 +8,10 @@ endif - - top_srcdir ?= ../../../.. - -+LTPLIBS = ltpswapon -+ - include $(top_srcdir)/include/mk/testcases.mk - --FILTER_OUT_MAKE_TARGETS := libswapon -+LTPLDLIBS = -lltpswapon - - include $(top_srcdir)/include/mk/generic_leaf_target.mk -- --$(MAKE_TARGETS): %: libswapon.o -Index: git/testcases/kernel/syscalls/swapon/libswapon.c -=================================================================== ---- git.orig/testcases/kernel/syscalls/swapon/libswapon.c -+++ /dev/null -@@ -1,90 +0,0 @@ --/* -- * Copyright (c) 2013 Oracle and/or its affiliates. All Rights Reserved. -- * -- * This program is free software; you can redistribute it and/or -- * modify it under the terms of the GNU General Public License as -- * published by the Free Software Foundation; either version 2 of -- * the License, or (at your option) any later version. -- * -- * This program is distributed in the hope that it would be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- * GNU General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this program; if not, write the Free Software Foundation, -- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -- * -- * Author: Stanislav Kholmanskikh -- * -- */ -- --#include --#include "lapi/syscalls.h" --#include "test.h" --#include "libswapon.h" -- --/* -- * Make a swap file -- */ --int make_swapfile(void (cleanup)(void), const char *swapfile, int safe) --{ -- if (!tst_fs_has_free(NULL, ".", sysconf(_SC_PAGESIZE) * 10, -- TST_BYTES)) { -- tst_brkm(TBROK, cleanup, -- "Insufficient disk space to create swap file"); -- } -- -- /* create file */ -- if (tst_fill_file(swapfile, 0, -- sysconf(_SC_PAGESIZE), 10) != 0) { -- tst_brkm(TBROK, cleanup, "Failed to create swapfile"); -- } -- -- /* make the file swapfile */ -- const char *argv[2 + 1]; -- argv[0] = "mkswap"; -- argv[1] = swapfile; -- argv[2] = NULL; -- -- return tst_cmd(cleanup, argv, "/dev/null", "/dev/null", safe); --} -- --/* -- * Check swapon/swapoff support status of filesystems or files -- * we are testing on. -- */ --void is_swap_supported(void (cleanup)(void), const char *filename) --{ -- int fibmap = tst_fibmap(filename); -- long fs_type = tst_fs_type(cleanup, filename); -- const char *fstype = tst_fs_type_name(fs_type); -- -- int ret = make_swapfile(NULL, filename, 1); -- if (ret != 0) { -- if (fibmap == 1) { -- tst_brkm(TCONF, cleanup, -- "mkswap on %s not supported", fstype); -- } else { -- tst_brkm(TFAIL, cleanup, -- "mkswap on %s failed", fstype); -- } -- } -- -- TEST(ltp_syscall(__NR_swapon, filename, 0)); -- if (TEST_RETURN == -1) { -- if (fibmap == 1 && errno == EINVAL) { -- tst_brkm(TCONF, cleanup, -- "Swapfile on %s not implemented", fstype); -- } else { -- tst_brkm(TFAIL | TERRNO, cleanup, -- "swapon on %s failed", fstype); -- } -- } -- -- TEST(ltp_syscall(__NR_swapoff, filename, 0)); -- if (TEST_RETURN == -1) { -- tst_brkm(TFAIL | TERRNO, cleanup, -- "swapoff on %s failed", fstype); -- } --} -Index: git/testcases/kernel/syscalls/swapon/libswapon.h -=================================================================== ---- git.orig/testcases/kernel/syscalls/swapon/libswapon.h -+++ /dev/null -@@ -1,39 +0,0 @@ --/* -- * Copyright (c) 2013 Oracle and/or its affiliates. All Rights Reserved. -- * -- * This program is free software; you can redistribute it and/or -- * modify it under the terms of the GNU General Public License as -- * published by the Free Software Foundation; either version 2 of -- * the License, or (at your option) any later version. -- * -- * This program is distributed in the hope that it would be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- * GNU General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this program; if not, write the Free Software Foundation, -- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -- * -- * Author: Stanislav Kholmanskikh -- * -- */ -- --/* -- * Contains common content for all swapon tests -- */ -- --#ifndef __LIBSWAPON_H__ --#define __LIBSWAPON_H__ -- --/* -- * Make a swap file -- */ --int make_swapfile(void (cleanup)(void), const char *swapfile, int safe); -- --/* -- * Check swapon/swapoff support status of filesystems or files -- * we are testing on. -- */ --void is_swap_supported(void (cleanup)(void), const char *filename); --#endif /* __LIBSWAPON_H__ */ -Index: git/testcases/kernel/syscalls/swapoff/swapoff01.c -=================================================================== ---- git.orig/testcases/kernel/syscalls/swapoff/swapoff01.c -+++ git/testcases/kernel/syscalls/swapoff/swapoff01.c -@@ -25,7 +25,7 @@ - #include - #include "config.h" - #include "lapi/syscalls.h" --#include "../swapon/libswapon.h" -+#include "libswapon.h" - - static void setup(void); - static void cleanup(void); -Index: git/testcases/kernel/syscalls/swapoff/swapoff02.c -=================================================================== ---- git.orig/testcases/kernel/syscalls/swapoff/swapoff02.c -+++ git/testcases/kernel/syscalls/swapoff/swapoff02.c -@@ -33,7 +33,7 @@ - #include "test.h" - #include "lapi/syscalls.h" - #include "safe_macros.h" --#include "../swapon/libswapon.h" -+#include "libswapon.h" - - static void setup(void); - static void cleanup(void); -Index: git/include/libswapon.h -=================================================================== ---- /dev/null -+++ git/include/libswapon.h -@@ -0,0 +1,39 @@ -+/* -+ * Copyright (c) 2013 Oracle and/or its affiliates. All Rights Reserved. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * This program is distributed in the hope that it would be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write the Free Software Foundation, -+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ * Author: Stanislav Kholmanskikh -+ * -+ */ -+ -+/* -+ * Contains common content for all swapon tests -+ */ -+ -+#ifndef __LIBSWAPON_H__ -+#define __LIBSWAPON_H__ -+ -+/* -+ * Make a swap file -+ */ -+int make_swapfile(void (cleanup)(void), const char *swapfile, int safe); -+ -+/* -+ * Check swapon/swapoff support status of filesystems or files -+ * we are testing on. -+ */ -+void is_swap_supported(void (cleanup)(void), const char *filename); -+#endif /* __LIBSWAPON_H__ */ diff --git a/meta/recipes-extended/ltp/ltp_20210121.bb b/meta/recipes-extended/ltp/ltp_20210121.bb deleted file mode 100644 index e1ffd0ddf4..0000000000 --- a/meta/recipes-extended/ltp/ltp_20210121.bb +++ /dev/null @@ -1,148 +0,0 @@ -SUMMARY = "Linux Test Project" -DESCRIPTION = "The Linux Test Project is a joint project with SGI, IBM, OSDL, and Bull with a goal to deliver test suites to the open source community that validate the reliability, robustness, and stability of Linux. The Linux Test Project is a collection of tools for testing the Linux kernel and related features." -HOMEPAGE = "https://linux-test-project.github.io/" -SECTION = "console/utils" -LICENSE = "GPLv2 & GPLv2+ & LGPLv2+ & LGPLv2.1+ & BSD-2-Clause" -LIC_FILES_CHKSUM = "\ - file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://testcases/kernel/controllers/freezer/COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \ - file://testcases/kernel/controllers/freezer/run_freezer.sh;beginline=5;endline=17;md5=86a61d2c042d59836ffb353a21456498 \ - file://testcases/kernel/hotplug/memory_hotplug/COPYING;md5=e04a2e542b2b8629bf9cd2ba29b0fe41 \ - file://testcases/kernel/hotplug/cpu_hotplug/COPYING;md5=e04a2e542b2b8629bf9cd2ba29b0fe41 \ - file://testcases/open_posix_testsuite/COPYING;md5=48b1c5ec633e3e30ec2cf884ae699947 \ - file://testcases/realtime/COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \ - file://utils/benchmark/kernbench-0.42/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ -" - -DEPENDS = "attr libaio libcap acl openssl zip-native" -DEPENDS_append_libc-musl = " fts " -EXTRA_OEMAKE_append_libc-musl = " LIBC=musl " -EXTRA_OECONF_append_libc-musl = " LIBS=-lfts " - -# since ltp contains x86-64 assembler which uses the frame-pointer register, -# set -fomit-frame-pointer x86-64 to handle cases where optimisation -# is set to -O0 or frame pointers have been enabled by -fno-omit-frame-pointer -# earlier in CFLAGS, etc. -CFLAGS_append_x86-64 = " -fomit-frame-pointer" - -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 = "r4" -HASHEQUIV_HASH_VERSION .= ".4" - -SRC_URI = "git://github.com/linux-test-project/ltp.git \ - file://0007-Fix-test_proc_kill-hanging.patch \ - file://0001-Remove-OOM-tests-from-runtest-mm.patch \ - file://determinism.patch \ - file://0001-open_posix_testsuite-generate-makefiles.sh-Avoid-inc.patch \ - file://0002-Makefile-Avoid-wildcard-determinism-issues.patch \ - file://0003-syscalls-swapon-swapoff-Move-common-library-to-libs.patch \ - file://disable_hanging_tests.patch \ - " - -S = "${WORKDIR}/git" - -inherit autotools-brokensep pkgconfig - -TARGET_CC_ARCH += "${LDFLAGS}" - -export prefix = "/opt/${PN}" -export exec_prefix = "/opt/${PN}" - -PACKAGECONFIG[numa] = "--with-numa, --without-numa, numactl," -EXTRA_AUTORECONF += "-I ${S}/testcases/realtime/m4" -EXTRA_OECONF = " --with-realtime-testsuite --with-open-posix-testsuite " -# ltp network/rpc test cases ftbfs when libtirpc is found -EXTRA_OECONF += " --without-tirpc " - -do_install(){ - install -d ${D}${prefix}/ - oe_runmake DESTDIR=${D} SKIP_IDCHECK=1 install include-install - - # fixup not deploy STPfailure_report.pl to avoid confusing about it fails to run - # as it lacks dependency on some perl moudle such as LWP::Simple - # And this script previously works as a tool for analyzing failures from LTP - # runs on the OSDL's Scaleable Test Platform (STP) and it mainly accesses - # http://khack.osdl.org to retrieve ltp test results run on - # OSDL's Scaleable Test Platform, but now http://khack.osdl.org unaccessible - rm -rf ${D}${prefix}/bin/STPfailure_report.pl - - # Copy POSIX test suite into ${D}${prefix}/testcases by manual - cp -r testcases/open_posix_testsuite ${D}${prefix}/testcases - - # Makefile were configured in the build system - find ${D}${prefix} -name Makefile | xargs -n 1 sed -i \ - -e 's@[^ ]*-fdebug-prefix-map=[^ "]*@@g' \ - -e 's@[^ ]*-fmacro-prefix-map=[^ "]*@@g' \ - -e 's@[^ ]*-ffile-prefix-map=[^ "]*@@g' \ - -e 's@[^ ]*--sysroot=[^ "]*@@g' - - # The controllers memcg_stree test seems to cause us hangs and takes 900s - # (maybe we expect more regular output?), anyhow, skip it - sed -e '/^memcg_stress/d' -i ${D}${prefix}/runtest/controllers -} - -RDEPENDS_${PN} = "\ - attr \ - bash \ - bc \ - coreutils \ - cpio \ - cronie \ - curl \ - e2fsprogs \ - e2fsprogs-mke2fs \ - expect \ - file \ - gawk \ - gdb \ - gzip \ - iproute2 \ - ldd \ - libaio \ - logrotate \ - net-tools \ - perl \ - python3-core \ - procps \ - quota \ - unzip \ - util-linux \ - which \ - tar \ -" - -FILES_${PN} += "${prefix}/* ${prefix}/runtest/* ${prefix}/scenario_groups/* ${prefix}/testcases/bin/* ${prefix}/testcases/bin/*/bin/* ${prefix}/testscripts/* ${prefix}/testcases/open_posix_testsuite/* ${prefix}/testcases/open_posix_testsuite/conformance/* ${prefix}/testcases/open_posix_testsuite/Documentation/* ${prefix}/testcases/open_posix_testsuite/functional/* ${prefix}/testcases/open_posix_testsuite/include/* ${prefix}/testcases/open_posix_testsuite/scripts/* ${prefix}/testcases/open_posix_testsuite/stress/* ${prefix}/testcases/open_posix_testsuite/tools/* ${prefix}/testcases/data/nm01/lib.a ${prefix}/lib/libmem.a" - -# Avoid stripping some generated binaries otherwise some of the ltp tests such as ldd01 & nm01 fail -INHIBIT_PACKAGE_STRIP_FILES = "${prefix}/testcases/bin/nm01 ${prefix}/testcases/bin/ldd01" -INSANE_SKIP_${PN} += "already-stripped staticdev" - -remove_broken_musl_sources() { - [ "${TCLIBC}" = "musl" ] || return 0 - - cd ${S} - echo "WARNING: remove unsupported tests (until they're fixed)" - - # sync with upstream - # https://github.com/linux-test-project/ltp/blob/master/travis/alpine.sh#L33 - rm -rfv \ - testcases/kernel/sched/process_stress/process.c \ - testcases/kernel/syscalls/confstr/confstr01.c \ - testcases/kernel/syscalls/fmtmsg/fmtmsg01.c \ - testcases/kernel/syscalls/getcontext/getcontext01.c \ - testcases/kernel/syscalls/rt_tgsigqueueinfo/rt_tgsigqueueinfo01.c \ - testcases/kernel/syscalls/timer_create/timer_create01.c \ - testcases/kernel/syscalls/timer_create/timer_create03.c \ - utils/benchmark/ebizzy-0.3 -} -do_patch[postfuncs] += "remove_broken_musl_sources" - -# Avoid file dependency scans, as LTP checks for things that may or may not -# exist on the running system. For instance it has specific checks for -# csh and ksh which are not typically part of OpenEmbedded systems (but -# can be added via additional layers.) -SKIP_FILEDEPS_${PN} = '1' diff --git a/meta/recipes-extended/ltp/ltp_20210524.bb b/meta/recipes-extended/ltp/ltp_20210524.bb new file mode 100644 index 0000000000..4328b1efee --- /dev/null +++ b/meta/recipes-extended/ltp/ltp_20210524.bb @@ -0,0 +1,139 @@ +SUMMARY = "Linux Test Project" +DESCRIPTION = "The Linux Test Project is a joint project with SGI, IBM, OSDL, and Bull with a goal to deliver test suites to the open source community that validate the reliability, robustness, and stability of Linux. The Linux Test Project is a collection of tools for testing the Linux kernel and related features." +HOMEPAGE = "https://linux-test-project.github.io/" +SECTION = "console/utils" +LICENSE = "GPLv2 & GPLv2+ & LGPLv2+ & LGPLv2.1+ & BSD-2-Clause" +LIC_FILES_CHKSUM = "\ + file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://testcases/kernel/controllers/freezer/COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \ + file://testcases/kernel/controllers/freezer/run_freezer.sh;beginline=5;endline=17;md5=86a61d2c042d59836ffb353a21456498 \ + file://testcases/kernel/hotplug/memory_hotplug/COPYING;md5=e04a2e542b2b8629bf9cd2ba29b0fe41 \ + file://testcases/kernel/hotplug/cpu_hotplug/COPYING;md5=e04a2e542b2b8629bf9cd2ba29b0fe41 \ + file://testcases/open_posix_testsuite/COPYING;md5=48b1c5ec633e3e30ec2cf884ae699947 \ + file://testcases/realtime/COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \ + file://utils/benchmark/kernbench-0.42/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ +" + +DEPENDS = "attr libaio libcap acl openssl zip-native" +DEPENDS_append_libc-musl = " fts " +EXTRA_OEMAKE_append_libc-musl = " LIBC=musl " +EXTRA_OECONF_append_libc-musl = " LIBS=-lfts " + +# since ltp contains x86-64 assembler which uses the frame-pointer register, +# set -fomit-frame-pointer x86-64 to handle cases where optimisation +# is set to -O0 or frame pointers have been enabled by -fno-omit-frame-pointer +# earlier in CFLAGS, etc. +CFLAGS_append_x86-64 = " -fomit-frame-pointer" + +CFLAGS_append_powerpc64 = " -D__SANE_USERSPACE_TYPES__" +CFLAGS_append_mipsarchn64 = " -D__SANE_USERSPACE_TYPES__" +SRCREV = "0fb171f2beddaf64bd27597577c206c0f892b3cd" + +SRC_URI = "git://github.com/linux-test-project/ltp.git \ + file://0001-Remove-OOM-tests-from-runtest-mm.patch \ + file://disable_hanging_tests.patch \ + " + +S = "${WORKDIR}/git" + +inherit autotools-brokensep pkgconfig + +TARGET_CC_ARCH += "${LDFLAGS}" + +export prefix = "/opt/${PN}" +export exec_prefix = "/opt/${PN}" + +PACKAGECONFIG[numa] = "--with-numa, --without-numa, numactl," +EXTRA_AUTORECONF += "-I ${S}/testcases/realtime/m4" +EXTRA_OECONF = " --with-realtime-testsuite --with-open-posix-testsuite " +# ltp network/rpc test cases ftbfs when libtirpc is found +EXTRA_OECONF += " --without-tirpc " + +do_install(){ + install -d ${D}${prefix}/ + oe_runmake DESTDIR=${D} SKIP_IDCHECK=1 install include-install + + # fixup not deploy STPfailure_report.pl to avoid confusing about it fails to run + # as it lacks dependency on some perl moudle such as LWP::Simple + # And this script previously works as a tool for analyzing failures from LTP + # runs on the OSDL's Scaleable Test Platform (STP) and it mainly accesses + # http://khack.osdl.org to retrieve ltp test results run on + # OSDL's Scaleable Test Platform, but now http://khack.osdl.org unaccessible + rm -rf ${D}${prefix}/bin/STPfailure_report.pl + + # Copy POSIX test suite into ${D}${prefix}/testcases by manual + cp -r testcases/open_posix_testsuite ${D}${prefix}/testcases + + # Makefile were configured in the build system + find ${D}${prefix} -name Makefile | xargs -n 1 sed -i \ + -e 's@[^ ]*-fdebug-prefix-map=[^ "]*@@g' \ + -e 's@[^ ]*-fmacro-prefix-map=[^ "]*@@g' \ + -e 's@[^ ]*-ffile-prefix-map=[^ "]*@@g' \ + -e 's@[^ ]*--sysroot=[^ "]*@@g' + + # The controllers memcg_stree test seems to cause us hangs and takes 900s + # (maybe we expect more regular output?), anyhow, skip it + sed -e '/^memcg_stress/d' -i ${D}${prefix}/runtest/controllers +} + +RDEPENDS_${PN} = "\ + attr \ + bash \ + bc \ + coreutils \ + cpio \ + cronie \ + curl \ + e2fsprogs \ + e2fsprogs-mke2fs \ + expect \ + file \ + gawk \ + gdb \ + gzip \ + iproute2 \ + ldd \ + libaio \ + logrotate \ + net-tools \ + perl \ + python3-core \ + procps \ + quota \ + unzip \ + util-linux \ + which \ + tar \ +" + +FILES_${PN} += "${prefix}/* ${prefix}/runtest/* ${prefix}/scenario_groups/* ${prefix}/testcases/bin/* ${prefix}/testcases/bin/*/bin/* ${prefix}/testscripts/* ${prefix}/testcases/open_posix_testsuite/* ${prefix}/testcases/open_posix_testsuite/conformance/* ${prefix}/testcases/open_posix_testsuite/Documentation/* ${prefix}/testcases/open_posix_testsuite/functional/* ${prefix}/testcases/open_posix_testsuite/include/* ${prefix}/testcases/open_posix_testsuite/scripts/* ${prefix}/testcases/open_posix_testsuite/stress/* ${prefix}/testcases/open_posix_testsuite/tools/* ${prefix}/testcases/data/nm01/lib.a ${prefix}/lib/libmem.a" + +# Avoid stripping some generated binaries otherwise some of the ltp tests such as ldd01 & nm01 fail +INHIBIT_PACKAGE_STRIP_FILES = "${prefix}/testcases/bin/nm01 ${prefix}/testcases/bin/ldd01" +INSANE_SKIP_${PN} += "already-stripped staticdev" + +remove_broken_musl_sources() { + [ "${TCLIBC}" = "musl" ] || return 0 + + cd ${S} + echo "WARNING: remove unsupported tests (until they're fixed)" + + # sync with upstream + # https://github.com/linux-test-project/ltp/blob/master/travis/alpine.sh#L33 + rm -rfv \ + testcases/kernel/sched/process_stress/process.c \ + testcases/kernel/syscalls/confstr/confstr01.c \ + testcases/kernel/syscalls/fmtmsg/fmtmsg01.c \ + testcases/kernel/syscalls/getcontext/getcontext01.c \ + testcases/kernel/syscalls/rt_tgsigqueueinfo/rt_tgsigqueueinfo01.c \ + testcases/kernel/syscalls/timer_create/timer_create01.c \ + testcases/kernel/syscalls/timer_create/timer_create03.c \ + utils/benchmark/ebizzy-0.3 +} +do_patch[postfuncs] += "remove_broken_musl_sources" + +# Avoid file dependency scans, as LTP checks for things that may or may not +# exist on the running system. For instance it has specific checks for +# csh and ksh which are not typically part of OpenEmbedded systems (but +# can be added via additional layers.) +SKIP_FILEDEPS_${PN} = '1' -- cgit v1.2.3-54-g00ecf