From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (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 D31C939C65F for ; Tue, 28 Apr 2026 23:46:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777419967; cv=none; b=HMV+5j925A9pk2uZ3WFa7mLkSA+7P8thfzdtQMyNhDqK/RKls50Lbp11LX/Pg6M9QPv5KLVfCZlERLohwjPiuAyFlSVO2wTk7D1t+XE0waQmQxWBw6qd3dmtaCJrY+mrd5+Ewy2EvB6cp4OFmaY7F2jAL++96jfmc8HNKAOypPk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777419967; c=relaxed/simple; bh=/izrmfoNTErOF0QoJyqRR2oNNCmtADhmsCqLhuVNNYw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=OkszPuzi/LIWTGUzP9W1TKZeDh51omrWJ6Xs3DPm9z4g0hpG3fYVyEOS8EZ6IoZEhaAHmm+MAQCWQGO5TxfL1Gdd4FxYdcZLHUav7Y3uqGZKCwpgKwo6NV9SErLsXx83pwf9tIJfiSO4n1gOUCwIMSbubs8Q2j2Cvk5lAQCE434= 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=gdMO4g1h; arc=none smtp.client-ip=209.85.128.51 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="gdMO4g1h" Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-488ad135063so108537135e9.0 for ; Tue, 28 Apr 2026 16:46:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1777419964; x=1778024764; 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=hR7c8YMvP9LQvNeuTjxfIeyv3ZVfJWeQnEPeA75OGwc=; b=gdMO4g1hpgqkCryRhK89nOLyjNiabDxgNL9B33laTn32NgmNk+kMEQyKuwBWnectOA bZjF+ncZSv0/S4PmSt/cSjBC4ZRSNzPR0KGmGRaBghmwDayWkZyMkAKGFjaXLj6Wsi2a WTJjOI7xZimimQg26ChNBlPmN4nRJ8D1WqVwg6LJasVrEdiEd29KDtrwf7wvyD0Vy9Yd jgyOW3Co4weu8vpnp9GuC5fmjTtnDfCYZfEU9iAuvqUY9FTrZ/ZPzdzpTzp+oVrN20gt jXbxGBGDebB47qy02jP/mIz9uhr5RAJZvv5AX5iwJAoGSYN9cYCitN0tRp8F0796C1Hh T+aA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777419964; x=1778024764; 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=hR7c8YMvP9LQvNeuTjxfIeyv3ZVfJWeQnEPeA75OGwc=; b=mXRQodvtUkIROO+jGioiPyKFjuRtboxkHmyupndEFXyVBbpJ9x9neYBYALm8Z9Ily0 zU96yJXCQPuK3s2lMIwefWXJkXCELedSKk4u/S6Y0a+n/vkMviSK4reH290TJncVW+4E cGO8lfgVGiQ2A9kaZ9Gvc1129b+HOFGFTC98pXFeLUxmFTdRZZVTuHYFcOdRX05tIXZi UzZhDgJmy/pKdKJ4NT3tXI+TA/72ukfgbCoaZdVa9tpzYAnzOmU/PJE/zRiuFI6RfznT E3alHm1YArs4CAYTMgmKgyrM8sqkvkihe/J+xrMTmDNsa4MkIqR7USJjy8dmZoYSFmOv bIPQ== X-Forwarded-Encrypted: i=1; AFNElJ8RKwLyFRtkn+oAJVmds38j1fcK7iWmEQBuET3QBXVIwVV06drWXsaP9Me5ZMU4cD/6HpkY7sKBSkogNAc=@vger.kernel.org X-Gm-Message-State: AOJu0YwmfZ4FQE5Nb+PeN1sNV+Gwr8oHoQMOh0Xvc/pu5QkYNbowf1Pj EL2TbaiiWw9VbA4BzpUmFl7p9plxtdN+2aiLdSrkCn8j3pD4i6VdnhJ2j5fm3LOncU8= X-Gm-Gg: AeBDieu34agvX6RzInCfSwVrq5366GuEI+B0TP8FAIZbbE4g0LQlWaBtRnC14g5i9Gp 8KLYQTr+BenqQfJl7zXfM12H4eeZpbTGxGStBK1hwfRBpPFyuooEOCFAqDcJkUBCxaLZpXXur5X Xo0AxAUR1in2L3Q4+TD+mHf6PFdyG2DBC1wUSgF4aFd5aNCpj1YudA84gmNeVnhnP0kpEHe/D4M Q2vjmCOG19+NhccQosqaYrfksvSIztFkSGajHT1HsE31rYUsCO+ratqpSvOnBJ5hw3Oy3LSO6Th zgvxdfNYfi52Oq400iNs6fDy/5WA8vXYG6bwIugE5LB5/GX0qt/LOLBB5pPqGY3OeW06TAiCQcB sNfB8YhERjhjmcLEOwj/ZI2l6tJGGzAq0IgCTOp9KCcGuvZWkm/EdLPWP3Q+wwpFzLKjCuTav5M jijV5oig8ZAXN9ibKTF0uzHaAN X-Received: by 2002:a05:600c:4e91:b0:471:700:f281 with SMTP id 5b1f17b1804b1-48a7b54b1c7mr24789895e9.25.1777419964535; Tue, 28 Apr 2026 16:46:04 -0700 (PDT) Received: from localhost ([2804:7f0:b765:105d:ce28:aaff:fe86:149c]) by smtp.gmail.com with ESMTPSA id 71dfb90a1353d-573b6953946sm271414e0c.0.2026.04.28.16.46.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Apr 2026 16:46:02 -0700 (PDT) From: =?utf-8?q?Ricardo_B=2E_Marli=C3=A8re?= Date: Tue, 28 Apr 2026 20:45:12 -0300 Subject: [PATCH bpf-next v8 11/11] selftests/bpf: Tolerate missing files during install 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: 8bit Message-Id: <20260428-selftests-bpf_misconfig-v8-11-bf02cf97dbcb@suse.com> References: <20260428-selftests-bpf_misconfig-v8-0-bf02cf97dbcb@suse.com> In-Reply-To: <20260428-selftests-bpf_misconfig-v8-0-bf02cf97dbcb@suse.com> To: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , 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, Alan Maguire , "Ricardo B. Marliere" X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=openssh-sha256; t=1777419912; l=2156; i=rbm@suse.com; h=from:subject:message-id; bh=/izrmfoNTErOF0QoJyqRR2oNNCmtADhmsCqLhuVNNYw=; b=U1NIU0lHAAAAAQAAADMAAAALc3NoLWVkMjU1MTkAAAAgguRCc5X8/UX9M40lkMnr//aFGOhce x5ezt8MFNUFlqYAAAAGcGF0YXR0AAAAAAAAAAZzaGE1MTIAAABTAAAAC3NzaC1lZDI1NTE5AAAA QBbgjXwVu2unS8JglD6UCKZJvCJEJAlmSjrzgmiYPCBRyG9YG5E/X2CY352VvtcvIUf+weYBF79 DIYd08L56eQk= X-Developer-Key: i=rbm@suse.com; a=openssh; fpr=SHA256:pzhe0fJpYLz+3cZ33FFPhIfaUElk9CXPFFXmalIH+1g With partial builds, some TEST_GEN_FILES entries can be absent at install time. rsync treats missing source arguments as fatal and aborts kselftest installation. Override INSTALL_SINGLE_RULE in selftests/bpf to use --ignore-missing-args, while keeping the existing bpf-specific INSTALL_RULE extension logic. Also add --ignore-missing-args to the TEST_INST_SUBDIRS rsync loop so that subdirectories with no .bpf.o files (e.g. when a test runner flavor was skipped) do not abort installation. Note that the INSTALL_SINGLE_RULE override applies globally to all file categories including static source files (TEST_PROGS, TEST_FILES). These are version-controlled and should always be present, so the practical risk is negligible. Signed-off-by: Ricardo B. Marlière --- tools/testing/selftests/bpf/Makefile | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile index 461e2d9416fc..3c3234a2ce15 100644 --- a/tools/testing/selftests/bpf/Makefile +++ b/tools/testing/selftests/bpf/Makefile @@ -1017,12 +1017,23 @@ EXTRA_CLEAN := $(SCRATCH_DIR) $(HOST_SCRATCH_DIR) \ # Delete partially updated (corrupted) files on error .DELETE_ON_ERROR: +# When permissive, tell rsync to ignore missing source arguments so that +# partial builds do not abort installation. +ifneq ($(PERMISSIVE),) +override define INSTALL_SINGLE_RULE + $(if $(INSTALL_LIST),@mkdir -p $(INSTALL_PATH)) + $(if $(INSTALL_LIST),rsync -a --copy-unsafe-links --ignore-missing-args $(INSTALL_LIST) $(INSTALL_PATH)/) +endef +endif + DEFAULT_INSTALL_RULE := $(INSTALL_RULE) override define INSTALL_RULE $(DEFAULT_INSTALL_RULE) - @for DIR in $(TEST_INST_SUBDIRS); do \ - mkdir -p $(INSTALL_PATH)/$$DIR; \ - rsync -a $(OUTPUT)/$$DIR/*.bpf.o $(INSTALL_PATH)/$$DIR;\ + @for DIR in $(TEST_INST_SUBDIRS); do \ + mkdir -p $(INSTALL_PATH)/$$DIR; \ + rsync -a $(if $(PERMISSIVE),--ignore-missing-args) \ + $(OUTPUT)/$$DIR/*.bpf.o \ + $(INSTALL_PATH)/$$DIR; \ done endef -- 2.54.0