mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: "Thomas Weißschuh" <thomas.weissschuh@linutronix.de>
Cc: "Nicolin Chen" <nicolinc@nvidia.com>,
	"Shuah Khan" <shuah@kernel.org>,
	"Shuah Khan" <skhan@linuxfoundation.org>,
	"Willy Tarreau" <w@1wt.eu>,
	"Thomas Weißschuh" <linux@weissschuh.net>,
	"Kees Cook" <kees@kernel.org>,
	"Andy Lutomirski" <luto@amacapital.net>,
	"Will Drewry" <wad@chromium.org>,
	"Mark Brown" <broonie@kernel.org>,
	"Muhammad Usama Anjum" <usama.anjum@collabora.com>,
	linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH v4 09/14] selftests: harness: Move teardown conditional into test metadata
Date: Tue, 10 Jun 2025 09:09:02 -0300	[thread overview]
Message-ID: <20250610120902.GB543171@nvidia.com> (raw)
In-Reply-To: <20250610130817-253d2b2d-030a-4eda-91fc-3edb58a4f549@linutronix.de>

On Tue, Jun 10, 2025 at 01:38:22PM +0200, Thomas Weißschuh wrote:
> Hi Nicolin,
> 
> On Mon, Jun 09, 2025 at 11:49:05PM -0700, Nicolin Chen wrote:
> > CC += Jason
> > 
> > On Mon, May 05, 2025 at 05:15:27PM +0200, Thomas Weißschuh wrote:
> > > To get rid of setjmp()/longjmp(), the teardown logic needs to be usable
> > > from __bail(). To access the atomic teardown conditional from there,
> > > move it into the test metadata.
> > > This also allows the removal of "setup_completed".
> > > 
> > > Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
> > > Acked-by: Shuah Khan <skhan@linuxfoundation.org>
> > 
> > Certain hugepage tests in iommufd selftest (CONFIG_IOMMUFD_TEST)
> > start to fail since v6.16-rc1, though the test functions weren't
> > changed during last cycle:
> 
> Thanks for the report.
> 
> > ------------------------------------------------------------------
> > #  RUN           iommufd_dirty_tracking.domain_dirty128M_huge.enforce_dirty ...
> > # enforce_dirty: Test terminated unexpectedly by signal 11

Sig 11 is weird..

