From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) (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 2DB24364057 for ; Wed, 29 Apr 2026 14:34:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777473285; cv=none; b=saNAKWr54ifio6xcJJ5EPEFddXNLr4PcHKnCo1pezXixXlHg0sjNxvT2Cxp5nXx0PJPHinEbjEv9hIM75a9w9tDNscHzI+FJRK0wj+HIi/mnS+/6pO2xEv2UXEr9l50hjyzMYQuUKJDUSqeJPi+k5ABf+tufW3/Eh+V0i9oMGJQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777473285; c=relaxed/simple; bh=QlnphXbIZwkpSF4vwnCRoGf/LwYmdqzZuMpKhZCGNVo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=F/uj+M4jlIFx0VgbXdzkI/kEdeVu4yVIzuBnKKeUUFdYKkCcXDg81YRihXkRCycQNJZhChyJxNApVcsxCHkjW6/jWWOaGZG07RKyf89XtIcmvwRlnWl9GCuAyUxMhDXXyu000TDubmmsX8AuWbwQl1WFQDluejFUwci7wWh02EI= 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=ClcSAlIK; arc=none smtp.client-ip=209.85.128.50 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="ClcSAlIK" Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-4890d945eb4so5977755e9.0 for ; Wed, 29 Apr 2026 07:34:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1777473282; x=1778078082; 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=3pA8Vhc9DANl97GkJYN+mTuDBA8W99vr/NFCFT5xJ6I=; b=ClcSAlIKLzRAo/E2uYKp2V05eXi4aIku8Da3n6jsmoHLG6XiN97weVDgVOAJ0HCyBW hlKhjKXIMWi1MPLEbExUcgR5ALzEPpzzyL6pUAXhRpepFAah4pIWCVvHdyHbbWI141oQ RyJQQwV4Ia4rchZCnckhSeXvNQ42ZSl0LxkZuATjqw2EiNrYcuTSCw99Oe8OWN0RG2Vb b6PS7/Zo3F+AeUoRq3DoKFDxjrmxKBRigRWbiscuqg8lNjdnPPb0yxGFewDHwtbdiMgi N8BZVZPDqKEWYOZzNwRVK9bGWux9CeadGz5MFrAEziu4x1p9yhQU90jPj+73l54GhD85 FzAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777473282; x=1778078082; 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=3pA8Vhc9DANl97GkJYN+mTuDBA8W99vr/NFCFT5xJ6I=; b=Lh/WhrIhX9G0/D0YeWfMMEq3ej0kQd3EwIzYI21JTLJLbLVJjAkEGMHQOfMEhS9+o+ GuSuuH9wZks539RD/luTmGQvOQ4ICox1I/QSeBO84Mhj3/Dru3jMFaEuj/W7GQNGb7IU w6LNn/QJzx/fsW54W9cVcoPzlx1EbwmkxlFH1I4y3WDtVMVIS6ANsL8gVakxMr7ePF1/ 4LEp44KJwflwM8QKNbrh16w3Wv3IjLncChKRgDqI2Z5YzMTEJ9ZinEMJk/TozVt5TibC V5ikjTF7+BQ7sxPnP504mfjRQ8FfThg53zNKDCjqSmrN1dfh02FF4mNUBFN4l7vQOkyf YMiA== X-Forwarded-Encrypted: i=1; AFNElJ/9oh00mCUyvzsdcAwR1iOJs8bkjvYvI6PbQW1QFIzKBUULyCRhgSIaCGKOjVGsdkpO9nvll+i61970Wkk=@vger.kernel.org X-Gm-Message-State: AOJu0YzpYCO5/zBrgVr0vDCUSIFu4z3xE/ShyutJ7eL3ue/UTswQ38jc ooA+YaxPqDHsHDn6WSUVL0owySq7mRJHuAr1ss7SC7yW+8lJgvs4lD22hdKmF+1J3LcZKNqGtyk zi0fenoU= X-Gm-Gg: AeBDievfGlIO/OWRS16mxPsNwB/hCkrMpVRyfDBYgz64+mWeANrfC9dDMPFHgJu0369 AGNsauuVQAq3mMTo4frfPCyvxB6rOX5h1tIOEQyF3oIluO+rtHxS2QoFNWgZmNfzL9FfqlAWqt0 g+EkyVToPq+wzFGfdpuyVMyArPXFJXzsZ2NbiJnQ57ZzaqFkB8EdRzZSGAZBlohFMbiQ/xr0z1D zUVaWwDPg9BfKXcssi+w30Ejdiks0xfrtoWfxZSH4fguk5tPuiL3Q3hljLWtin2w0PVrXd1KbSD LlR3sES37yPdbttiS0NoPCQovy/RWmPLx7jsQbLpNkfCzF8wTycOvR7EZmNGSBSqqqQzc36SQn3 jolzT4wrgI0mSfS5lhcTQqz85i+qsF/PBTkYjmyeDo/QUTx6AUMBQeMJUXA5z1WlLX++0+YvHDf 3y+MolYS9GyqOFAGk1xM1L+DcQcFE5ACpcmLQ= X-Received: by 2002:a05:600c:29a:b0:486:fcc7:6811 with SMTP id 5b1f17b1804b1-48a7c81f998mr32567305e9.10.1777473282131; Wed, 29 Apr 2026 07:34:42 -0700 (PDT) Received: from localhost ([2804:7f0:b765:105d:ce28:aaff:fe86:149c]) by smtp.gmail.com with ESMTPSA id ada2fe7eead31-62982135e26sm1155487137.3.2026.04.29.07.34.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Apr 2026 07:34:41 -0700 (PDT) From: =?utf-8?q?Ricardo_B=2E_Marli=C3=A8re?= Date: Wed, 29 Apr 2026 11:33:53 -0300 Subject: [PATCH bpf-next v9 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: <20260429-selftests-bpf_misconfig-v9-11-c311f06b4791@suse.com> References: <20260429-selftests-bpf_misconfig-v9-0-c311f06b4791@suse.com> In-Reply-To: <20260429-selftests-bpf_misconfig-v9-0-c311f06b4791@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=1777473237; l=2156; i=rbm@suse.com; h=from:subject:message-id; bh=QlnphXbIZwkpSF4vwnCRoGf/LwYmdqzZuMpKhZCGNVo=; b=U1NIU0lHAAAAAQAAADMAAAALc3NoLWVkMjU1MTkAAAAgguRCc5X8/UX9M40lkMnr//aFGOhce x5ezt8MFNUFlqYAAAAGcGF0YXR0AAAAAAAAAAZzaGE1MTIAAABTAAAAC3NzaC1lZDI1NTE5AAAA QLX4yiW64I6RKHzS/sib+IHUvxGgX3Dyy9/zjZ0Sn3ohSM5MHnNmurZMfXtcOsbXtk6ntUEtcGs inByZDTwzLwg= 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 db4ff951fc88..2822f09c37eb 100644 --- a/tools/testing/selftests/bpf/Makefile +++ b/tools/testing/selftests/bpf/Makefile @@ -1023,12 +1023,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