diff mbox series

selftests/sched_ext: add order-only dependency of runner.o on BPFOBJ

Message ID 20241021231648.921226-1-ihor.solodrai@pm.me (mailing list archive)
State Not Applicable
Delegated to: BPF
Headers show
Series selftests/sched_ext: add order-only dependency of runner.o on BPFOBJ | expand

Checks

Context Check Description
netdev/tree_selection success Not a local patch

Commit Message

Ihor Solodrai Oct. 21, 2024, 11:16 p.m. UTC
The runner.o may start building before libbpf headers are installed,
and as a result build fails. This happened a couple of times on
libbpf/ci test jobs:
  * https://github.com/libbpf/ci/actions/runs/11447667257/job/31849533100
  * https://github.com/theihor/libbpf-ci/actions/runs/11445162764/job/31841649552

Headers are installed in a recipe for $(BPFOBJ) target, and adding an
order-only dependency should ensure this doesn't happen.

Signed-off-by: Ihor Solodrai <ihor.solodrai@pm.me>
---
 tools/testing/selftests/sched_ext/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Tejun Heo Oct. 22, 2024, 6:57 p.m. UTC | #1
On Mon, Oct 21, 2024 at 11:16:52PM +0000, Ihor Solodrai wrote:
> The runner.o may start building before libbpf headers are installed,
> and as a result build fails. This happened a couple of times on
> libbpf/ci test jobs:
>   * https://github.com/libbpf/ci/actions/runs/11447667257/job/31849533100
>   * https://github.com/theihor/libbpf-ci/actions/runs/11445162764/job/31841649552
> 
> Headers are installed in a recipe for $(BPFOBJ) target, and adding an
> order-only dependency should ensure this doesn't happen.
> 
> Signed-off-by: Ihor Solodrai <ihor.solodrai@pm.me>

Applied to sched_ext/for-6.12-fixes.

Thanks.
diff mbox series

Patch

diff --git a/tools/testing/selftests/sched_ext/Makefile b/tools/testing/selftests/sched_ext/Makefile
index 0754a2c110a1..57739563d334 100644
--- a/tools/testing/selftests/sched_ext/Makefile
+++ b/tools/testing/selftests/sched_ext/Makefile
@@ -185,7 +185,7 @@  auto-test-targets :=			\
 
 testcase-targets := $(addsuffix .o,$(addprefix $(SCXOBJ_DIR)/,$(auto-test-targets)))
 
-$(SCXOBJ_DIR)/runner.o: runner.c | $(SCXOBJ_DIR)
+$(SCXOBJ_DIR)/runner.o: runner.c | $(SCXOBJ_DIR) $(BPFOBJ)
 	$(CC) $(CFLAGS) -c $< -o $@
 
 # Create all of the test targets object files, whose testcase objects will be