From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 993E5C433EF for ; Fri, 13 May 2022 03:06:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376706AbiEMDF7 (ORCPT ); Thu, 12 May 2022 23:05:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49908 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376669AbiEMDFt (ORCPT ); Thu, 12 May 2022 23:05:49 -0400 Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD9E95FE7; Thu, 12 May 2022 20:05:42 -0700 (PDT) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4KztnF5GpFz4xR7; Fri, 13 May 2022 13:05:37 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ellerman.id.au; s=201909; t=1652411138; bh=fC2GGkZ6i1/eN+A/UO95n84TneECFcVdKhwj/auxTZY=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=qw7Q0Cqcx1/V91zdI8RMOi066QNsHEmIm/HkytZtdFLlJiZS0bty8HG2DknIg2KS2 bHAixUSeOjosvQtCQcFczSNbz47Xdrkd6A3ky+O1VBL+uqCXriZ1ObHk+1DaUGAuJD AIVYtmLDi6fvIwFaU5mfbQYg5gj2dBlKc5KhhVlowKVaR/ogRLkvE62CPYKtCdUhpc 5xY7/Wfpty5Q/N1GbClkBwlxz9x/eWytE4g6oDudmm0W54UREbC3VzBjLtGrkzDPVN Z/51MUN26hOvXoSMLyZtv0ifr38DtuhcBFi0i62RYOtchm3Fw3lYoTVP7fTY9OxUG/ zafJQ7igNgE+w== From: Michael Ellerman To: Daniel Latypov , brendanhiggins@google.com, davidgow@google.com Cc: linux-kernel@vger.kernel.org, kunit-dev@googlegroups.com, linux-kselftest@vger.kernel.org, skhan@linuxfoundation.org, Daniel Latypov Subject: Re: [PATCH] lib/atomic64_test.c: convert to use KUnit In-Reply-To: <20220502192327.81153-1-dlatypov@google.com> References: <20220502192327.81153-1-dlatypov@google.com> Date: Fri, 13 May 2022 13:05:31 +1000 Message-ID: <87ilqa6sjo.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Daniel Latypov writes: > The test currently is a bunch of checks (implemented using BUG_ON()) > that can be built into the kernel or as a module. > > Convert it to a KUnit test, which can also run in both modes. > From a user's perspective, this change adds a CONFIG_KUNIT=y dep and > changes the output format of the test [1]. The test itself is the same. ... I don't know why I got Cc'ed on this :), but I gave it a quick test anyway. Seems to work fine on a Power9. I also flipped some of the conditionals to make sure failure is detected correctly. Tested-by: Michael Ellerman (powerpc) > Meta: > 1. this patch applies on top of the kunit branch, > https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git/?h=kunit > > 2. checkpatch complains about aligning with parens, but it wants me to > indent the `#ifdef CONFIG_X86_64` which seems inappropriate in context. > > 3. this file doesn't seem to have a clear maintainer, so I assume this > conversion is fine to go through the kunit branch. I think you want to at least Cc the atomic folks: ATOMIC INFRASTRUCTURE M: Will Deacon M: Peter Zijlstra R: Boqun Feng R: Mark Rutland L: linux-kernel@vger.kernel.org S: Maintained cheers