Skip to contentSkip to conversation

linux-yocto_5.2.bb: Fix build races in kernel-selftests

PATCH In review Khem Raj 3 participants 4 messages Aug 29, 2019 – Aug 30, 2019

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 linux-yocto_5.2.bb: Fix build races in kernel-selftests

Cc Bruce Ashfield <[email protected]>
---
 ...x-test_verifier-test_maps-make-depen.patch | 58 +++++++++++++
 ...ructure-test_-progs-maps-verifier-te.patch | 86 +++++++++++++++++++
 meta/recipes-kernel/linux/linux-yocto_5.2.bb  |  3 +
 3 files changed, 147 insertions(+)
 create mode 100644 meta/recipes-kernel/linux/files/0001-selftests-bpf-fix-test_verifier-test_maps-make-depen.patch
 create mode 100644 meta/recipes-kernel/linux/files/0002-selftests-bpf-structure-test_-progs-maps-verifier-te.patch
meta/recipes-kernel/linux/files/0001-selftests-bpf-fix-test_verifier-test_maps-make-depen.patch new file +58 -0
new file mode 100644
index 0000000000..e397b10cb4
@@ -0,0 +1,58 @@
+From 08a2303803397c98e0f279bb6fb22afc673786a3 Mon Sep 17 00:00:00 2001
+From: Andrii Nakryiko <[email protected]>
+Date: Tue, 16 Jul 2019 12:38:36 -0700
+Subject: [PATCH 1/2] selftests/bpf: fix test_verifier/test_maps make
+ dependencies
+
+e46fc22e60a4 ("selftests/bpf: make directory prerequisites order-only")
+exposed existing problem in Makefile for test_verifier and test_maps tests:
+their dependency on auto-generated header file with a list of all tests wasn't
+recorded explicitly. This patch fixes these issues.
+
+Fixes: 51a0e301a563 ("bpf: Add BPF_MAP_TYPE_SK_STORAGE test to test_maps")
+Fixes: 6b7b6995c43e ("selftests: bpf: tests.h should depend on .c files, not the output")
+Cc: Ilya Leoshkevich <[email protected]>
+Cc: Stanislav Fomichev <[email protected]>
+Cc: Martin KaFai Lau <[email protected]>
+Signed-off-by: Andrii Nakryiko <[email protected]>
+Signed-off-by: Alexei Starovoitov <[email protected]>
+---
+ tools/testing/selftests/bpf/Makefile | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
+index b9e88ccc289b..cd12bf414056 100644
+--- a/tools/testing/selftests/bpf/Makefile
++++ b/tools/testing/selftests/bpf/Makefile
+@@ -77,8 +77,6 @@ all: $(TEST_CUSTOM_PROGS)
+ $(OUTPUT)/urandom_read: $(OUTPUT)/%: %.c
+ 	$(CC) -o $@ $< -Wl,--build-id
+ 
+-$(OUTPUT)/test_maps: map_tests/*.c
+-
+ BPFOBJ := $(OUTPUT)/libbpf.a
+ 
+ $(TEST_GEN_PROGS): $(BPFOBJ)
+@@ -242,9 +240,10 @@ MAP_TESTS_DIR = $(OUTPUT)/map_tests
+ $(MAP_TESTS_DIR):
+ 	mkdir -p $@
+ MAP_TESTS_H := $(MAP_TESTS_DIR)/tests.h
++MAP_TESTS_FILES := $(wildcard map_tests/*.c)
+ test_maps.c: $(MAP_TESTS_H)
+ $(OUTPUT)/test_maps: CFLAGS += $(TEST_MAPS_CFLAGS)
+-MAP_TESTS_FILES := $(wildcard map_tests/*.c)
++$(OUTPUT)/test_maps: test_maps.c $(MAP_TESTS_H) $(MAP_TESTS_FILES)
+ $(MAP_TESTS_H): $(MAP_TESTS_DIR) $(MAP_TESTS_FILES)
+ 	$(shell ( cd map_tests/; \
+ 		  echo '/* Generated header, do not edit */'; \
+@@ -261,6 +260,7 @@ $(MAP_TESTS_H): $(MAP_TESTS_DIR) $(MAP_TESTS_FILES)
+ VERIFIER_TESTS_H := $(OUTPUT)/verifier/tests.h
+ test_verifier.c: $(VERIFIER_TESTS_H)
+ $(OUTPUT)/test_verifier: CFLAGS += $(TEST_VERIFIER_CFLAGS)
++$(OUTPUT)/test_verifier: test_verifier.c $(VERIFIER_TESTS_H)
+ 
+ VERIFIER_TESTS_DIR = $(OUTPUT)/verifier
+ $(VERIFIER_TESTS_DIR):
+-- 
+2.23.0
+
meta/recipes-kernel/linux/files/0002-selftests-bpf-structure-test_-progs-maps-verifier-te.patch new file +86 -0

