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 X-Spam-Level: X-Spam-Status: No, score=-1.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CAEE4C433FF for ; Thu, 1 Aug 2019 21:14:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9A38A20838 for ; Thu, 1 Aug 2019 21:14:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564694091; bh=n0IdgFG7Kos2nGnJ4DnkR9p1y4CCyIbJ6ZBAUiBNpN4=; h=In-Reply-To:References:Subject:From:Cc:To:Date:List-ID:From; b=klWJauwkPRkm/5v701g68mXrurJ1vGjv19hMOe5VURzTJjPlU8DF7dOCMDFKn1Ell T9hhe1eu0PhzGtaRFOHl46+8uoMWOGvqUlLj1D6dxZFjOaQMfn5LMooDJFYZCpwWtI ApjdP/uP8v1mwErFdEGHf+PAr0yqEeC1tWy0TD88= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389100AbfHAVOt (ORCPT ); Thu, 1 Aug 2019 17:14:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:57560 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731215AbfHAVOt (ORCPT ); Thu, 1 Aug 2019 17:14:49 -0400 Received: from kernel.org (unknown [104.132.0.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6D3D7206A2; Thu, 1 Aug 2019 21:14:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564694087; bh=n0IdgFG7Kos2nGnJ4DnkR9p1y4CCyIbJ6ZBAUiBNpN4=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=mCeQAbdwzIbwLPOijpChQVFo4UiYoSWfSZsIgfoIrNYNDT1t+cF6inHSpvwbpaWEE h3a75ihCGxnVfKz0yO5MH+8Z55L0rleQ67pJQ89uiV1jYfk7eCIm+wLogdHeiGG1J2 0oPUv74xqN1E4K+r3Bcp5gj1D6bBbIkaOl5oR1Jc= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: References: <20190716175021.9CA412173C@mail.kernel.org> <20190719000834.GA3228@google.com> <20190722200347.261D3218C9@mail.kernel.org> <20190722235411.06C1320840@mail.kernel.org> <20190724073125.xyzfywctrcvg6fmh@pathway.suse.cz> <20190726083148.d4gf57w2nt5k7t6n@pathway.suse.cz> Subject: Re: [PATCH v9 04/18] kunit: test: add kunit_stream a std::stream like logger From: Stephen Boyd Cc: Petr Mladek , Jeff Dike , Kevin Hilman , Logan Gunthorpe , Michael Ellerman , Daniel Vetter , Amir Goldstein , Frank Rowand , Steven Rostedt , Kees Cook , David Rientjes , kunit-dev@googlegroups.com, Kieran Bingham , Peter Zijlstra , Randy Dunlap , Joel Stanley , Luis Chamberlain , Rob Herring , shuah , wfg@linux.intel.com, Greg KH , Julia Lawall , linux-nvdimm , dri-devel , linux-um@lists.infradead.org, Sasha Levin , Theodore Ts'o , Richard Weinberger , Dan Carpenter , Knut Omang , Josh Poimboeuf , Masahiro Yamada , Timothy Bird , John Ogness , devicetree , "open list:DOCUMENTATION" , linux-fsdevel@vger.kernel.org, linux-kbuild , Linux Kernel Mailing List , "open list:KERNEL SELFTEST FRAMEWORK" To: Brendan Higgins User-Agent: alot/0.8.1 Date: Thu, 01 Aug 2019 14:14:46 -0700 Message-Id: <20190801211447.6D3D7206A2@mail.kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Brendan Higgins (2019-08-01 11:59:57) > On Thu, Aug 1, 2019 at 11:55 AM Brendan Higgins > wrote: > > > > On Fri, Jul 26, 2019 at 1:31 AM Petr Mladek wrote: > > > > > To be honest I do not fully understand KUnit design. I am not > > > completely sure how the tested code is isolated from the running > > > system. Namely, I do not know if the tested code shares > > > the same locks with the system running the test. > > > > No worries, I don't expect printk to be the hang up in those cases. It > > sounds like KUnit has a long way to evolve before printk is going to > > be a limitation. >=20 > So Stephen, what do you think? >=20 > Do you want me to go forward with the new kunit_assert API wrapping > the string_stream as I have it now? Would you prefer to punt this to a > later patch? Or would you prefer something else? >=20 I like the struct based approach. If anything, it can be adjusted to make the code throw some records into a spinlock later on and delay the formatting of the assertion if need be. Can you resend with that approach? I don't think I'll have any more comments after that.