Re: [PATCH v5 3/4] selftests: cgroup: Add vmtest-dmem runner script

Eric Chanudet <[email protected]>
Newsgroups org.kernel.vger.cgroups,org.kernel.vger.linux-kernel,org.kernel.vger.linux-kselftest
Message-ID <ak-gNsQ8vi7yDJsm@x1nano>
On Mon, Jul 06, 2026 at 02:06:42PM +0200, Albert Esteve wrote:
> Currently, test_dmem relies on the dmem_selftest helper module
> and a VM setup that may not have the helper preinstalled.
> This makes automated coverage of dmem charge paths harder in
> virtme-based runs.
> 
> Add tools/testing/selftests/cgroup/vmtest-dmem.sh to provide a
> repeatable VM workflow for dmem tests. The script uses vng --exec
> to run the test directly inside a virtme-ng guest with minimal
> setup.
> 
> The script boots a virtme-ng guest, validates dmem controller
> availability, ensures the dmem helper path is present, and runs
> tools/testing/selftests/cgroup/test_dmem. If the helper is not
> available as a loaded module, it attempts module build/load for
> the running guest kernel before executing the test binary.
> 
> The runner also supports interactive shell mode (-s) and reuses
> the verbosity and KTAP exit-code conventions used by other vmtest
> scripts, so it integrates with existing kselftest workflows.
> 
> vmtest-dmem.sh is placed in TEST_FILES rather than TEST_PROGS so
> it is installed alongside the test suite but not invoked
> automatically by run_kselftest.sh. It requires a VM-capable host
> and is intended to be run manually.
> 
> Signed-off-by: Albert Esteve <[email protected]>

Reviewed-by: Eric Chanudet <[email protected]>

-- 
Eric Chanudet
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.