Re: [PATCH v2 2/2] selftests/cgroup: Make the object directory an order-only prerequisite
From: Michal Koutný
Date: Tue Sep 22 2026 - 10:07:23 EST
On Tue, Sep 22, 2026 at 08:19:45AM +0100, Fuad Tabba <fuad.tabba@xxxxxxxxx> wrote:
> libcgroup.mk names $(LIBCGROUP_O_DIRS) as a regular prerequisite of
> cgroup_util.o. The directory's mtime moves whenever an object is
> created or replaced in it, so an incremental KVM selftests build that
> rebuilt anything in lib/ recompiles cgroup_util.o and relinks every
> test on the following run.
I'd expect the other test would recompile stuff in lib/ but not in
cgroup/lib/, however that distinction is likely lost when $(OUTPUT) is
expanded from the included *.mk file.
> Make the directory order-only, as libvfio.mk does.
Sensible approach given that vfio.
>
> Fixes: 2c754a84ff16a ("cgroup: selftests: Move cgroup_util into its own library")
> Assisted-by: LLM
> Signed-off-by: Fuad Tabba <fuad.tabba@xxxxxxxxx>
> ---
> tools/testing/selftests/cgroup/lib/libcgroup.mk | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Acked-by: Michal Koutný <mkoutny@xxxxxxxx>
Attachment:
signature.asc
Description: PGP signature