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 B2CA0C001DE for ; Mon, 31 Jul 2023 15:41:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232169AbjGaPlz (ORCPT ); Mon, 31 Jul 2023 11:41:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232180AbjGaPlu (ORCPT ); Mon, 31 Jul 2023 11:41:50 -0400 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F3924E6D; Mon, 31 Jul 2023 08:41:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=t-8ch.de; s=mail; t=1690818097; bh=/Cx11AsbPTQDsfBUToKatqbK79fehIY0/tu2Jfdvybs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=EW9y1XvVLr6Q40ChjfL3aACV0TXMyR9LJqzGdSnUQzfAtsDMB/1iZrBDdu0IeNZ9W IogUKExlqWsxpw+FCB3pYnAiS7XIi+rCn99cauo+fcv3y4kcLmdTyOKNJ2XxgRBWPO PZcx2IIwFz7aBklyFfBoVnQ68MzQthPL4VHzs4hs= Date: Mon, 31 Jul 2023 17:41:36 +0200 From: Thomas =?utf-8?Q?Wei=C3=9Fschuh?= To: Yuan Tan Cc: falcon@tinylab.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, w@1wt.eu Subject: Re: [PATCH v2 2/2] selftests/nolibc: add testcase for pipe Message-ID: <2ba88bae-2986-4e70-9828-824d7b140277@t-8ch.de> References: <9221753abe0509ef5cbb474a31873012e0e40706.1690733545.git.tanyuan@tinylab.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2023-07-31 20:35:28+0800, Yuan Tan wrote: > On Mon, 2023-07-31 at 08:10 +0200, Thomas Weißschuh wrote: > > On 2023-07-31 13:51:00+0800, Yuan Tan wrote: > > > Add a testcase of pipe that child process sends message to parent > > > process. > > > > Thinking about it some more: > > > > What's the advantage of going via a child process? > > The pipe should work the same within the same process. > > > > The pipe is commonly used for process communication, and I think as a > test case it is supposed to cover the most common scenarios. The testcase is supposed to cover the code of nolibc. It should be the *minimal* amount of code to be reasonable sure that the code in nolibc does the correct thing. If pipe() returns a value that behaves like a pipe I see no reason to doubt it will also survive fork(). Validating that would mean testing the kernel and not nolibc. For the kernel there are different testsuites. Less code means less work for everyone involved, now and in the future.