From: no-reply@sashiko.virtuozzo.com
To: Konstantin Khorenko <khorenko@virtuozzo.com>,
Mirian Shilakadze <mirian.shilakadze@virtuozzo.com>,
Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Cc: devel@openvz.org
Subject: Re: [Devel] [PATCH hci-8.2 v2 2/2] selftests/ve: check a host task entering a pseudosuper VE reaches its init
Date: Fri, 20 Nov 2026 13:21:52 +0000 [thread overview]
Message-ID: <010701a1f91edfb5-5e9bfba9-732d-4c68-bead-bf325a0c5452-000000@eu-central-1.amazonses.com> (raw)
In-Reply-To: <20261120-b4-prep-khorenko-vstor-156164-ve-setup-task-pseudosuper-v2-2-c85e827c1dba@virtuozzo.com>
Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [Low] selftests/ve: start_ve() failure paths can leave a stale errno
for the setup diagnostic
- [Low] selftests/ve: cgv2_fd not closed when subtree_control write
fails in FIXTURE_SETUP
--
commit 4c9fa60ac35eb44ea45b0c336380a4e3e3c6cbba
Author: Konstantin Khorenko <khorenko@virtuozzo.com>
selftests/ve: check a host task entering a pseudosuper VE reaches its init
This adds a selftest that starts a VE with ve.pseudosuper set, the way
libvzctl does. It checks that a host task entering the VE through the ve
namespace can reach the init, and that a binary exec'd inside the VE
cannot.
> diff --git a/tools/testing/selftests/ve/ve_setup_task_test.c b/tools/testing/selftests/ve/ve_setup_task_test.c
> new file mode 100644
> index 0000000000000..4d18ba3d57104
> --- /dev/null
> +++ b/tools/testing/selftests/ve/ve_setup_task_test.c
[ ... ]
> + *what = "ve.state is not RUNNING";
> + if (ve_read(self, "ve.state", state, sizeof(state)) <= 0 ||
> + strncmp(state, "RUNNING", 7))
> + return -1;
[Severity: Low]
Can this report a misleading reason when the start fails? This branch
returns -1 without setting errno. The "ret != 1" branch after the read()
of the status pipe does the same.
FIXTURE_SETUP then prints strerror(err) from whatever errno an earlier
call left behind. A stale EACCES would look like the failure this test
is meant to detect. Would setting errno (or passing the error back
separately) in these branches fix the diagnostic?
[ ... ]
> + if (write_file_at(self->cgv2_fd, "cgroup.subtree_control",
> + VE_CONTROLLERS) < 0)
> + SKIP(return, "cannot enable the ve controller: %s",
> + strerror(errno));
[Severity: Low]
Is self->cgv2_fd leaked on this SKIP path? FIXTURE_TEARDOWN returns early
because self->ctid is still -1, so nothing closes the fd. The other
failure path in this function does close it. Closing it before SKIP()
would keep the lifetime consistent.
Carry the trailer below into the next revision and Sashiko will not review this patch again.
Reviewed-by: Sashiko <no-reply@sashiko.virtuozzo.com>
--
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261120-b4-prep-khorenko-vstor-156164-ve-setup-task-pseudosuper-v2-0-c85e827c1dba@virtuozzo.com?part=2
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
next prev parent reply other threads:[~2026-11-20 13:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-20 13:15 [Devel] [PATCH hci-8.2 v2 0/2] ve: Container start on the 26.3 kernel with libvzctl before 10.0.144 Konstantin Khorenko
2026-11-20 13:15 ` [Devel] [PATCH hci-8.2 v2 1/2] ve: trust every host task of a pseudosuper VE until it execs Konstantin Khorenko
2026-11-20 13:19 ` no-reply
2026-11-20 13:43 ` Mirian Shilakadze
2026-11-20 13:15 ` [Devel] [PATCH hci-8.2 v2 2/2] selftests/ve: check a host task entering a pseudosuper VE reaches its init Konstantin Khorenko
2026-11-20 13:21 ` no-reply [this message]
2026-11-20 13:47 ` Mirian Shilakadze
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=010701a1f91edfb5-5e9bfba9-732d-4c68-bead-bf325a0c5452-000000@eu-central-1.amazonses.com \
--to=no-reply@sashiko.virtuozzo.com \
--cc=devel@openvz.org \
--cc=khorenko@virtuozzo.com \
--cc=mirian.shilakadze@virtuozzo.com \
--cc=ptikhomirov@virtuozzo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.