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=-4.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 091DEC46460 for ; Fri, 17 May 2019 17:43:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C238C21734 for ; Fri, 17 May 2019 17:43:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1558114995; bh=u/0Sx+bL+E5OWSceo4KC7dtRetcFC6sUsN/PmJnAhk0=; h=In-Reply-To:References:Subject:From:Cc:To:Date:List-ID:From; b=SbHvzU0ZbuojRgO86xS/PexuSU10v1tUxM7lMpImfRHu2DTUd9zDGoK61LvHEQZZk rQTWTUCjyRemjDr6cjcS+DGLhU2a3NmbDaG3hRoTkx+qN4hlDH4orioj0Vjz+eDTKo nObSP0WHm+mqosnI7UJEJ+tLUHK1Hwe5CNHpXvNI= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728679AbfEQRnB (ORCPT ); Fri, 17 May 2019 13:43:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:46738 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725932AbfEQRnB (ORCPT ); Fri, 17 May 2019 13:43:01 -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 7949F20848; Fri, 17 May 2019 17:43:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1558114980; bh=u/0Sx+bL+E5OWSceo4KC7dtRetcFC6sUsN/PmJnAhk0=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=PNqM78LYOJE6AFjPJJqvmTe4yn4ExZJELAbLm7PWYtx4RRA91ZKFjxcmNXwvJ9vzj fmGUSDTS/JYHIyMuqufLahPQm7zrEzVN7bmVMlPf43vv70uVQT6W1uTjAQhlpB0K3J fS21ZYISzd9n+BoS1phKk9f2kydOWWs9fMzaLlI0= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <20190514221711.248228-4-brendanhiggins@google.com> References: <20190514221711.248228-1-brendanhiggins@google.com> <20190514221711.248228-4-brendanhiggins@google.com> Subject: Re: [PATCH v4 03/18] kunit: test: add string_stream a std::stream like string builder From: Stephen Boyd Cc: devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, kunit-dev@googlegroups.com, linux-doc@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-nvdimm@lists.01.org, linux-um@lists.infradead.org, Alexander.Levin@microsoft.com, Tim.Bird@sony.com, amir73il@gmail.com, dan.carpenter@oracle.com, daniel@ffwll.ch, jdike@addtoit.com, joel@jms.id.au, julia.lawall@lip6.fr, khilman@baylibre.com, knut.omang@oracle.com, logang@deltatee.com, mpe@ellerman.id.au, pmladek@suse.com, rdunlap@infradead.org, richard@nod.at, rientjes@google.com, rostedt@goodmis.org, wfg@linux.intel.com, Brendan Higgins To: Brendan Higgins , frowand.list@gmail.com, gregkh@linuxfoundation.org, jpoimboe@redhat.com, keescook@google.com, kieran.bingham@ideasonboard.com, mcgrof@kernel.org, peterz@infradead.org, robh@kernel.org, shuah@kernel.org, tytso@mit.edu, yamada.masahiro@socionext.com User-Agent: alot/0.8.1 Date: Fri, 17 May 2019 10:42:59 -0700 Message-Id: <20190517174300.7949F20848@mail.kernel.org> Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org Quoting Brendan Higgins (2019-05-14 15:16:56) > A number of test features need to do pretty complicated string printing > where it may not be possible to rely on a single preallocated string > with parameters. >=20 > So provide a library for constructing the string as you go similar to > C++'s std::string. >=20 > Signed-off-by: Brendan Higgins > Reviewed-by: Greg Kroah-Hartman > Reviewed-by: Logan Gunthorpe Is there any reason why we can't use the seqfile API for this? These both share a similar goal, formatting strings into a buffer to be read later. Maybe some new APIs would be needed to extract the buffer differently, but I hope we could share the code. If it can't be used, can you please add the reasoning to the commit text here?