86 lines not on this page · raw message

meta/recipes-kernel/linux/linux-yocto_5.2.bb +3 -0
index d873a1f2b3..b3cb51162b 100644
@@ -29,6 +29,9 @@ SRCREV_meta ?= "b53e99257175fd6f41f31e5ebec46c1bd11076b8"
 SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRANCH}; \
            git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.2;destsuffix=${KMETA}"
 
+SRC_URI += "file://0001-selftests-bpf-fix-test_verifier-test_maps-make-depen.patch \
+            file://0002-selftests-bpf-structure-test_-progs-maps-verifier-te.patch \
+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
 LINUX_VERSION ?= "5.2.10"
 
Signature · 1 line
2.23.0
#1 lore raw

✗ patchtest: failure for linux-yocto_5.2.bb: Fix build races in kernel-selftests

== Series Details ==

Series: linux-yocto_5.2.bb: Fix build races in kernel-selftests
Revision: 1
URL : https://patchwork.openembedded.org/series/19553/
State : failure

== Summary ==

Thank you for submitting this patch series to OpenEmbedded Core. This is an automated response. Several tests have been executed on the proposed series by patchtest resulting in the following failures:

* Issue Series does not apply on top of target branch [test_series_merge_on_head]
Suggested fix Rebase your series on top of targeted branch
Targeted branch master (currently at 684fc36402)

* Issue Added patch file is missing Upstream-Status in the header [test_upstream_status_presence_format]

  Suggested fix    Add Upstream-Status: <Valid status> to the header of meta/recipes-kernel/linux/files/0001-selftests-bpf-fix-test_verifier-test_maps-make-depen.patch
  Standard format  Upstream-Status: <Valid status>
  Valid status     Pending, Accepted, Backport, Denied, Inappropriate [reason], Submitted [where]

If you believe any of these test results are incorrect, please reply to the mailing list ([email protected]) raising your concerns. Otherwise we would appreciate you correcting the issues and submitting a new version of the patchset if applicable. Please ensure you add/increment the version number when sending the new version (i.e. [PATCH] -> [PATCH v2] -> [PATCH v3] -> ...).

---

Guidelines:     https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe
#2 lore raw
In reply to Khem Raj

I'll merge this directly to the 5.2 branches, rather than patches (but you knew I'd say that). I'll queue it and run some tests ASAP.

Bruce

Quoted 184 lines · Khem Raj
Cc Bruce Ashfield <[email protected]>
---
 ...x-test_verifier-test_maps-make-depen.patch | 58 +++++++++++++
 ...ructure-test_-progs-maps-verifier-te.patch | 86 +++++++++++++++++++
 meta/recipes-kernel/linux/linux-yocto_5.2.bb  |  3 +
 3 files changed, 147 insertions(+)
 create mode 100644 meta/recipes-kernel/linux/files/0001-selftests-bpf-fix-test_verifier-test_maps-make-depen.patch
 create mode 100644 meta/recipes-kernel/linux/files/0002-selftests-bpf-structure-test_-progs-maps-verifier-te.patch
