All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Williamson <alex@shazbot.org>
To: David Matlack <dmatlack@google.com>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-kselftest@vger.kernel.org, stable@vger.kernel.org,
	Abhishek Sahu <abhsahu@nvidia.com>,
	Raghavendra Rao Ananta <rananta@google.com>,
	Shuah Khan <shuah@kernel.org>,
	alex@shazbot.org
Subject: Re: [PATCH 4/5] vfio: selftests: Add sysfs_kernel_warn_count_get()
Date: Tue, 10 Nov 2026 10:34:34 -0700	[thread overview]
Message-ID: <20261110103434.48709eba@shazbot.org> (raw)
In-Reply-To: <20261029203324.1637772-5-dmatlack@google.com>

On Thu, 29 Oct 2026 20:33:23 +0000
David Matlack <dmatlack@google.com> wrote:

> Add a helper to read /sys/kernel/warn_count, which counts the number of
> warnings (e.g. WARN(), KASAN, and UBSAN reports) the kernel has
> encountered since boot. Return a negative value if the file does not
> exist, e.g. on kernels that predate it.
> 
> Factor the code to read an integer from a sysfs file out of
> sysfs_val_get_int() so that it can be shared by both helpers.
> 
> This will be used in a subsequent commit to detect kernel warnings
> triggered by tests.
> 
> Signed-off-by: David Matlack <dmatlack@google.com>
> ---
>  .../vfio/lib/include/libvfio/sysfs.h          |  7 +++++++
>  tools/testing/selftests/vfio/lib/sysfs.c      | 19 +++++++++++++++----
>  2 files changed, 22 insertions(+), 4 deletions(-)

I have a concern with this approach.  I run selftests in parallel as
much as possible, using multiple devices, each targeted at specific
tests, with other functional and performance tests running
concurrently.  When wiring this into my harness, I initially saw a
failure, but can't reproduce and have no log from the original event.

I've updated my local CI to keep a console log so that I might have a
chance of chasing the next instance, but I don't much like the fact
that any warning occurring concurrently with this test can trigger a
failure and the test doesn't provide anything to go on in the test logs
themselves.  Thanks,

Alex

  reply	other threads:[~2026-11-10 17:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-29 20:33 [PATCH 0/5] vfio/pci: Fix power state race with SR-IOV enablement David Matlack
2026-10-29 20:33 ` [PATCH 1/5] vfio/pci: Hold memory_lock for all calls to vfio_pci_set_power_state() David Matlack
2026-10-29 20:33 ` [PATCH 2/5] vfio/pci: Annotate lockless accesses to vdev->sriov_active David Matlack
2026-10-29 20:33 ` [PATCH 3/5] vfio: selftests: Add vfio_pci_find_capability() David Matlack
2026-10-29 20:33 ` [PATCH 4/5] vfio: selftests: Add sysfs_kernel_warn_count_get() David Matlack
2026-11-10 17:34   ` Alex Williamson [this message]
2026-11-11 20:07     ` David Matlack
2026-10-29 20:33 ` [PATCH 5/5] vfio: selftests: Add test for device power state transitions David Matlack
2026-11-03 22:35   ` Alex Williamson
2026-11-04 18:15     ` David Matlack

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=20261110103434.48709eba@shazbot.org \
    --to=alex@shazbot.org \
    --cc=abhsahu@nvidia.com \
    --cc=dmatlack@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=rananta@google.com \
    --cc=shuah@kernel.org \
    --cc=stable@vger.kernel.org \
    /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.