Linux Test Project
 help / color / mirror / Atom feed
From: linuxtestproject.agent@gmail.com
To: Darren Chang <chihsheng@google.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] tst_virt: Add fallback KVM detection via virtio block devices
Date: Wed,  6 May 2026 15:07:53 +0000	[thread overview]
Message-ID: <20260506150753.3949-1-linuxtestproject.agent@gmail.com> (raw)
In-Reply-To: <20260502081446.10472-1-chihsheng@google.com>

Hi Darren,

On 2026-05-02, Darren Chang wrote:
> tst_virt: Add fallback KVM detection via virtio block devices

> +       /* * Fallback check for KVM:
> +        * Android's ueventd creates block devices in /dev/block/
> +        * instead of the standard Linux /dev/, so we check both.
> +        */

Malformed comment block. The `/*` opener must be on its own line with no
text. Use:

	/*
	 * Fallback check for KVM:
	 * ...
	 */

> +       if (!found) {
> +               if (access("/dev/vda", F_OK) == 0 ||
> +                       access("/sys/block/vda", F_OK) == 0 ||
> +                       access("/dev/block/vda", F_OK) == 0) {
> +                       found = 1;
> +               }
> +       }

Virtio block devices are not KVM-exclusive. Hyper-V and VMware guests with
virtio drivers also expose /dev/vda, so this will produce false positives.
Either narrow the detection (e.g. check /sys/class/dmi/id/product_name for
QEMU/KVM) or explicitly document this as a best-effort heuristic.

---
Note:

Our agent completed the review of the patch. The full review can be
found at: (not available)

The agent can sometimes produce false positives although often its
findings are genuine. If you find issues with the review, please
comment this email or ignore the suggestions.

Regards,
LTP AI Reviewer

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

      reply	other threads:[~2026-05-06 15:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-02  8:14 [LTP] [PATCH] tst_virt: Add fallback KVM detection via virtio block devices Darren Chang via ltp
2026-05-06 15:07 ` linuxtestproject.agent [this message]

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=20260506150753.3949-1-linuxtestproject.agent@gmail.com \
    --to=linuxtestproject.agent@gmail.com \
    --cc=chihsheng@google.com \
    --cc=ltp@lists.linux.it \
    /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