* [Devel] [PATCH vz10 1/3] ms/KVM: selftests: Forcefully override ARCH from x86_64 to x86
@ 2026-08-31 22:36 Eva Kurchatova
2026-08-31 22:36 ` [Devel] [PATCH vz10 2/3] selftests: cgroup: give the O_TMPFILE open in get_temp_fd() a mode Eva Kurchatova
2026-08-31 22:36 ` [Devel] [PATCH vz10 3/3] selftests: kvm: raise the timeout the suite gives each test Eva Kurchatova
0 siblings, 2 replies; 3+ messages in thread
From: Eva Kurchatova @ 2026-08-31 22:36 UTC (permalink / raw)
To: khorenko; +Cc: devel
From: Sean Christopherson <seanjc@google.com>
Forcefully override ARCH from x86_64 to x86 to handle the scenario where
the user specifies ARCH=x86_64 on the command line.
Fixes: 9af04539d474 ("KVM: selftests: Override ARCH for x86_64 instead of using ARCH_DIR")
Cc: stable@vger.kernel.org
Reported-by: David Matlack <dmatlack@google.com>
Closes: https://lore.kernel.org/all/20250724213130.3374922-1-dmatlack@google.com
Link: https://lore.kernel.org/r/20251007223057.368082-1-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
(cherry picked from commit 17e5a9b77716564540d81f0c1e6082d28cf305c9)
https://virtuozzo.atlassian.net/browse/VSTOR-139672
Feature: fix selftests
Signed-off-by: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
---
tools/testing/selftests/kvm/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/kvm/Makefile b/tools/testing/selftests/kvm/Makefile
index 20af35a91d6f..4e85f3634e2e 100644
--- a/tools/testing/selftests/kvm/Makefile
+++ b/tools/testing/selftests/kvm/Makefile
@@ -6,7 +6,7 @@ ARCH ?= $(SUBARCH)
ifeq ($(ARCH),$(filter $(ARCH),arm64 s390 riscv x86 x86_64))
# Top-level selftests allows ARCH=x86_64 :-(
ifeq ($(ARCH),x86_64)
- ARCH := x86
+ override ARCH := x86
endif
include Makefile.kvm
else
--
2.55.0
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
^ permalink raw reply [flat|nested] 3+ messages in thread* [Devel] [PATCH vz10 2/3] selftests: cgroup: give the O_TMPFILE open in get_temp_fd() a mode
2026-08-31 22:36 [Devel] [PATCH vz10 1/3] ms/KVM: selftests: Forcefully override ARCH from x86_64 to x86 Eva Kurchatova
@ 2026-08-31 22:36 ` Eva Kurchatova
2026-08-31 22:36 ` [Devel] [PATCH vz10 3/3] selftests: kvm: raise the timeout the suite gives each test Eva Kurchatova
1 sibling, 0 replies; 3+ messages in thread
From: Eva Kurchatova @ 2026-08-31 22:36 UTC (permalink / raw)
To: khorenko; +Cc: devel
O_TMPFILE, like O_CREAT, needs the third argument. Without it glibc
refuses the call at compile time as soon as fortification is on:
In function 'open',
inlined from 'get_temp_fd' at cgroup_util.c:24:9:
/usr/include/bits/fcntl2.h:50:11: error: call to '__open_missing_mode'
declared with attribute error: open with O_CREAT or O_TMPFILE in
second argument needs 3 arguments
cgroup/Makefile builds with "-Wall -pthread" and the fortify checks
take effect only once the compiler optimises, so the cgroup target
builds. kvm includes ../cgroup/lib/libcgroup.mk and does
build with -O2, so the shared object fails there and takes the whole
kvm target with it. Building with -D_FORTIFY_SOURCE=3, as distributions
commonly do, therefore loses every kvm test rather than anything in
cgroup.
Fixes: 844934d16dbc ("selftests/cgroup: move get_temp_fd() to the shared cgroup lib")
https://virtuozzo.atlassian.net/browse/VSTOR-139672
Feature: fix selftests
Signed-off-by: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
---
tools/testing/selftests/cgroup/lib/cgroup_util.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/cgroup/lib/cgroup_util.c b/tools/testing/selftests/cgroup/lib/cgroup_util.c
index 9a677fdf0bf6..8f996b54849e 100644
--- a/tools/testing/selftests/cgroup/lib/cgroup_util.c
+++ b/tools/testing/selftests/cgroup/lib/cgroup_util.c
@@ -21,7 +21,7 @@
int get_temp_fd(void)
{
- return open(".", O_TMPFILE | O_RDWR | O_EXCL);
+ return open(".", O_TMPFILE | O_RDWR | O_EXCL, 0600);
}
/* Returns read len on success, or -errno on failure. */
--
2.55.0
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
^ permalink raw reply [flat|nested] 3+ messages in thread* [Devel] [PATCH vz10 3/3] selftests: kvm: raise the timeout the suite gives each test
2026-08-31 22:36 [Devel] [PATCH vz10 1/3] ms/KVM: selftests: Forcefully override ARCH from x86_64 to x86 Eva Kurchatova
2026-08-31 22:36 ` [Devel] [PATCH vz10 2/3] selftests: cgroup: give the O_TMPFILE open in get_temp_fd() a mode Eva Kurchatova
@ 2026-08-31 22:36 ` Eva Kurchatova
1 sibling, 0 replies; 3+ messages in thread
From: Eva Kurchatova @ 2026-08-31 22:36 UTC (permalink / raw)
To: khorenko; +Cc: devel
kvm/settings asks for 120 seconds per test, which mmu_stress_test cannot
meet on any machine. It writes a 128gb guest address space by default,
and the size is settable only on the command line, which the kselftest
runner does not pass:
not ok 1 selftests: kvm: mmu_stress_test # TIMEOUT 300 seconds
It is not stuck, it is long, and how long depends on how many vCPUs it
gets, which is 3/4 of the cpus of the machine. Measured to completion,
all passing:
40 cpus, 30 vCPUs 171s
4 cpus, 3 vCPUs 436s
2 cpus, 1 vCPU 1094s
Ask for 1800 seconds, which leaves room above the slowest of those for a
machine that is also busy. The cost is that the limit applies to every
test in the suite, so a test that really does hang now takes that long
to be killed; nothing else in the suite runs for more than a few tens of
seconds today.
A timeout given on the runner command line replaces this value
entirely, so it has to be at least as large.
https://virtuozzo.atlassian.net/browse/VSTOR-139672
Feature: fix vz selftests
Signed-off-by: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
---
tools/testing/selftests/kvm/settings | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/kvm/settings b/tools/testing/selftests/kvm/settings
index 6091b45d226b..abc5648b59ab 100644
--- a/tools/testing/selftests/kvm/settings
+++ b/tools/testing/selftests/kvm/settings
@@ -1 +1 @@
-timeout=120
+timeout=1800
--
2.55.0
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-08-31 22:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-31 22:36 [Devel] [PATCH vz10 1/3] ms/KVM: selftests: Forcefully override ARCH from x86_64 to x86 Eva Kurchatova
2026-08-31 22:36 ` [Devel] [PATCH vz10 2/3] selftests: cgroup: give the O_TMPFILE open in get_temp_fd() a mode Eva Kurchatova
2026-08-31 22:36 ` [Devel] [PATCH vz10 3/3] selftests: kvm: raise the timeout the suite gives each test Eva Kurchatova
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.