meta/recipes-kernel/linux/files/0001-selftests-bpf-fix-test_verifier-test_maps-make-depen.patch new file +58 -0
new file mode 100644
index 0000000000..e397b10cb4
@@ -0,0 +1,58 @@
+From 08a2303803397c98e0f279bb6fb22afc673786a3 Mon Sep 17 00:00:00 2001
+From: Andrii Nakryiko <[email protected]>
+Date: Tue, 16 Jul 2019 12:38:36 -0700
+Subject: [PATCH 1/2] selftests/bpf: fix test_verifier/test_maps make
+ dependencies
+
+e46fc22e60a4 ("selftests/bpf: make directory prerequisites order-only")
+exposed existing problem in Makefile for test_verifier and test_maps tests:
+their dependency on auto-generated header file with a list of all tests wasn't
+recorded explicitly. This patch fixes these issues.
+
+Fixes: 51a0e301a563 ("bpf: Add BPF_MAP_TYPE_SK_STORAGE test to test_maps")
+Fixes: 6b7b6995c43e ("selftests: bpf: tests.h should depend on .c files, not the output")
+Cc: Ilya Leoshkevich <[email protected]>
+Cc: Stanislav Fomichev <[email protected]>
+Cc: Martin KaFai Lau <[email protected]>
+Signed-off-by: Andrii Nakryiko <[email protected]>
+Signed-off-by: Alexei Starovoitov <[email protected]>
+---
+ tools/testing/selftests/bpf/Makefile | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
+index b9e88ccc289b..cd12bf414056 100644
+--- a/tools/testing/selftests/bpf/Makefile
++++ b/tools/testing/selftests/bpf/Makefile
+@@ -77,8 +77,6 @@ all: $(TEST_CUSTOM_PROGS)
+ $(OUTPUT)/urandom_read: $(OUTPUT)/%: %.c
+       $(CC) -o $@ $< -Wl,--build-id
+
+-$(OUTPUT)/test_maps: map_tests/*.c
+-
+ BPFOBJ := $(OUTPUT)/libbpf.a
+
+ $(TEST_GEN_PROGS): $(BPFOBJ)
+@@ -242,9 +240,10 @@ MAP_TESTS_DIR = $(OUTPUT)/map_tests
+ $(MAP_TESTS_DIR):
+       mkdir -p $@
+ MAP_TESTS_H := $(MAP_TESTS_DIR)/tests.h
++MAP_TESTS_FILES := $(wildcard map_tests/*.c)
+ test_maps.c: $(MAP_TESTS_H)
+ $(OUTPUT)/test_maps: CFLAGS += $(TEST_MAPS_CFLAGS)
+-MAP_TESTS_FILES := $(wildcard map_tests/*.c)
++$(OUTPUT)/test_maps: test_maps.c $(MAP_TESTS_H) $(MAP_TESTS_FILES)
+ $(MAP_TESTS_H): $(MAP_TESTS_DIR) $(MAP_TESTS_FILES)
+       $(shell ( cd map_tests/; \
+                 echo '/* Generated header, do not edit */'; \
+@@ -261,6 +260,7 @@ $(MAP_TESTS_H): $(MAP_TESTS_DIR) $(MAP_TESTS_FILES)
+ VERIFIER_TESTS_H := $(OUTPUT)/verifier/tests.h
+ test_verifier.c: $(VERIFIER_TESTS_H)
+ $(OUTPUT)/test_verifier: CFLAGS += $(TEST_VERIFIER_CFLAGS)
++$(OUTPUT)/test_verifier: test_verifier.c $(VERIFIER_TESTS_H)
+
+ VERIFIER_TESTS_DIR = $(OUTPUT)/verifier
+ $(VERIFIER_TESTS_DIR):
+--
+2.23.0
+
meta/recipes-kernel/linux/files/0002-selftests-bpf-structure-test_-progs-maps-verifier-te.patch new file +86 -0
new file mode 100644
index 0000000000..36692088b0
@@ -0,0 +1,86 @@
+From 2fd88b60e6255206d46baa543a637aa1e1cc6186 Mon Sep 17 00:00:00 2001
+From: Andrii Nakryiko <[email protected]>
+Date: Tue, 16 Jul 2019 12:38:37 -0700
+Subject: [PATCH 2/2] selftests/bpf: structure test_{progs, maps, verifier}
+ test runners uniformly
+
+It's easier to follow the logic if it's structured the same.
+There is just slight difference between test_progs/test_maps and
+test_verifier. test_verifier's verifier/*.c files are not really compilable
+C files (they are more of include headers), so they can't be specified as
+explicit dependencies of test_verifier.
+
+Cc: Alexei Starovoitov <[email protected]>
+Signed-off-by: Andrii Nakryiko <[email protected]>
+Signed-off-by: Alexei Starovoitov <[email protected]>
+---
+ tools/testing/selftests/bpf/Makefile | 24 ++++++++++--------------
+ 1 file changed, 10 insertions(+), 14 deletions(-)
+
+diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
+index cd12bf414056..b76c43eb5d4f 100644
+--- a/tools/testing/selftests/bpf/Makefile
++++ b/tools/testing/selftests/bpf/Makefile
+@@ -161,6 +161,7 @@ endif
+ endif
+
+ TEST_PROGS_CFLAGS := -I. -I$(OUTPUT)
++TEST_MAPS_CFLAGS := -I. -I$(OUTPUT)
+ TEST_VERIFIER_CFLAGS := -I. -I$(OUTPUT) -Iverifier
+
+ ifneq ($(SUBREG_CODEGEN),)
+@@ -212,16 +213,14 @@ ifeq ($(DWARF2BTF),y)
+       $(BTF_PAHOLE) -J $@
+ endif
+
+-PROG_TESTS_H := $(OUTPUT)/prog_tests/tests.h
+-test_progs.c: $(PROG_TESTS_H)
+-$(OUTPUT)/test_progs: CFLAGS += $(TEST_PROGS_CFLAGS)
+-$(OUTPUT)/test_progs: prog_tests/*.c
+-
+ PROG_TESTS_DIR = $(OUTPUT)/prog_tests
+ $(PROG_TESTS_DIR):
+       mkdir -p $@
+-
++PROG_TESTS_H := $(PROG_TESTS_DIR)/tests.h
+ PROG_TESTS_FILES := $(wildcard prog_tests/*.c)
++test_progs.c: $(PROG_TESTS_H)
++$(OUTPUT)/test_progs: CFLAGS += $(TEST_PROGS_CFLAGS)
++$(OUTPUT)/test_progs: test_progs.c $(PROG_TESTS_H) $(PROG_TESTS_FILES)
+ $(PROG_TESTS_H): $(PROG_TESTS_DIR) $(PROG_TESTS_FILES)
+       $(shell ( cd prog_tests/; \
+                 echo '/* Generated header, do not edit */'; \
+@@ -235,7 +234,6 @@ $(PROG_TESTS_H): $(PROG_TESTS_DIR) $(PROG_TESTS_FILES)
+                 echo '#endif' \
+                ) > $(PROG_TESTS_H))
+
+-TEST_MAPS_CFLAGS := -I. -I$(OUTPUT)
+ MAP_TESTS_DIR = $(OUTPUT)/map_tests
+ $(MAP_TESTS_DIR):
+       mkdir -p $@
+@@ -257,17 +255,15 @@ $(MAP_TESTS_H): $(MAP_TESTS_DIR) $(MAP_TESTS_FILES)
+                 echo '#endif' \
+                ) > $(MAP_TESTS_H))
+
+-VERIFIER_TESTS_H := $(OUTPUT)/verifier/tests.h
+-test_verifier.c: $(VERIFIER_TESTS_H)
+-$(OUTPUT)/test_verifier: CFLAGS += $(TEST_VERIFIER_CFLAGS)
+-$(OUTPUT)/test_verifier: test_verifier.c $(VERIFIER_TESTS_H)
+-
+ VERIFIER_TESTS_DIR = $(OUTPUT)/verifier
+ $(VERIFIER_TESTS_DIR):
+       mkdir -p $@
+-
++VERIFIER_TESTS_H := $(VERIFIER_TESTS_DIR)/tests.h
+ VERIFIER_TEST_FILES := $(wildcard verifier/*.c)
+-$(OUTPUT)/verifier/tests.h: $(VERIFIER_TESTS_DIR) $(VERIFIER_TEST_FILES)
++test_verifier.c: $(VERIFIER_TESTS_H)
++$(OUTPUT)/test_verifier: CFLAGS += $(TEST_VERIFIER_CFLAGS)
++$(OUTPUT)/test_verifier: test_verifier.c $(VERIFIER_TESTS_H)
++$(VERIFIER_TESTS_H): $(VERIFIER_TEST_FILES) | $(VERIFIER_TESTS_DIR)
+       $(shell ( cd verifier/; \
+                 echo '/* Generated header, do not edit */'; \
+                 echo '#ifdef FILL_ARRAY'; \
+--
+2.23.0
+
meta/recipes-kernel/linux/linux-yocto_5.2.bb +3 -1
index d873a1f2b3..b3cb51162b 100644
@@ -29,6 +29,9 @@ SRCREV_meta ?= "b53e99257175fd6f41f31e5ebec46c1bd11076b8"
 SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRANCH}; \
            git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.2;destsuffix=${KMETA}"
 
