From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on archive.lwn.net X-Spam-Level: X-Spam-Status: No, score=-6.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by archive.lwn.net (Postfix) with ESMTP id E9F157D2EF for ; Fri, 17 May 2019 17:43:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728261AbfEQRnB (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-doc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-doc@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? From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 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 Date: Fri, 17 May 2019 10:42:59 -0700 Message-Id: <20190517174300.7949F20848@mail.kernel.org> Sender: linux-kbuild-owner@vger.kernel.org List-ID: To: 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 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 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? From mboxrd@z Thu Jan 1 00:00:00 1970 From: sboyd at kernel.org (Stephen Boyd) Date: Fri, 17 May 2019 10:42:59 -0700 Subject: [PATCH v4 03/18] kunit: test: add string_stream a std::stream like string builder In-Reply-To: <20190514221711.248228-4-brendanhiggins@google.com> References: <20190514221711.248228-1-brendanhiggins@google.com> <20190514221711.248228-4-brendanhiggins@google.com> Message-ID: <20190517174300.7949F20848@mail.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. > > So provide a library for constructing the string as you go similar to > C++'s std::string. > > 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? From mboxrd@z Thu Jan 1 00:00:00 1970 From: sboyd@kernel.org (Stephen Boyd) Date: Fri, 17 May 2019 10:42:59 -0700 Subject: [PATCH v4 03/18] kunit: test: add string_stream a std::stream like string builder In-Reply-To: <20190514221711.248228-4-brendanhiggins@google.com> References: <20190514221711.248228-1-brendanhiggins@google.com> <20190514221711.248228-4-brendanhiggins@google.com> Message-ID: <20190517174300.7949F20848@mail.kernel.org> Content-Type: text/plain; charset="UTF-8" Message-ID: <20190517174259.xZppN1OmSkSPtonjTRns6iUnT-bfiuQjGggC3LrtcEo@z> 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. > > So provide a library for constructing the string as you go similar to > C++'s std::string. > > 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? From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hRgsn-000077-6R for linux-um@lists.infradead.org; Fri, 17 May 2019 17:43:02 +0000 MIME-Version: 1.0 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 Date: Fri, 17 May 2019 10:42:59 -0700 Message-Id: <20190517174300.7949F20848@mail.kernel.org> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-um" Errors-To: linux-um-bounces+geert=linux-m68k.org@lists.infradead.org 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 Cc: pmladek@suse.com, linux-doc@vger.kernel.org, amir73il@gmail.com, Brendan Higgins , dri-devel@lists.freedesktop.org, Alexander.Levin@microsoft.com, linux-kselftest@vger.kernel.org, linux-nvdimm@lists.01.org, khilman@baylibre.com, knut.omang@oracle.com, wfg@linux.intel.com, joel@jms.id.au, rientjes@google.com, jdike@addtoit.com, dan.carpenter@oracle.com, devicetree@vger.kernel.org, linux-kbuild@vger.kernel.org, Tim.Bird@sony.com, linux-um@lists.infradead.org, rostedt@goodmis.org, julia.lawall@lip6.fr, kunit-dev@googlegroups.com, richard@nod.at, rdunlap@infradead.org, linux-kernel@vger.kernel.org, daniel@ffwll.ch, mpe@ellerman.id.au, linux-fsdevel@vger.kernel.org, logang@deltatee.com 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. > > So provide a library for constructing the string as you go similar to > C++'s std::string. > > 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? _______________________________________________ linux-um mailing list linux-um@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-um