* [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-09-18 10:11 ` Vasileios Almpanis
2026-09-22 18:43 ` Konstantin Khorenko
2026-08-31 22:36 ` [Devel] [PATCH vz10 3/3] selftests: kvm: raise the timeout the suite gives each test Eva Kurchatova
` (3 subsequent siblings)
4 siblings, 2 replies; 10+ 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] 10+ messages in thread* Re: [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 2/3] selftests: cgroup: give the O_TMPFILE open in get_temp_fd() a mode Eva Kurchatova
@ 2026-09-18 10:11 ` Vasileios Almpanis
2026-09-22 18:43 ` Konstantin Khorenko
1 sibling, 0 replies; 10+ messages in thread
From: Vasileios Almpanis @ 2026-09-18 10:11 UTC (permalink / raw)
To: Eva Kurchatova; +Cc: devel
On Tue, 01 Sep 2026 01:36:23 +0300, Eva Kurchatova <eva.kurchatova@virtuozzo.com> wrote:
> 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
>
> [...]
Reviewed-by: Vasileios Almpanis <vasileios.almpanis@virtuozzo.com>
--
Vasileios Almpanis <vasileios.almpanis@virtuozzo.com>
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [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 2/3] selftests: cgroup: give the O_TMPFILE open in get_temp_fd() a mode Eva Kurchatova
2026-09-18 10:11 ` Vasileios Almpanis
@ 2026-09-22 18:43 ` Konstantin Khorenko
1 sibling, 0 replies; 10+ messages in thread
From: Konstantin Khorenko @ 2026-09-22 18:43 UTC (permalink / raw)
To: Eva Kurchatova; +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")
commit id from old branch
--
Konstantin Khorenko <khorenko@virtuozzo.com>
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
^ permalink raw reply [flat|nested] 10+ 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
2026-09-18 10:11 ` Vasileios Almpanis
2026-09-22 18:43 ` Konstantin Khorenko
2026-09-18 10:11 ` [Devel] [PATCH vz10 1/3] ms/KVM: selftests: Forcefully override ARCH from x86_64 to x86 Vasileios Almpanis
` (2 subsequent siblings)
4 siblings, 2 replies; 10+ 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] 10+ messages in thread* Re: [Devel] [PATCH vz10 3/3] selftests: kvm: raise the timeout the suite gives each test
2026-08-31 22:36 ` [Devel] [PATCH vz10 3/3] selftests: kvm: raise the timeout the suite gives each test Eva Kurchatova
@ 2026-09-18 10:11 ` Vasileios Almpanis
2026-09-22 18:43 ` Konstantin Khorenko
1 sibling, 0 replies; 10+ messages in thread
From: Vasileios Almpanis @ 2026-09-18 10:11 UTC (permalink / raw)
To: Eva Kurchatova; +Cc: devel
On Tue, 01 Sep 2026 01:36:24 +0300, Eva Kurchatova <eva.kurchatova@virtuozzo.com> wrote:
> 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
>
> [...]
Reviewed-by: Vasileios Almpanis <vasileios.almpanis@virtuozzo.com>
--
Vasileios Almpanis <vasileios.almpanis@virtuozzo.com>
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Devel] [PATCH vz10 3/3] selftests: kvm: raise the timeout the suite gives each test
2026-08-31 22:36 ` [Devel] [PATCH vz10 3/3] selftests: kvm: raise the timeout the suite gives each test Eva Kurchatova
2026-09-18 10:11 ` Vasileios Almpanis
@ 2026-09-22 18:43 ` Konstantin Khorenko
1 sibling, 0 replies; 10+ messages in thread
From: Konstantin Khorenko @ 2026-09-22 18:43 UTC (permalink / raw)
To: Eva Kurchatova; +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
Feature: fix selftests
--
Konstantin Khorenko <khorenko@virtuozzo.com>
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Devel] [PATCH vz10 1/3] ms/KVM: selftests: Forcefully override ARCH from x86_64 to x86
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
@ 2026-09-18 10:11 ` Vasileios Almpanis
2026-09-22 18:43 ` Konstantin Khorenko
2026-09-22 18:47 ` Konstantin Khorenko
4 siblings, 0 replies; 10+ messages in thread
From: Vasileios Almpanis @ 2026-09-18 10:11 UTC (permalink / raw)
To: Eva Kurchatova; +Cc: devel
On Tue, 01 Sep 2026 01:36:22 +0300, Eva Kurchatova <eva.kurchatova@virtuozzo.com> wrote:
> 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)
>
> [...]
Reviewed-by: Vasileios Almpanis <vasileios.almpanis@virtuozzo.com>
--
Vasileios Almpanis <vasileios.almpanis@virtuozzo.com>
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [Devel] [PATCH vz10 1/3] ms/KVM: selftests: Forcefully override ARCH from x86_64 to x86
2026-08-31 22:36 [Devel] [PATCH vz10 1/3] ms/KVM: selftests: Forcefully override ARCH from x86_64 to x86 Eva Kurchatova
` (2 preceding siblings ...)
2026-09-18 10:11 ` [Devel] [PATCH vz10 1/3] ms/KVM: selftests: Forcefully override ARCH from x86_64 to x86 Vasileios Almpanis
@ 2026-09-22 18:43 ` Konstantin Khorenko
2026-09-22 18:47 ` Konstantin Khorenko
4 siblings, 0 replies; 10+ messages in thread
From: Konstantin Khorenko @ 2026-09-22 18:43 UTC (permalink / raw)
To: Eva Kurchatova; +Cc: devel
On Tue, 01 Sep 2026 01:36:22 +0300, Eva Kurchatova <eva.kurchatova@virtuozzo.com> wrote:
> 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)
>
> [...]
Reviewed-by: Konstantin Khorenko <khorenko@virtuozzo.com>
--
Konstantin Khorenko <khorenko@virtuozzo.com>
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [Devel] [PATCH vz10 1/3] ms/KVM: selftests: Forcefully override ARCH from x86_64 to x86
2026-08-31 22:36 [Devel] [PATCH vz10 1/3] ms/KVM: selftests: Forcefully override ARCH from x86_64 to x86 Eva Kurchatova
` (3 preceding siblings ...)
2026-09-22 18:43 ` Konstantin Khorenko
@ 2026-09-22 18:47 ` Konstantin Khorenko
4 siblings, 0 replies; 10+ messages in thread
From: Konstantin Khorenko @ 2026-09-22 18:47 UTC (permalink / raw)
To: Eva Kurchatova; +Cc: devel
On Tue, 01 Sep 2026 01:36:22 +0300, Eva Kurchatova wrote:
> ms/KVM: selftests: Forcefully override ARCH from x86_64 to x86
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.2.vz10, thanks!
[1/3] ms/KVM: selftests: Forcefully override ARCH from x86_64 to x86
https://bitbucket.org/virtuozzocore/vzkernel.vzs/commits/ed7a49908a0c
[2/3] selftests: cgroup: give the O_TMPFILE open in get_temp_fd() a mode
https://bitbucket.org/virtuozzocore/vzkernel.vzs/commits/e51012a9f7b1
[3/3] selftests: kvm: raise the timeout the suite gives each test
https://bitbucket.org/virtuozzocore/vzkernel.vzs/commits/16432eda7d53
--
Konstantin Khorenko <khorenko@virtuozzo.com>
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
^ permalink raw reply [flat|nested] 10+ messages in thread