+SRC_URI += "file://0001-selftests-bpf-fix-test_verifier-test_maps-make-depen.patch \
+            file://0002-selftests-bpf-structure-test_-progs-maps-verifier-te.patch \
+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
 LINUX_VERSION ?= "5.2.10"
 
--

2.23.0

Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II
#3 lore raw

I have these staged and they will be part of my next version of the 5.2 recipes.

Bruce

Quoted 197 lines · Bruce Ashfield

I'll merge this directly to the 5.2 branches, rather than patches (but you knew I'd say that). I'll queue it and run some tests ASAP.

Bruce

Quoted 182 lines · Khem Raj
Cc Bruce Ashfield <[email protected]>
---
 ...x-test_verifier-test_maps-make-depen.patch | 58 +++++++++++++
 ...ructure-test_-progs-maps-verifier-te.patch | 86 +++++++++++++++++++
 meta/recipes-kernel/linux/linux-yocto_5.2.bb  |  3 +
 3 files changed, 147 insertions(+)
 create mode 100644 meta/recipes-kernel/linux/files/0001-selftests-bpf-fix-test_verifier-test_maps-make-depen.patch
 create mode 100644 meta/recipes-kernel/linux/files/0002-selftests-bpf-structure-test_-progs-maps-verifier-te.patch
