From nobody Tue Apr 7 13:50:16 2026 Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) (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 BE6E439478A for ; Mon, 6 Apr 2026 18:22:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775499772; cv=none; b=u05wVp6JmDPTa7V9s7CPLNntWPpvW5GZ7k69kkWW1/vAjQE0A3OeeBOJiNOtHRcbFqTGcL3vRfOLeoqAAfblAAw3hEIzVcBaK2+H0ErqpCrKE2YOPSmtplffc7fsWYqelenJv5290mnmad9Y0m1xoEy5uFKro+j4g/Wljdcd/4o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775499772; c=relaxed/simple; bh=NO40hlT3q/UQLTKYN24Xfp26cxU/OmT6kvT04yakHR8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ujv/Hm1O2rZK1MjSHOd7bFenyjSOa7GdDOVhnwjCVheVJcTybtlhLzi0Jv57/TYfw6JiTJvgGT7xl//comYa2hBQrSvDLF8JX8qCOdaB+ErzbHaV17OPAiYQO7ashswf4oIoPt6Ed1UOMiUr6RmYpJ5qPzjDHVPXLmbD/Dqzkdw= 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=P+LTJAiv; arc=none smtp.client-ip=209.85.128.42 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="P+LTJAiv" Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-488a9033b2cso18257405e9.2 for ; Mon, 06 Apr 2026 11:22:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1775499769; x=1776104569; 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=atRPErzIDwCuTw8U4bY1TIrRJ7Ayq0ANPp/cVJlRlp8=; b=P+LTJAiv4WgPlsLQH18qbSKBIDhmVyQzzaxmXlKoNSgNAyEdeRaCrg8iEuspfx4g/5 r62Ku2M0kkPtcqHBPX3C8nfGmmC0JZePAead49UVZ/aKXq8tXMDAzwIP4ymcvl29SAtn MK35dVwKKxrIDWGpoUmkD4F1Rts754QhReJuBwFc8teDvBmqRCENE3IG9wYW4P785qFy /qcgU0VgbWgZYgDe240vVqBTyIg06o+YecD9agWC1+aFdB95aPnqYobcCcVqz6bN229O ZvaDTvkWNYaRtnx7nWzbAUIvPB3XuadDCO8Jo+qC3wN5bY5SUHESoR2Q2w8GE0BJqH0F ltQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775499769; x=1776104569; 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=atRPErzIDwCuTw8U4bY1TIrRJ7Ayq0ANPp/cVJlRlp8=; b=pkvLnLq/Ra7AkOoNCiJABot5/sl+xg9h24sNVc/5TDtg9Mqk8sI70/6Ot5hkrYKA4w W2K+DmeHkZk2grdTfcJVLuvhtWFJKfWT6oXLMa5pi9LqpZgTHlN0LPzUv0Mm7esI7Bvu T1oGpJwv7v5q1C3fWhgSKO6lFtN9QsTuXDg+fk2ixb2bKOoqM95mQW6zh32t8qvMgb2d RS0NUBBMJEssBQAIn/P9wqxDjwhkhr1YAXEUuHfwKBJMXZ0/3j4RjrBhjzpQ2NqOrTC3 /2mw6/MojUoDMtyWmg4B4tLKxLhHaFi6LgXjd3MyNd1CVGSms1Dm6ziBcJWAbn9QMMOH zHRQ== X-Forwarded-Encrypted: i=1; AJvYcCXLJ9L7MOH5GTy/iPY1x7TcHM1o8hW3bCW5Yrs4M2Ul3G5YRcUL1ZltawkhjR03zepmicNoYTAM6YwFlHM=@vger.kernel.org X-Gm-Message-State: AOJu0Yys6mRiIlB5GWYJlt0pqN/9NtF0mFxpR7hlkW/p9/5WSDA2z+d/ PUdu9GCMK2hPHhVH8QUjGtZ2vi8n/IWFb+J9W4QhwkAwETcmDAe5/2GaatI36Djb5K4= X-Gm-Gg: AeBDievad86bqoZF/ZzuakMf4qYkHmr0ZDAhEvIf8PvquGto5bkqTJTnNSvbxc/J7Pt uxOY5d6BC8BPQS6+1z0onDMyKhqT7dA90fI5fVUkGBmF/1fyF6SaRt7wsrvvsSuLdKSJyewcO6k FVM+QGjiLfcSQZG4d8SkO6+q2g4afvA+P9p5Zgkq/wZfc9Yh1Tyg8QoChYkzXP7poo+8IPy7YIe 1rHirpMOm/a3Ut6hLnuVfxVQKJfw1uw/aIfP6PjxkKmxySg1s8haiVeDiJaYibXO95TXiKU/Rk6 RUgbrhjQCPYnHGZTYeG8oBI8+Vj0SoXD98Xm1ZuzyiqRu5OJHrV+6+HJ/jXoEsPy/1QFumqIJqk zRbLEdnVVSOzKCnzTYDpkqD8g6OoSeTi0VqKj+jNlhDHUMnwzlBqtSeCQRlKGbaqcKFwoOKSX4S 9wOsTFA4VQTrui X-Received: by 2002:a05:600c:6986:b0:485:445a:87d1 with SMTP id 5b1f17b1804b1-488996ecae3mr175406675e9.8.1775499769101; Mon, 06 Apr 2026 11:22:49 -0700 (PDT) Received: from localhost ([2804:7f0:b767:120d:a4df:3777:2c55:2b95]) by smtp.gmail.com with ESMTPSA id ada2fe7eead31-60582e1d1edsm17639880137.1.2026.04.06.11.22.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Apr 2026 11:22:48 -0700 (PDT) From: =?utf-8?q?Ricardo_B=2E_Marli=C3=A8re?= Date: Mon, 06 Apr 2026 15:22:21 -0300 Subject: [PATCH v4 09/10] selftests/bpf: Skip tests whose objects were not built 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-9-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=1740; i=rbm@suse.com; h=from:subject:message-id; bh=NO40hlT3q/UQLTKYN24Xfp26cxU/OmT6kvT04yakHR8=; b=U1NIU0lHAAAAAQAAADMAAAALc3NoLWVkMjU1MTkAAAAgguRCc5X8/UX9M40lkMnr//aFGOhce x5ezt8MFNUFlqYAAAAGcGF0YXR0AAAAAAAAAAZzaGE1MTIAAABTAAAAC3NzaC1lZDI1NTE5AAAA QJLZSqyIII0z7HGBBkZHOTxm0gTNEchdkW7FTR5AQiBKJz9SUvEUe+NAlCp5ZNF3Vg1QK5eqlsT Xcp8u98gwBAY= X-Developer-Key: i=rbm@suse.com; a=openssh; fpr=SHA256:pzhe0fJpYLz+3cZ33FFPhIfaUElk9CXPFFXmalIH+1g When Kconfig options or missing headers cause a .test.o not to be compiled, the corresponding prog_test_def entry in tests.h has NULL for both run_test and run_serial_test. The existing infrastructure check treats this case as a fatal coding error and calls exit(). Separate the two failure modes: having both function pointers non-NULL is a genuine coding error and remains fatal. Having both NULL means the test object was intentionally omitted from the build; mark it should_run=3Dfalse and continue so that the remaining tests are unaffected. Signed-off-by: Ricardo B. Marli=C3=A8re --- tools/testing/selftests/bpf/test_progs.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/bpf/test_progs.c b/tools/testing/selft= ests/bpf/test_progs.c index 0929f4a7bda4..85ac25a51a8d 100644 --- a/tools/testing/selftests/bpf/test_progs.c +++ b/tools/testing/selftests/bpf/test_progs.c @@ -2022,12 +2022,15 @@ int main(int argc, char **argv) test->should_run =3D should_run(&env.test_selector, test->test_num, test->test_name); =20 - if ((test->run_test =3D=3D NULL && test->run_serial_test =3D=3D NULL) || - (test->run_test !=3D NULL && test->run_serial_test !=3D NULL)) { + if (test->run_test && test->run_serial_test) { fprintf(stderr, "Test %d:%s must have either test_%s() or serial_test_%= sl() defined.\n", test->test_num, test->test_name, test->test_name, test->test_name); exit(EXIT_ERR_SETUP_INFRA); } + if (!test->run_test && !test->run_serial_test) { + test->should_run =3D false; + continue; + } if (test->should_run) test->should_tmon =3D should_tmon(&env.tmon_selector, test->test_name); } --=20 2.53.0