[Devel] [PATCH hci-8.1 2/2] selftests/ve: check the AIO ring size in a pseudosuper VE

Konstantin Khorenko khorenko at virtuozzo.com
Fri Nov 13 22:41:41 MSK 2026


I won't apply this version, please send v2 with the changes below.

On Fri, 13 Nov 2026 16:08:45 +0100, Pavel Tikhomirov wrote:
> +	cpus = sysconf(_SC_NPROCESSORS_CONF);

Item 4 of the cover letter reply: read
/sys/devices/system/cpu/possible here.

Why: the kernel sizes the ring by cpu_possible_mask, and what
_SC_NPROCESSORS_CONF returns depends on the libc. On a VM with CPU
hotplug slots the two can differ, and the test then skips when it
should run, or expects the wrong ring size.

> +	self->ctid = make_ve(self->cgv2_fd, CTID_MIN);
> +	ASSERT_GE(self->ctid, 0);
> +
> +	ASSERT_EQ(prepare_namespaces(&self->ns_ctx, CLONE_NEWVE,

Item 5 of the cover letter reply: clean up the VE cgroup when setup
fails after make_ve().

Why: the harness skips FIXTURE_TEARDOWN when setup fails, so a failed
prepare_namespaces() leaves the VE cgroup in the host hierarchy.

> +	EXPECT_EQ(set_pseudosuper(self, 1), 0);
> +	EXPECT_EQ(ve_ring_nr(self, 1), ring_nr_pseudosuper(self, 1));

Item 5 of the cover letter reply: ASSERT_EQ here.

Why: if the write fails, the test goes on and reports a ring size
mismatch, which hides the cause.

-- 
Konstantin Khorenko,
Virtuozzo Linux Kernel Team



More information about the Devel mailing list