meta/recipes-kernel/linux/files/0001-selftests-bpf-fix-test_verifier-test_maps-make-depen.patch new file +58 -0
new file mode 100644
index 0000000000..e397b10cb4
@@ -0,0 +1,58 @@
+From 08a2303803397c98e0f279bb6fb22afc673786a3 Mon Sep 17 00:00:00 2001
+From: Andrii Nakryiko <[email protected]>
+Date: Tue, 16 Jul 2019 12:38:36 -0700
+Subject: [PATCH 1/2] selftests/bpf: fix test_verifier/test_maps make
+ dependencies
+
+e46fc22e60a4 ("selftests/bpf: make directory prerequisites order-only")
+exposed existing problem in Makefile for test_verifier and test_maps tests:
+their dependency on auto-generated header file with a list of all tests wasn't
+recorded explicitly. This patch fixes these issues.
+
+Fixes: 51a0e301a563 ("bpf: Add BPF_MAP_TYPE_SK_STORAGE test to test_maps")
+Fixes: 6b7b6995c43e ("selftests: bpf: tests.h should depend on .c files, not the output")
+Cc: Ilya Leoshkevich <[email protected]>
+Cc: Stanislav Fomichev <[email protected]>
+Cc: Martin KaFai Lau <[email protected]>
+Signed-off-by: Andrii Nakryiko <[email protected]>
+Signed-off-by: Alexei Starovoitov <[email protected]>
+---
+ tools/testing/selftests/bpf/Makefile | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
+index b9e88ccc289b..cd12bf414056 100644
+--- a/tools/testing/selftests/bpf/Makefile
++++ b/tools/testing/selftests/bpf/Makefile
+@@ -77,8 +77,6 @@ all: $(TEST_CUSTOM_PROGS)
+ $(OUTPUT)/urandom_read: $(OUTPUT)/%: %.c
+       $(CC) -o $@ $< -Wl,--build-id
+
+-$(OUTPUT)/test_maps: map_tests/*.c
+-
+ BPFOBJ := $(OUTPUT)/libbpf.a
+
+ $(TEST_GEN_PROGS): $(BPFOBJ)
+@@ -242,9 +240,10 @@ MAP_TESTS_DIR = $(OUTPUT)/map_tests
+ $(MAP_TESTS_DIR):
+       mkdir -p $@
+ MAP_TESTS_H := $(MAP_TESTS_DIR)/tests.h
++MAP_TESTS_FILES := $(wildcard map_tests/*.c)
+ test_maps.c: $(MAP_TESTS_H)
+ $(OUTPUT)/test_maps: CFLAGS += $(TEST_MAPS_CFLAGS)
+-MAP_TESTS_FILES := $(wildcard map_tests/*.c)
++$(OUTPUT)/test_maps: test_maps.c $(MAP_TESTS_H) $(MAP_TESTS_FILES)
+ $(MAP_TESTS_H): $(MAP_TESTS_DIR) $(MAP_TESTS_FILES)
+       $(shell ( cd map_tests/; \
+                 echo '/* Generated header, do not edit */'; \
+@@ -261,6 +260,7 @@ $(MAP_TESTS_H): $(MAP_TESTS_DIR) $(MAP_TESTS_FILES)
+ VERIFIER_TESTS_H := $(OUTPUT)/verifier/tests.h
+ test_verifier.c: $(VERIFIER_TESTS_H)
+ $(OUTPUT)/test_verifier: CFLAGS += $(TEST_VERIFIER_CFLAGS)
++$(OUTPUT)/test_verifier: test_verifier.c $(VERIFIER_TESTS_H)
+
+ VERIFIER_TESTS_DIR = $(OUTPUT)/verifier
+ $(VERIFIER_TESTS_DIR):
+--
+2.23.0
+
meta/recipes-kernel/linux/files/0002-selftests-bpf-structure-test_-progs-maps-verifier-te.patch new file +86 -0
new file mode 100644
index 0000000000..36692088b0
@@ -0,0 +1,86 @@
+From 2fd88b60e6255206d46baa543a637aa1e1cc6186 Mon Sep 17 00:00:00 2001
+From: Andrii Nakryiko <[email protected]>
+Date: Tue, 16 Jul 2019 12:38:37 -0700
+Subject: [PATCH 2/2] selftests/bpf: structure test_{progs, maps, verifier}
+ test runners uniformly
+
+It's easier to follow the logic if it's structured the same.
+There is just slight difference between test_progs/test_maps and
+test_verifier. test_verifier's verifier/*.c files are not really compilable
+C files (they are more of include headers), so they can't be specified as
+explicit dependencies of test_verifier.
+
+Cc: Alexei Starovoitov <[email protected]>
+Signed-off-by: Andrii Nakryiko <[email protected]>
+Signed-off-by: Alexei Starovoitov <[email protected]>
+---
+ tools/testing/selftests/bpf/Makefile | 24 ++++++++++--------------
+ 1 file changed, 10 insertions(+), 14 deletions(-)
+
+diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
+index cd12bf414056..b76c43eb5d4f 100644
+--- a/tools/testing/selftests/bpf/Makefile
++++ b/tools/testing/selftests/bpf/Makefile
+@@ -161,6 +161,7 @@ endif
+ endif
+
+ TEST_PROGS_CFLAGS := -I. -I$(OUTPUT)
++TEST_MAPS_CFLAGS := -I. -I$(OUTPUT)
+ TEST_VERIFIER_CFLAGS := -I. -I$(OUTPUT) -Iverifier
+
+ ifneq ($(SUBREG_CODEGEN),)
+@@ -212,16 +213,14 @@ ifeq ($(DWARF2BTF),y)
+       $(BTF_PAHOLE) -J $@
+ endif
+
+-PROG_TESTS_H := $(OUTPUT)/prog_tests/tests.h
+-test_progs.c: $(PROG_TESTS_H)
+-$(OUTPUT)/test_progs: CFLAGS += $(TEST_PROGS_CFLAGS)
+-$(OUTPUT)/test_progs: prog_tests/*.c
+-
+ PROG_TESTS_DIR = $(OUTPUT)/prog_tests
+ $(PROG_TESTS_DIR):
+       mkdir -p $@
+-
++PROG_TESTS_H := $(PROG_TESTS_DIR)/tests.h
+ PROG_TESTS_FILES := $(wildcard prog_tests/*.c)
++test_progs.c: $(PROG_TESTS_H)
++$(OUTPUT)/test_progs: CFLAGS += $(TEST_PROGS_CFLAGS)
++$(OUTPUT)/test_progs: test_progs.c $(PROG_TESTS_H) $(PROG_TESTS_FILES)
+ $(PROG_TESTS_H): $(PROG_TESTS_DIR) $(PROG_TESTS_FILES)
+       $(shell ( cd prog_tests/; \
+                 echo '/* Generated header, do not edit */'; \
+@@ -235,7 +234,6 @@ $(PROG_TESTS_H): $(PROG_TESTS_DIR) $(PROG_TESTS_FILES)
+                 echo '#endif' \
+                ) > $(PROG_TESTS_H))
+
+-TEST_MAPS_CFLAGS := -I. -I$(OUTPUT)
+ MAP_TESTS_DIR = $(OUTPUT)/map_tests
+ $(MAP_TESTS_DIR):
+       mkdir -p $@
+@@ -257,17 +255,15 @@ $(MAP_TESTS_H): $(MAP_TESTS_DIR) $(MAP_TESTS_FILES)
+                 echo '#endif' \
+                ) > $(MAP_TESTS_H))
+
+-VERIFIER_TESTS_H := $(OUTPUT)/verifier/tests.h
+-test_verifier.c: $(VERIFIER_TESTS_H)
+-$(OUTPUT)/test_verifier: CFLAGS += $(TEST_VERIFIER_CFLAGS)
+-$(OUTPUT)/test_verifier: test_verifier.c $(VERIFIER_TESTS_H)
+-
+ VERIFIER_TESTS_DIR = $(OUTPUT)/verifier
+ $(VERIFIER_TESTS_DIR):
+       mkdir -p $@
+-
++VERIFIER_TESTS_H := $(VERIFIER_TESTS_DIR)/tests.h
+ VERIFIER_TEST_FILES := $(wildcard verifier/*.c)
+-$(OUTPUT)/verifier/tests.h: $(VERIFIER_TESTS_DIR) $(VERIFIER_TEST_FILES)
++test_verifier.c: $(VERIFIER_TESTS_H)
++$(OUTPUT)/test_verifier: CFLAGS += $(TEST_VERIFIER_CFLAGS)
++$(OUTPUT)/test_verifier: test_verifier.c $(VERIFIER_TESTS_H)
++$(VERIFIER_TESTS_H): $(VERIFIER_TEST_FILES) | $(VERIFIER_TESTS_DIR)
+       $(shell ( cd verifier/; \
+                 echo '/* Generated header, do not edit */'; \
+                 echo '#ifdef FILL_ARRAY'; \
+--
+2.23.0
+
meta/recipes-kernel/linux/linux-yocto_5.2.bb +3 -1
index d873a1f2b3..b3cb51162b 100644
@@ -29,6 +29,9 @@ SRCREV_meta ?= "b53e99257175fd6f41f31e5ebec46c1bd11076b8"
 SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRANCH}; \
            git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.2;destsuffix=${KMETA}"
 
+SRC_URI += "file://0001-selftests-bpf-fix-test_verifier-test_maps-make-depen.patch \
+            file://0002-selftests-bpf-structure-test_-progs-maps-verifier-te.patch \
+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
 LINUX_VERSION ?= "5.2.10"
 
--
Quoted 2 lines

2.23.0

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II