From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lj1-f177.google.com (mail-lj1-f177.google.com [209.85.208.177]) (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 2B5FB477E41 for ; Thu, 30 Apr 2026 16:02:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777564976; cv=none; b=U9KfYkjOGLppmTC3VLa7pmZqirVh63V9r4Zdo4/RpDs4L6LUxX+Q5hogAPbFM3GU3fv5gC4vZjWexAXRBlcYCOQlsj8QC1wuPPuFwqAJVyQK2VbMJYh6DhexqrihZBcIEG+7RfHKKNruQ+3LICi9ZUtxoc0GRDF3oR4z2Ar6D+w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777564976; c=relaxed/simple; bh=0g4nJPTP+SRNnJ6VP5Kw4a/d4c+9xCSL8ZRFVgYSARs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=YXYOiC2xodiJeuA5Q4z/G7ChLyL9BLGixYYtZiAAU5al2G3+1TiP0HMSqpIcNT9Qo8SCkpyRacpflGEz8QpFuZ9xliZ98B61g+LISDQduj8weGLwbQAKeIN+qhnAxqEMOpSvzTvKOTxiMRb2eYXfSWoWF3I1PnhoFNrXkHYmSVU= 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=AR+CsJmj; arc=none smtp.client-ip=209.85.208.177 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="AR+CsJmj" Received: by mail-lj1-f177.google.com with SMTP id 38308e7fff4ca-38dfb789d7fso10287831fa.2 for ; Thu, 30 Apr 2026 09:02:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1777564973; x=1778169773; 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=FrFlzMIY8dqFl9fL6+GZm8ewKnQP1m4Ik6n37xpccCw=; b=AR+CsJmjYqsNqqhjnEOBFw1ebkL99wjfEosDhiz7/9UxYaGZEo3eZGZa8yIanwOjCs JXRNyC9B9jvHHDexLPvReSyAhEylwLWFxy40cteroArORM4vE7N+5z597eXSThRyYApP xLXIaEczED/9zkHUj9O0Qh29x0dhvegP3z3RBxAj3PH/DeUh44Ff0wKbKxxDM+80hQlW 73rbDRRh6BDFrwWGJIQTolozJbNigK3/TlOgKcMz9EfCZibfeanZQPBbK1gwEtIkTcUM cWuc2X1afQ8w/OkVKU7m1cK1pyU38ga9yefPQcbWDnpVEhJT9bNlqBkC1uC0580O6YNO cRWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777564973; x=1778169773; 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=FrFlzMIY8dqFl9fL6+GZm8ewKnQP1m4Ik6n37xpccCw=; b=Cwy8q1WxIMefeSDsG5gz1VgiAlB6jel1hTzLBODvR0OlLF21ErnfsdpEodqrhzc4Z0 ZboO6HScDNx/dFQe8+aWMJKBZ/uNm9TqWkflIL9FVaugbS5NU2cQMxRUow7arKyslBRt Gp3eeE6wXR92F7w9bpWDwb3lnLMElxhU4B/7utPHXY5Q+dJfH6iiKXpZfcTPiE/52P7E ibTUUVwjrR99vt2nCr7eEDioO7BP3AgfyI75QXT25p/1pOX5EUZZAhLqkBc6AcwvLbvi bJDgx0EZ/K1nccYjkodWXhpZbB1ADlEIDVGHMhoBMLerjhNhNBi4avwlLG8nLjXICGin UqbA== X-Forwarded-Encrypted: i=1; AFNElJ8DoQzIqKxWu9sfMFv9GKfFH6Vk/F64rt/92NVMdCqvhrVOkaoVOccU1wtlXMhmsqXgTyzCut/161C+m4k=@vger.kernel.org X-Gm-Message-State: AOJu0YyRgGR1yAZPSHDi6XBneEiNYEmfXhJ0ygBdhq50Iou/RsWm87ni /iEYZfb/fQGv7D6YDWbzJMXjpSUmajs4KsAjAkVn7fwO7YfWGQaf8Ro77l1dHZA3n7k= X-Gm-Gg: AeBDieutoE8EOUcGCkxu34elD1gyxGpph2QxsvjiQq31jJP/LR7t+IsffQc6Q2lUKIA RjwYmECMb+S3J7AmdMyL58AkEGHswcCFy1MbpPPZDazivbVeUrA4MI7DwR9a03ZOQA8ZhGTu/le qT68r6BMx/nWTj4zddPq6NMu/uj80Tl6pTXvU1kOsw4kemPCyotqAHHkTKgKmDhQvQPwJl/pC5n BKXd5EJjqJnA6H5BWpxCJUXjxi+lpOI1SXk2arbA9SVSHRUtXhiHTB0wZnFpFAfitGN7aye6J0e FEUEgGdi93MdryYpgV19tILkKNIVvOWPfYArICPOHmHW7Sv8D/hvlLxHaymUaPm65BC+0YfuEM3 Rs1u3O5+wgPeOM4LYyLumApU0bVvNXHocA5KBWSwR8GC8LCMuKadgHSFX/n998DV4MpJF1nrVtW dclG01Vs26A1i1IzFZHGwhorEC X-Received: by 2002:a2e:9dcf:0:b0:391:11de:dd6c with SMTP id 38308e7fff4ca-3934e27876fmr12461231fa.16.1777564973242; Thu, 30 Apr 2026 09:02:53 -0700 (PDT) Received: from localhost ([2804:7f0:b765:105d:ce28:aaff:fe86:149c]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2ee38d79eb9sm610895eec.8.2026.04.30.09.02.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Apr 2026 09:02:52 -0700 (PDT) From: =?utf-8?q?Ricardo_B=2E_Marli=C3=A8re?= Date: Thu, 30 Apr 2026 13:02:12 -0300 Subject: [PATCH bpf-next v11 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: <20260430-selftests-bpf_misconfig-v11-11-e11f7a8c4fdc@suse.com> References: <20260430-selftests-bpf_misconfig-v11-0-e11f7a8c4fdc@suse.com> In-Reply-To: <20260430-selftests-bpf_misconfig-v11-0-e11f7a8c4fdc@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=1777564926; l=2156; i=rbm@suse.com; h=from:subject:message-id; bh=0g4nJPTP+SRNnJ6VP5Kw4a/d4c+9xCSL8ZRFVgYSARs=; b=U1NIU0lHAAAAAQAAADMAAAALc3NoLWVkMjU1MTkAAAAgguRCc5X8/UX9M40lkMnr//aFGOhce x5ezt8MFNUFlqYAAAAGcGF0YXR0AAAAAAAAAAZzaGE1MTIAAABTAAAAC3NzaC1lZDI1NTE5AAAA QBSctWHKemMRwsrUhGlHgWOBzzJbhHVoeimaKLPlrUVLkf+65H78hcts5/x+c9oZ8Ecuvc8yUz6 YyMVNTWCMBgU= 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 a460f2ad3cff..9948a0a02bb9 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