From: Petr Vorel <pvorel@suse.cz>
To: "Minear, Coey" <coey.minear@hpe.com>
Cc: Martin Doucha <martin.doucha@suse.com>,
"ltp@lists.linux.it" <ltp@lists.linux.it>
Subject: Re: [LTP] Possible fix for LTP Issue #1219
Date: Tue, 28 Jan 2025 13:26:06 +0100 [thread overview]
Message-ID: <20250128122606.GA366018@pevik> (raw)
In-Reply-To: <MN0PR84MB3022EFF407AA0C3130EE9728EAEC2@MN0PR84MB3022.NAMPRD84.PROD.OUTLOOK.COM>
Hi Coey,
> I created an issue against LTP: https://github.com/linux-test-project/ltp/issues/1219. ‘pevik’ suggested that I send a patch here. I’ll admit that I’m uncertain what form would be preferred, but here’s what I’ll share:
> [[PATCH]]
FYI commit message like this is not much helpful (usually the reason for the
change is important to describe, you don't put your Signed-off-by:), but we can
fix it before merge.
> diff --git a/testcases/kernel/kvm/kvm_pagefault01.c b/testcases/kernel/kvm/kvm_pagefault01.c
> index 16b3137c0..649bf429a 100644
> --- a/testcases/kernel/kvm/kvm_pagefault01.c
> +++ b/testcases/kernel/kvm/kvm_pagefault01.c
> @@ -214,6 +214,10 @@ static struct tst_test test = {
> .setup = setup,
> .cleanup = tst_kvm_cleanup,
> .needs_root = 1,
> + .needs_drivers = (const char *const []) {
> + "kvm",
> + NULL
> + },
> .supported_archs = (const char *const []) {
> "x86_64",
> NULL
> diff --git a/testcases/kernel/kvm/kvm_svm01.c b/testcases/kernel/kvm/kvm_svm01.c
> index 32d15526b..f81602567 100644
> --- a/testcases/kernel/kvm/kvm_svm01.c
> +++ b/testcases/kernel/kvm/kvm_svm01.c
> @@ -108,6 +108,10 @@ static struct tst_test test = {
> .test_all = tst_kvm_run,
> .setup = tst_kvm_setup,
> .cleanup = tst_kvm_cleanup,
> + .needs_drivers = (const char *const []) {
> + "kvm",
> + NULL
> + },
> .supported_archs = (const char *const []) {
> "x86_64",
> "x86",
> diff --git a/testcases/kernel/kvm/kvm_svm02.c b/testcases/kernel/kvm/kvm_svm02.c
> index 6914fdcba..701f2731d 100644
> --- a/testcases/kernel/kvm/kvm_svm02.c
> +++ b/testcases/kernel/kvm/kvm_svm02.c
> @@ -129,6 +129,10 @@ static struct tst_test test = {
> .test_all = tst_kvm_run,
> .setup = tst_kvm_setup,
> .cleanup = tst_kvm_cleanup,
> + .needs_drivers = (const char *const []) {
> + "kvm",
> + NULL
> + },
> .supported_archs = (const char *const []) {
> "x86_64",
> "x86",
> diff --git a/testcases/kernel/kvm/kvm_svm03.c b/testcases/kernel/kvm/kvm_svm03.c
> index 87164d013..87f9887d8 100644
> --- a/testcases/kernel/kvm/kvm_svm03.c
> +++ b/testcases/kernel/kvm/kvm_svm03.c
> @@ -88,6 +88,9 @@ static void *vm_thread(void *arg)
> static void setup(void)
> {
> + /* Run the common 'tst_kvm_setup()' first. */
> + tst_kvm_setup();
IMHO "kvm" in .needs_drivers is enough, but I might be wrong.
@Martin?
> +
> struct sigaction sa = { .sa_handler = sighandler };
> pthread_mutexattr_t attr;
> @@ -155,6 +158,10 @@ static struct tst_test test = {
> .setup = setup,
> .cleanup = cleanup,
> .min_cpus = 2,
> + .needs_drivers = (const char *const []) {
> + "kvm",
> + NULL
> + },
> .supported_archs = (const char *const []) {
> "x86_64",
> "x86",
> diff --git a/testcases/kernel/kvm/kvm_svm04.c b/testcases/kernel/kvm/kvm_svm04.c
> index e69f0d4be..d8d3bdd96 100644
> --- a/testcases/kernel/kvm/kvm_svm04.c
> +++ b/testcases/kernel/kvm/kvm_svm04.c
> @@ -297,6 +297,10 @@ static struct tst_test test = {
> .test_all = tst_kvm_run,
> .setup = tst_kvm_setup,
> .cleanup = tst_kvm_cleanup,
> + .needs_drivers = (const char *const []) {
> + "kvm",
> + NULL
> + },
> .supported_archs = (const char *const []) {
> "x86_64",
> "x86",
> diff --git a/testcases/kernel/kvm/lib_host.c b/testcases/kernel/kvm/lib_host.c
> index 8e3d6094e..17215c23b 100644
> --- a/testcases/kernel/kvm/lib_host.c
> +++ b/testcases/kernel/kvm/lib_host.c
> @@ -323,7 +323,14 @@ void tst_kvm_clear_guest_signal(struct tst_kvm_instance *inst)
> void tst_kvm_setup(void)
> {
> -
> + /* Do a quick check that the 'kvm' module is actually loaded by
> + checking for '/dev/kvm'. If that device file is not present, then
> + the module is likely not loaded in which case we should just CONF
> + out.
> + */
> + if (access("/dev/kvm", F_OK) != 0) {
> + tst_brk(TCONF, "The test requires 'kvm' device, which is not loaded.");
> + }
Therefore I would remove this.
Kind regards,
Petr
> }
> void tst_kvm_run(void)
> [[/PATCH]]
> I’ll admit that this possibly contains parts that you may not want, but it includes the parts of the issue that I raised.
> Coey Minear
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2025-01-28 12:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-27 18:11 [LTP] Possible fix for LTP Issue #1219 Minear, Coey via ltp
2025-01-28 12:26 ` Petr Vorel [this message]
2025-01-28 13:40 ` Martin Doucha
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=20250128122606.GA366018@pevik \
--to=pvorel@suse.cz \
--cc=coey.minear@hpe.com \
--cc=ltp@lists.linux.it \
--cc=martin.doucha@suse.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.