From patchwork Mon Sep 16 19:59:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ihor Solodrai X-Patchwork-Id: 13805771 X-Patchwork-Delegate: bpf@iogearbox.net Received: from mail-4316.protonmail.ch (mail-4316.protonmail.ch [185.70.43.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2CB712E659 for ; Mon, 16 Sep 2024 19:59:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.70.43.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726516768; cv=none; b=Id8jBbJD0H010kgv53asP2L005yxJLzMBB6mMuQwT6Vtb+VBEiiXNoILHvQv2WWTMz04UCwd1v2Gb+Chn5Xg+EgS9DmWWLMzX4ki/TCLUyHnBLmzcaUwdzO9pO30IAjdvg5RFYQcQzd9j+w1zGb7CPF73RGUSikXp9XYQk1ylQ8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726516768; c=relaxed/simple; bh=2aP/yhGncrEQt3IQflU760fiq4klufQClPAUVslHYCY=; h=Date:To:From:Cc:Subject:Message-ID:MIME-Version:Content-Type; b=nHQHvKGVdYzbzi1pY2Gjc14JrtvxJfq1LqyVBw2vABhAvjr4R9/Qeh4eP2a56B7PUhucOACY6BbF/71iUowhMUInxs/97F2n4d6YzmMoICSbI/aITQrLlagyYlkGdEbwXqeIOSpmvLQBqW6FTMNEN4PEXNml0seiT3qlpKQRoiQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=pm.me; spf=pass smtp.mailfrom=pm.me; dkim=pass (2048-bit key) header.d=pm.me header.i=@pm.me header.b=RD7rl4Ug; arc=none smtp.client-ip=185.70.43.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=pm.me Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pm.me Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pm.me header.i=@pm.me header.b="RD7rl4Ug" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=protonmail3; t=1726516765; x=1726775965; bh=2aP/yhGncrEQt3IQflU760fiq4klufQClPAUVslHYCY=; h=Date:To:From:Cc:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=RD7rl4UgQVyGH7sr9nOxy3STI3sFae9/Hsm0bQv2kv6n0/3GyPj2fwoig5kIM+20b nYXBa6llzYizADFQvEr2e4jYInJBiDKXql6wFjB+tLKL+L05nV4qoMAHCYo3QC2o4u ogvjPsxxhBP/CWvfCc6t//jAKlLxtlPFmOQ/f/7jYbll+5M0/TbLOY7tJEkYrC5ksU i1X2kHs9dp45mk3d2Ti3vkPYR1DDXBlNejdNGxG414/RZYPpoid31+vWot7+mFRwc2 V3ZVxSTD9hMfW+jTrfuOq7JAX2rJrr9kTjdBNwrYSuPhmTO3CS5zF1QnK0Wo+a2Rom 0sSOsKOKwtD7A== Date: Mon, 16 Sep 2024 19:59:22 +0000 To: bpf@vger.kernel.org From: Ihor Solodrai Cc: andrii@kernel.org, ast@kernel.org, daniel@iogearbox.net, eddyz87@gmail.com, mykolal@fb.com, bjorn@kernel.org Subject: [PATCH bpf-next 1/2] selftests/bpf: remove test_skb_cgroup_id.sh from TEST_PROGS Message-ID: <20240916195919.1872371-1-ihor.solodrai@pm.me> Feedback-ID: 27520582:user:proton X-Pm-Message-ID: 2e50422ea314ec3c3b75f89cee4af312cbb4826e Precedence: bulk X-Mailing-List: bpf@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: bpf@iogearbox.net test_skb_cgroup_id.sh was deleted in https://git.kernel.org/bpf/bpf-next/c/f957c230e173 It has to be removed from TEST_PROGS variable in tools/testing/selftests/bpf/Makefile, otherwise install target fails. Link: https://lore.kernel.org/bpf/Q3BN2kW9Kgy6LkrDOwnyY4Pv7_YF8fInLCd2_QA3LimKYM3wD64kRdnwp7blwG2dI_s7UGnfUae-4_dOmuTrxpYCi32G_KTzB3PfmxIerH8=@pm.me/ Signed-off-by: Ihor Solodrai Tested-by: Björn Töpel --- tools/testing/selftests/bpf/Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile index f04af11df8eb..df75f1beb731 100644 --- a/tools/testing/selftests/bpf/Makefile +++ b/tools/testing/selftests/bpf/Makefile @@ -132,7 +132,6 @@ TEST_PROGS := test_kmod.sh \ test_tunnel.sh \ test_lwt_seg6local.sh \ test_lirc_mode2.sh \ - test_skb_cgroup_id.sh \ test_flow_dissector.sh \ test_xdp_vlan_mode_generic.sh \ test_xdp_vlan_mode_native.sh \ From patchwork Mon Sep 16 19:59:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ihor Solodrai X-Patchwork-Id: 13805772 X-Patchwork-Delegate: bpf@iogearbox.net Received: from mail-4322.protonmail.ch (mail-4322.protonmail.ch [185.70.43.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 910ED15B0EB for ; Mon, 16 Sep 2024 19:59:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.70.43.22 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726516778; cv=none; b=nRHaxX6q571e0R0jrzioqHv94CPQHty8gob6wxwRgQnRcnKoZ05uxAa4qQstou5448atfQ/re6V4uvPWvSlIYxEdh2doMzvCymM5TB9WpbN8dQYUxCrNrM58/LAxE5EW+M0z6SNhX1AwxpUTfhRCmnq41x26V6yqCvhoqktRK4w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726516778; c=relaxed/simple; bh=hQZBL71A+6h8yI2OlTqFi1ETIaIJ1SfzQ7bGAfPwxSY=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=TMEg7DCnpl0yxKuZQpr582HeA/8j4MUJAo7rjV+p6mh2M01bnEsjRE5yg7riX3729PYuEjKTwQqfh9yt00g4/O41FycCP8kQukKNh+VwMF9n5cEgZQwch4NP//YQH/XwcrghrtPcTfJQrVIpwhOj5pIP1arlEmxzzZdvAx4fn6s= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=pm.me; spf=pass smtp.mailfrom=pm.me; dkim=pass (2048-bit key) header.d=pm.me header.i=@pm.me header.b=DNg/pLXL; arc=none smtp.client-ip=185.70.43.22 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=pm.me Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pm.me Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pm.me header.i=@pm.me header.b="DNg/pLXL" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=protonmail3; t=1726516774; x=1726775974; bh=hQZBL71A+6h8yI2OlTqFi1ETIaIJ1SfzQ7bGAfPwxSY=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=DNg/pLXL/Zouhbqyb4fIe3ZrTuCHhbyqENPuc8QEiX0rXPh6vEy+A+jqOCvk8kmeq hE/Z7LNlY/rPHodP8VEUrVmdyZyiHmag6/mB6vNhOTd6MuPqmvJWf1cRJm3PyC5SJm mkGfyDvSmmyg10hmrzoSIvDOj0mAlEsTLkSTMJfyH9MqamrRqwY3AeSWCTFbRA2/f8 7iONX5+bBC/r9VnePwQ/5fbCGOm7H8ZMnoS2ruZD4NkBsP+tIuzg3mAqBSzXSkcMtB bcPJlemjthlhbuo4TqRijMcyEZp4MaseTFtsgatlCqh7tk/r9vKHv68oaiRylBBe7k mAKduGjLNngmQ== Date: Mon, 16 Sep 2024 19:59:27 +0000 To: bpf@vger.kernel.org From: Ihor Solodrai Cc: andrii@kernel.org, ast@kernel.org, daniel@iogearbox.net, eddyz87@gmail.com, mykolal@fb.com, bjorn@kernel.org Subject: [PATCH bpf-next 2/2] selftests/bpf: set vpath in Makefile to search for skels Message-ID: <20240916195919.1872371-2-ihor.solodrai@pm.me> In-Reply-To: <20240916195919.1872371-1-ihor.solodrai@pm.me> References: <20240916195919.1872371-1-ihor.solodrai@pm.me> Feedback-ID: 27520582:user:proton X-Pm-Message-ID: b02cb4556e3ac5faaa5ba24bbf2832ea00998c60 Precedence: bulk X-Mailing-List: bpf@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: bpf@iogearbox.net Auto-dependencies generated for %.test.o files refer to skels using filenames as opposed to full paths. This requires make to be able to link this name to an actual path, because not all generated skels are put in the working directory. In the original patch [1], this was mitigated by this target: $(notdir %.skel.h): $(TRUNNER_OUTPUT)/%.skel.h @true This turned out to be insufficient. First, %.lskel.h and %.subskel.h were missed, because a typical selftests/bpf build could find these files in the working directory. This error was detected by an out-of-tree build [2]. Second, even with missing rules added, this target causes unnecessary rebuilds in the out-of-tree case, as X.skel.h is searched for in the working directory, and not in the $(OUTPUT). Using vpath directive [3] is a better solution. Instead of introducing a separate target (X.skel.h in addition to $(TRUNNER_OUTPUT)/X.skel.h), make is instructed to search for skels in the output, which allows make to correctly detect that skel has already been generated. [1]: https://lore.kernel.org/bpf/VJihUTnvtwEgv_mOnpfy7EgD9D2MPNoHO-MlANeLIzLJPGhDeyOuGKIYyKgk0O6KPjfM-MuhtvPwZcngN8WFqbTnTRyCSMc2aMZ1ODm1T_g=@pm.me/ [2]: https://lore.kernel.org/bpf/CIjrhJwoIqMc2IhuppVqh4ZtJGbx8kC8rc9PHhAIU6RccnWT4I04F_EIr4GxQwxZe89McuGJlCnUk9UbkdvWtSJjAsd7mHmnTy9F8K2TLZM=@pm.me/ [3]: https://www.gnu.org/software/make/manual/html_node/Selective-Search.html Reported-by: Björn Töpel Signed-off-by: Ihor Solodrai Tested-by: Björn Töpel --- tools/testing/selftests/bpf/Makefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile index df75f1beb731..365740f24d2e 100644 --- a/tools/testing/selftests/bpf/Makefile +++ b/tools/testing/selftests/bpf/Makefile @@ -622,10 +622,11 @@ $(TRUNNER_BPF_SKELS_LINKED): $(TRUNNER_OUTPUT)/%: $$$$(%-deps) $(BPFTOOL) | $(TR # When the compiler generates a %.d file, only skel basenames (not # full paths) are specified as prerequisites for corresponding %.o -# file. This target makes %.skel.h basename dependent on full paths, -# linking generated %.d dependency with actual %.skel.h files. -$(notdir %.skel.h): $(TRUNNER_OUTPUT)/%.skel.h - @true +# file. vpath directives below instruct make to search for skel files +# in TRUNNER_OUTPUT, if they are not present in the working directory. +vpath %.skel.h $(TRUNNER_OUTPUT) +vpath %.lskel.h $(TRUNNER_OUTPUT) +vpath %.subskel.h $(TRUNNER_OUTPUT) endif