> I can't reproduce this report.
> On my development machine or a virtme-ng VM I get the following failure:
> 
> 	# ./iommufd -r iommufd_dirty_tracking.domain_dirty128M_huge.enforce_dirty
> 	TAP version 13
> 	1..1
> 	# Starting 1 tests from 1 test cases.
> 	#  RUN           iommufd_dirty_tracking.domain_dirty128M_huge.enforce_dirty ...
> 	iommufd: iommufd.c:2042: iommufd_dirty_tracking_setup: Assertion `vrc == self->buffer' failed.
> 	# enforce_dirty: Test terminated by assertion
> 	#          FAIL  iommufd_dirty_tracking.domain_dirty128M_huge.enforce_dirty
> 	not ok 1 iommufd_dirty_tracking.domain_dirty128M_huge.enforce_dirty
> 	# FAILED: 0 / 1 tests passed.
> 	# Totals: pass:0 fail:1 xfail:0 xpass:0 skip:0 error:0
> 
> Specifically the mmap() fails with ENOMEM.
> 
> When booting the VM with "hugepages=100" the test succeeds.

Yes, that is required

> On another note, the selftest should use the kselftest_harness' ASSERT_*()
> macros instead of plain assert().

IIRC the kselftest stuff explodes if you try to use it's assert
functions within a fixture setup/teardown context.

I also wasn't able to reproduce this (x86 ubuntu 24 LTS OS) Maybe
it is ARM specific, I think Nicolin is running on ARM..

I did see the other warnings that Nicolin reported.

Jason

  reply	other threads:[~2025-06-10 12:09 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-05 15:15 [PATCH v4 00/14] kselftest harness and nolibc compatibility Thomas Weißschuh
2025-05-05 15:15 ` [PATCH v4 01/14] selftests: harness: Add kselftest harness selftest Thomas Weißschuh
2025-05-05 15:15 ` [PATCH v4 02/14] selftests: harness: Use C89 comment style Thomas Weißschuh
2025-05-05 15:15 ` [PATCH v4 03/14] selftests: harness: Ignore unused variant argument warning Thomas Weißschuh
2025-05-05 15:15 ` [PATCH v4 04/14] selftests: harness: Mark functions without prototypes static Thomas Weißschuh
2025-05-05 15:15 ` [PATCH v4 05/14] selftests: harness: Remove inline qualifier for wrappers Thomas Weißschuh
2025-05-05 15:15 ` [PATCH v4 06/14] selftests: harness: Remove dependency on libatomic Thomas Weißschuh
2025-05-05 15:15 ` [PATCH v4 07/14] selftests: harness: Implement test timeouts through pidfd Thomas Weißschuh
2025-05-05 15:15 ` [PATCH v4 08/14] selftests: harness: Don't set setup_completed for fixtureless tests Thomas Weißschuh
2025-05-05 15:15 ` [PATCH v4 09/14] selftests: harness: Move teardown conditional into test metadata Thomas Weißschuh
2025-06-10  6:49   ` Nicolin Chen
2025-06-10 11:38     ` Thomas Weißschuh
2025-06-10 12:09       ` Jason Gunthorpe [this message]
2025-06-10 18:48         ` Nicolin Chen
2025-06-10 23:46           ` Jason Gunthorpe
2025-06-11  7:05             ` Nicolin Chen
2025-06-11  8:04               ` Thomas Weißschuh
2025-06-11 17:19                 ` Nicolin Chen
2025-06-11 21:47                   ` Nicolin Chen
2025-06-11 23:43                     ` Nicolin Chen
2025-06-11 23:51                       ` Jason Gunthorpe
2025-06-12  6:59                         ` Nicolin Chen
2025-06-12 13:58                           ` Jason Gunthorpe
2025-06-12 14:27                             ` Thomas Weißschuh
2025-06-12 14:58                               ` Jason Gunthorpe
2025-06-12 15:23                                 ` Thomas Weißschuh
2025-06-12 15:42                                   ` Jason Gunthorpe
2025-06-12 17:53                                     ` Nicolin Chen
2025-06-12 18:53                                       ` Nicolin Chen
2025-06-12 18:56                                         ` Jason Gunthorpe
2025-06-12 19:03                                           ` Nicolin Chen
2025-06-12 23:31                                             ` Jason Gunthorpe
2025-06-13  5:55                                               ` Nicolin Chen
2025-06-11  6:53           ` Thomas Weißschuh
2025-05-05 15:15 ` [PATCH v4 10/14] selftests: harness: Add teardown callback to " Thomas Weißschuh
2025-05-05 15:15 ` [PATCH v4 11/14] selftests: harness: Add "variant" and "self" " Thomas Weißschuh
2025-05-05 15:15 ` [PATCH v4 12/14] selftests: harness: Stop using setjmp()/longjmp() Thomas Weißschuh
2025-06-10  6:40   ` Nicolin Chen
2025-06-10 12:21     ` Thomas Weißschuh
2025-06-10 23:13       ` Nicolin Chen
2025-05-05 15:15 ` [PATCH v4 13/14] selftests: harness: Guard includes on nolibc Thomas Weißschuh
2025-05-05 15:15 ` [PATCH v4 14/14] HACK: selftests/nolibc: demonstrate usage of the kselftest harness Thomas Weißschuh
2025-05-06  5:59   ` Mark Brown
2025-05-10  6:54 ` [PATCH v4 00/14] kselftest harness and nolibc compatibility Thomas Weißschuh
2025-05-12 21:32   ` Shuah Khan
2025-05-13  5:33     ` Thomas Weißschuh

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=20250610120902.GB543171@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=broonie@kernel.org \
    --cc=kees@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux@weissschuh.net \
    --cc=luto@amacapital.net \
    --cc=nicolinc@nvidia.com \
    --cc=shuah@kernel.org \
    --cc=skhan@linuxfoundation.org \
    --cc=thomas.weissschuh@linutronix.de \
    --cc=usama.anjum@collabora.com \
    --cc=w@1wt.eu \
    --cc=wad@chromium.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®