* [Devel] [PATCH hci-8.1] selftests/cgroup: make the lib directory an order-only prerequisite
@ 2026-10-27 20:31 Eva Kurchatova
2026-10-30 16:51 ` Konstantin Khorenko
0 siblings, 1 reply; 2+ messages in thread
From: Eva Kurchatova @ 2026-10-27 20:31 UTC (permalink / raw)
To: khorenko; +Cc: devel
cgroup_util.o depends on the directory it is written to, and a
directory's mtime moves whenever a file is created in it. The kvm
selftests write their own library objects to the same lib/ directory,
so it can end up newer than cgroup_util.o, and the next make rebuilds
cgroup_util.o and relinks every test that uses it.
That next make may run with other flags than the build: the kernel
package builds the selftests without the hardening flags and installs
them with them, and there the relink fails and the kvm tests are left
out of kernel-selftests-internal.
Make the directory an order-only prerequisite: it is still created
before the object, but its mtime no longer makes the object stale.
Fixes: 2c754a84ff16 ("cgroup: selftests: Move cgroup_util into its own library")
https://virtuozzo.atlassian.net/browse/VSTOR-152057
Feature: fix selftests
Signed-off-by: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
---
tools/testing/selftests/cgroup/lib/libcgroup.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/cgroup/lib/libcgroup.mk b/tools/testing/selftests/cgroup/lib/libcgroup.mk
index 7a73007204c3..bcf6fe251622 100644
--- a/tools/testing/selftests/cgroup/lib/libcgroup.mk
+++ b/tools/testing/selftests/cgroup/lib/libcgroup.mk
@@ -13,7 +13,7 @@ EXTRA_HDRS := $(selfdir)/clone3/clone3_selftests.h
$(LIBCGROUP_O_DIRS):
mkdir -p $@
-$(LIBCGROUP_O): $(OUTPUT)/%.o : $(CGROUP_DIR)/%.c $(EXTRA_HDRS) $(LIBCGROUP_O_DIRS)
+$(LIBCGROUP_O): $(OUTPUT)/%.o : $(CGROUP_DIR)/%.c $(EXTRA_HDRS) | $(LIBCGROUP_O_DIRS)
$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
EXTRA_CLEAN += $(LIBCGROUP_O)
--
2.56.0
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Devel] [PATCH hci-8.1] selftests/cgroup: make the lib directory an order-only prerequisite
2026-10-27 20:31 [Devel] [PATCH hci-8.1] selftests/cgroup: make the lib directory an order-only prerequisite Eva Kurchatova
@ 2026-10-30 16:51 ` Konstantin Khorenko
0 siblings, 0 replies; 2+ messages in thread
From: Konstantin Khorenko @ 2026-10-30 16:51 UTC (permalink / raw)
To: Eva Kurchatova; +Cc: devel
On Tue, 27 Oct 2026 22:31:04 +0200, Eva Kurchatova wrote:
> selftests/cgroup: make the lib directory an order-only prerequisite
Applied to branch-rh10-6.12.0-211.52.1.22.x.vz10-ovz, will be released in rh10-6.12.0-211.52.1.22.13.vz10, thanks!
[1/1] selftests/cgroup: make the lib directory an order-only prerequisite
https://bitbucket.org/virtuozzocore/vzkernel.vzs/commits/9549b2ddce6a
--
Konstantin Khorenko,
Virtuozzo Linux Kernel Team
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-10-30 16:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-27 20:31 [Devel] [PATCH hci-8.1] selftests/cgroup: make the lib directory an order-only prerequisite Eva Kurchatova
2026-10-30 16:51 ` Konstantin Khorenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox