Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
From: Boqun Feng <boqun.feng@gmail.com>
To: Tamir Duberstein <tamird@gmail.com>
Cc: David Gow <davidgow@google.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>, Will Deacon <will@kernel.org>,
	Waiman Long <longman@redhat.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Shuah Khan <shuah@kernel.org>,
	Nathan Chancellor <nathan@kernel.org>,
	Nick Desaulniers <ndesaulniers@google.com>,
	Bill Wendling <morbo@google.com>,
	Justin Stitt <justinstitt@google.com>,
	linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
	llvm@lists.linux.dev
Subject: Re: [PATCH] ww_mutex: convert self-test to KUnit
Date: Tue, 11 Feb 2025 14:37:21 -0800	[thread overview]
Message-ID: <Z6vRIZk7DsSNooFZ@boqun-archlinux> (raw)
In-Reply-To: <20250210-ww_mutex-kunit-convert-v1-1-972f0201f71e@gmail.com>

Hi Tamir,

On Mon, Feb 10, 2025 at 10:59:12AM -0500, Tamir Duberstein wrote:
> Convert this unit test to a KUnit test.
> 

I would like to know the pros and cons between kunit tests and
kselftests, maybe someone Cced can answer that? It'll be good to put
these in the commit log as well.

Regards,
Boqun

> Signed-off-by: Tamir Duberstein <tamird@gmail.com>
> ---
> I tested this using:
> $ tools/testing/kunit/kunit.py run --arch arm64 --make_options LLVM=1 ww_mutex
> 
> On success:
> ; [12:48:16] ================== ww_mutex (5 subtests) ===================
> ; [12:48:16] ======================= test_mutex  ========================
> ; [12:48:16] [PASSED] flags=0
> ; [12:48:16] [PASSED] flags=1
> ; [12:48:16] [PASSED] flags=2
> ; [12:48:16] [PASSED] flags=3
> ; [12:48:16] [PASSED] flags=4
> ; [12:48:17] [PASSED] flags=5
> ; [12:48:17] [PASSED] flags=6
> ; [12:48:17] [PASSED] flags=7
> ; [12:48:17] =================== [PASSED] test_mutex ====================
> ; [12:48:17] ========================= test_aa  =========================
> ; [12:48:17] [PASSED] lock
> ; [12:48:17] [PASSED] trylock
> ; [12:48:17] ===================== [PASSED] test_aa =====================
> ; [12:48:17] ======================== test_abba  ========================
> ; [12:48:17] [PASSED] trylock=0,resolve=0
> ; [12:48:17] [PASSED] trylock=1,resolve=1
> ; [12:48:17] [PASSED] trylock=0,resolve=0
> ; [12:48:17] [PASSED] trylock=1,resolve=1
> ; [12:48:17] ==================== [PASSED] test_abba ====================
> ; [12:48:17] ======================= test_cycle  ========================
> ; [12:48:17] [PASSED] nthreads=2
> ; [12:48:17] =================== [PASSED] test_cycle ====================
> ; [12:48:21] ========================= stress  ==========================
> ; [12:48:21] [PASSED] nlocks=16,nthreads_per_cpu=2,flags=1
> ; [12:48:23] [PASSED] nlocks=16,nthreads_per_cpu=2,flags=2
> ; [12:48:23] [PASSED] nlocks=2046,nthreads_per_cpu=3,flags=7
> ; [12:48:23] ===================== [PASSED] stress ======================
> ; [12:48:23] ==================== [PASSED] ww_mutex =====================
> ; [12:48:23] ============================================================
> ; [12:48:23] Testing complete. Ran 18 tests: passed: 18
> 
> On failure:
> ---
[...]

  reply	other threads:[~2025-02-11 22:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-10 15:59 [PATCH] ww_mutex: convert self-test to KUnit Tamir Duberstein
2025-02-11 22:37 ` Boqun Feng [this message]
2025-02-11 22:42   ` Tamir Duberstein
2025-02-12  9:25     ` David Gow
2025-02-12 11:53 ` Dan Carpenter
2025-02-12 14:33   ` Tamir Duberstein
2025-02-12 15:31     ` Dan Carpenter

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=Z6vRIZk7DsSNooFZ@boqun-archlinux \
    --to=boqun.feng@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=davidgow@google.com \
    --cc=justinstitt@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=longman@redhat.com \
    --cc=mingo@redhat.com \
    --cc=morbo@google.com \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=peterz@infradead.org \
    --cc=shuah@kernel.org \
    --cc=tamird@gmail.com \
    --cc=will@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox