OpenVZ / Virtuozzo kernel development (devel@openvz.org)
 help / color / mirror / Atom feed
From: no-reply@sashiko.virtuozzo.com
To: Mirian Shilakadze <mirian.shilakadze@virtuozzo.com>,
	khorenko@virtuozzo.com, vladimir.riabchun@virtuozzo.com
Cc: devel@openvz.org
Subject: Re: [Devel] [PATCH hci-8.2 v2 2/3] selftests/ve: move ve_devcg_bpf into ve/ and reuse ve_selftest.h
Date: Thu, 19 Nov 2026 08:20:39 +0000	[thread overview]
Message-ID: <010701a1f2e4bec3-ed3e4f65-5aad-4b42-8342-8f4cfd21264d-000000@eu-central-1.amazonses.com> (raw)
In-Reply-To: <20261119081654.484107-3-mirian.shilakadze@virtuozzo.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] selftests/ve: ve_devcg_bpf fixture fails instead of skipping
  without cgroup2
--

commit e03e60874f39ad9941b752aa021d66a24b8a4706
Author: Mirian Shilakadze <mirian.shilakadze@virtuozzo.com>

selftests/ve: move ve_devcg_bpf into ve/ and reuse ve_selftest.h

This commit moves the ve_devcg_bpf test into tools/testing/selftests/ve/. It drops the test's private helpers (mount_cg2_fd, write_file_at, enter_cgroup, ctid search, VE cgroup creation) in favour of those in ve_selftest.h.

> diff --git a/tools/testing/selftests/ve_devcg_bpf/ve_devcg_bpf_test.c b/tools/testing/selftests/ve/ve_devcg_bpf_test.c
> similarity index 90%
> rename from tools/testing/selftests/ve_devcg_bpf/ve_devcg_bpf_test.c
> rename to tools/testing/selftests/ve/ve_devcg_bpf_test.c

[ ... ]

> @@ -592,11 +529,11 @@ FIXTURE_SETUP(ve_devcg_bpf)
>  	char ctid_str[16];
>  	char path[64];
>
> -	self->cgv2_fd = mount_cg2_fd();
> +	self->cgv2_fd = open_cg2_fd();
>  	ASSERT_GE(self->cgv2_fd, 0);

[Severity: Low]
Should a missing cgroup2 mount be a skip here rather than a failure?

If /sys/fs/cgroup is not a cgroup2 mount (a cgroup v1 or hybrid host, for example), open_cg2_fd() returns -1 with ENODEV. ASSERT_GE() then fails the fixture, and every TEST_F is reported as failed with no reason. The old private mount_cg2_fd() used fsopen/fsconfig/fsmount, so it did not depend on the host mount layout.

Skipping with a reason string when open_cg2_fd() fails would keep a missing prerequisite distinct from a real failure.

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/20261119081654.484107-2-mirian.shilakadze@virtuozzo.com?part=2

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

  reply	other threads:[~2026-11-19  8:21 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-19  8:16 [Devel] [PATCH hci-8.2 v2 0/3] selftests/ve: move ve_devcg_bpf and ve_printk into ve/ Mirian Shilakadze
2026-11-19  8:16 ` [Devel] [PATCH hci-8.2 v2 1/3] selftests/ve: open the host cgroup2 mount instead of creating one Mirian Shilakadze
2026-11-19  8:21   ` no-reply
2026-11-19 17:00   ` Konstantin Khorenko
2026-11-19  8:16 ` [Devel] [PATCH hci-8.2 v2 2/3] selftests/ve: move ve_devcg_bpf into ve/ and reuse ve_selftest.h Mirian Shilakadze
2026-11-19  8:20   ` no-reply [this message]
2026-11-19 17:00   ` Konstantin Khorenko
2026-11-19  8:16 ` [Devel] [PATCH hci-8.2 v2 3/3] selftests/ve: move ve_printk " Mirian Shilakadze
2026-11-19  8:22   ` no-reply
2026-11-19 17:00   ` Konstantin Khorenko
2026-11-19 17:00 ` [Devel] [PATCH hci-8.2 v2 0/3] selftests/ve: move ve_devcg_bpf and ve_printk into ve/ Konstantin Khorenko
2026-11-19 17:01 ` Konstantin Khorenko

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=010701a1f2e4bec3-ed3e4f65-5aad-4b42-8342-8f4cfd21264d-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=vladimir.riabchun@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox