From nobody Tue Apr 7 13:59:00 2026 Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E835C39478C for ; Mon, 6 Apr 2026 18:22:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775499762; cv=none; b=ITr16S79UL5Y3MDiQ5jpPFORmt19lBXziQDdQGcAK6JnzKTISOInW1VUtQI1VZfjV/XCLmEaxZwUWdoK19IXMYPMyXF4uQjNjb+EJxgN7zIDwDSR2eWAxjfFkrBH7DNedHYvhFoLHPhlbrLGWwtbJwTrLVG0i3w7Mhr2XY78ABk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775499762; c=relaxed/simple; bh=AEn3z1mU2fpCck8UIIjXl5+FxsZFquBJDrd1WRW0HDk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=k+p3b8un756UzTVu5Z4w6YGY7opYZBbclSZ12Skf1ve7J3qZHX2pJDx/lsy+9xEooRhGvawFg6BqlYVAwtjysWls5TaOG1tumIjQCDM9m6FUCe7XWvhcMbx2RLn9d2N8/6xwb8Fi6GbqnEkfdd/TA3YKiKZrG6V6FSeVpgDD9sA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=Yk5O4e/T; arc=none smtp.client-ip=209.85.128.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="Yk5O4e/T" Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-4887f49ec5aso58461645e9.1 for ; Mon, 06 Apr 2026 11:22:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1775499756; x=1776104556; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=YvAeDkBxqfN6WYXzL4jwsf1x31D4pD7nsRyWJL/PC4M=; b=Yk5O4e/TcP4UHg4r9fqardAFgS32wulK9Ba/8ErLnZR3DJm3jXicA3l2CnBubYt0HF fgPLFKwFdZT+KGgqeVdNdme9xJ88cmiWjTN8YOYco0Ntoow0NvhtgP+q20hwwMbhoJix yd3VYmRfhjDkHlPBz8rbM6CoeMMXoyFd94QW/a1YaV3ZreBZqb5n4Ms9qRCYro4oGDJJ 0NZvSzrXBylVWnAIt3JostYy225fB/r6cz4YVl/EmGfwnEO+xLlTMpi7QTcwOhjeAoLU 5jCPv+a4hXEhjFkiJIUDWXnKZMUhn/oLmLsrivTGh/+GCAPzAwELO8z7teCD8J2nawxi 1Uww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775499756; x=1776104556; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=YvAeDkBxqfN6WYXzL4jwsf1x31D4pD7nsRyWJL/PC4M=; b=KexM3U8qZ0i5AS+uqYhhMvqNv0jQm1wDsLROKVvEy241zIFAQMlzoPcU1UukWXUL2F /uqPrLHmrBufDTrF5UkTJP1xroilt7Ii5g0pa8q0HYr5H9vrKM6UW9CMaEL7oG7J4cKs axf3F3D4jEJW8v/0rCIfyzD/ZJ6kdQ/tbsjNQINDS9PXH/XhAefkHecLbYlqrfrr/PA4 Ovywj9RZWH7kuNYs4Fxs62U+znZTVtaZn4WNDbwc7cwrQ/sJ8zw4ft28vo3K+IM9jJ7p Rl/1IRWyUBBlO2Cml5qcMXv0AKbgBO2psu5yLLWIpxARYRERbGkXt6lbgdVCFPqJ9Cez x2CQ== X-Forwarded-Encrypted: i=1; AJvYcCW+MFKGWXKnClVHSIR+i+nTr0s7yscIGRANdWRJHhVbn540EJMw6jkIeWQPmrViMTQB8ZDYgc3rzJ5s/28=@vger.kernel.org X-Gm-Message-State: AOJu0Yy80YF3H9b4tuGcmQGoJAJwCvC3kBoQDEyua93K7HriSpmIJaAq Z1zFZpg5bXwESYDODkPHzBtjh7MJmY4izoqzaCx7S2+nEUq3Ur07HRKLOLXaHBlSzLs= X-Gm-Gg: AeBDieugSEPwOOGT4/wAhPUh67+WRZ2pLsYMzgTzHW3rdKKLmC/fiJnq2Q421S861R7 YnRNc1pTC48zbC84EmKKX0bjFNZApXOieCF9fyosAHWRR4aC+yh5GHpJlvSzOLgLYi9gb+R9qPI /BsJprCBI1lloYfFdfJONHJ+vAMFmM3uBd0niEoeLz27AhgVSkr9+b+HuJGSq3jGotEsJPiqQq6 vA3c/AK7RELSVdrP3eLYKhxwvcUB22uTwFMOFt1VK76OFugMGUiCOs4r49lJcsaX7GDCQhNMXoq TlzhStjD2z4P7Eyc81E47CKBFZa6MkXkTAqkkolMvbUE93KgIYUjsgM9pmjmTG9+K9UlCG8zMKh 2LzGYYmhZQnojJRpwlH3Fyb1NyVUVl3Bdycwyhzf7eSWQbFKtM20+wSLFuVIvstqmtjFqpJuJWB MT/eBAFjZ2zQ0d8YywuoZgq1U= X-Received: by 2002:a05:600c:6305:b0:488:80b6:873a with SMTP id 5b1f17b1804b1-488997a4679mr190079425e9.21.1775499756358; Mon, 06 Apr 2026 11:22:36 -0700 (PDT) Received: from localhost ([2804:7f0:b767:120d:a4df:3777:2c55:2b95]) by smtp.gmail.com with ESMTPSA id 71dfb90a1353d-56d9ba80290sm17348275e0c.3.2026.04.06.11.22.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Apr 2026 11:22:35 -0700 (PDT) From: =?utf-8?q?Ricardo_B=2E_Marli=C3=A8re?= Date: Mon, 06 Apr 2026 15:22:17 -0300 Subject: [PATCH v4 05/10] selftests/bpf: Tolerate test file compilation failures Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260406-selftests-bpf_misconfig-v4-5-9914f50efdf7@suse.com> References: <20260406-selftests-bpf_misconfig-v4-0-9914f50efdf7@suse.com> In-Reply-To: <20260406-selftests-bpf_misconfig-v4-0-9914f50efdf7@suse.com> To: Andrii Nakryiko , Eduard Zingerman , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Kumar Kartikeya Dwivedi , Song Liu , Yonghong Song , Jiri Olsa , Shuah Khan , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt Cc: bpf@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, =?utf-8?q?Ricardo_B=2E_Marli=C3=A8re?= X-Mailer: b4 0.15.1 X-Developer-Signature: v=1; a=openssh-sha256; t=1775499736; l=2101; i=rbm@suse.com; h=from:subject:message-id; bh=AEn3z1mU2fpCck8UIIjXl5+FxsZFquBJDrd1WRW0HDk=; b=U1NIU0lHAAAAAQAAADMAAAALc3NoLWVkMjU1MTkAAAAgguRCc5X8/UX9M40lkMnr//aFGOhce x5ezt8MFNUFlqYAAAAGcGF0YXR0AAAAAAAAAAZzaGE1MTIAAABTAAAAC3NzaC1lZDI1NTE5AAAA QBGQdeW+jOhSS10zVM6eVqN9J9HSgNEoIUL7UQZAhjF5JdjlnXJ+GxuPnnJgJafk3RlAsBnZGvu ywAuIQ2YlbAs= X-Developer-Key: i=rbm@suse.com; a=openssh; fpr=SHA256:pzhe0fJpYLz+3cZ33FFPhIfaUElk9CXPFFXmalIH+1g Individual test files may fail to compile when headers or kernel features required by that test are absent. Currently this aborts the entire build. Make the per-test compilation non-fatal: remove the output object on failure and print a SKIP-TEST marker to stderr. Guard the BTFIDS post-processing step so it is skipped when the object file is absent. The linker step will later ignore absent objects, allowing the remaining tests to build and run. Use plain printf and $(Q) instead of $(call msg,...) in the BTFIDS block: the msg macro expands to @printf which is a make-recipe construct and is invalid as a shell command inside an if-then-fi body; $(Q) restores echo suppression at the recipe level where it is meaningful. Signed-off-by: Ricardo B. Marli=C3=A8re --- tools/testing/selftests/bpf/Makefile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests= /bpf/Makefile index 72f576a8236a..e67f9c4cb5d7 100644 --- a/tools/testing/selftests/bpf/Makefile +++ b/tools/testing/selftests/bpf/Makefile @@ -688,11 +688,14 @@ $(TRUNNER_TEST_OBJS): $(TRUNNER_OUTPUT)/%.test.o: \ $(TRUNNER_TESTS_DIR)/%.c \ | $(TRUNNER_OUTPUT)/%.test.d $$(call msg,TEST-OBJ,$(TRUNNER_BINARY),$$@) - $(Q)cd $$(@D) && $$(CC) -I. $$(CFLAGS) -MMD -MT $$@ -c $(CURDIR)/$$< $$(L= DLIBS) -o $$(@F) + $(Q)cd $$(@D) && $$(CC) -I. $$(CFLAGS) -MMD -MT $$@ -c $(CURDIR)/$$< $$(L= DLIBS) -o $$(@F) || \ + ($(RM) $$(@F); printf ' %-12s %s\n' 'SKIP-TEST' '$$(notdir $$@)' 1>&2) $$(if $$(TEST_NEEDS_BTFIDS), \ - $$(call msg,BTFIDS,$(TRUNNER_BINARY),$$@) \ + $(Q)if [ -f $$@ ]; then \ + printf ' %-8s%s %s\n' "BTFIDS" " [$(TRUNNER_BINARY)]" "$$(notdir $$@)";= \ $(RESOLVE_BTFIDS) --btf $(TRUNNER_OUTPUT)/btf_data.bpf.o $$@; \ - $(RESOLVE_BTFIDS) --patch_btfids $$@.BTF_ids $$@) + $(RESOLVE_BTFIDS) --patch_btfids $$@.BTF_ids $$@; \ + fi) =20 $(TRUNNER_TEST_OBJS:.o=3D.d): $(TRUNNER_OUTPUT)/%.test.d: \ $(TRUNNER_TESTS_DIR)/%.c \ --=20 2.53.0