Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp4010862rdg; Wed, 18 Oct 2023 12:06:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHOuxvbtmQ9YkEKHJAx+VXLvtzEHpTLNWA5WSGCNcDv8hjeZnWbLq36By77TgAvrKv0wcqg X-Received: by 2002:a05:6a20:7fa1:b0:15e:f2a1:dae with SMTP id d33-20020a056a207fa100b0015ef2a10daemr9935231pzj.27.1697656011074; Wed, 18 Oct 2023 12:06:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697656011; cv=none; d=google.com; s=arc-20160816; b=QPEIXogU2eml7mGdYtk8v53nV+oM+M9U8AMohr+xrue11iRh/J7FJ09JDCivMj7AoG 6DVCtVxAcVe1ReYkPwhKIfR/gb71a6GSvjcflk10XAFK3oTV2l4kxSuBoBG+53apQOwS XZlOIZNQVrbaFrl2ORyuCGQ82B5+SWvqlNeGMit0sCAkJfbMRKWIr4WVAhbBDXeS9GB9 eyEWHxemDp7DJdt7/vN40oLS7pbMP8Vcxs0AMNi94gekxMtyPmb7Dysj/uvDk/Xm5cnb h/i1GR+X2kr58Kv6BSnovmD4/NLgHi9MnFKiaWLep0OUAfSmGsG/5Nd20QBeosOc68ec 6VEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=lEb1OnMbnE/3xh/jjCRB6JHIn7BETIF78iBYXYVKbMU=; fh=gfAh78o7pzufveZHBFF00XPS+kG1nbXNdecUCrGaeOk=; b=EE7stXxmbhDgHgz7owNn8kAS2scuQsWix4u9GEhHaSi63qytsuteBYAjxgxZYhCq+7 XjjIDwWMNdYzh4AIFHvM93j2iD64MntBg1/MwBLEIYUQesSio9Cmt5R6OX0JQgbLHz8j S//aar8Yxdz/N6UAP/nDsLekWTKFMXFQsrnpgxjMR7Y9vVCJl/n5t1Ebe7wLoC1T/S9A DUZRen14SZ5CeBx6kEdZyvsZJvKmWqr3wBfFZeFJ2YjMZ3OURRxSVTVKNmTZKbTPRkjh Iqzz/wxwlhHO2mWa5Q5Xp71SZXIyUSGSyovfwb8IcNaIrL3GL7qRETNm1mYnzScvynQu 7l1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=BBtHsPZe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id f3-20020aa79683000000b006bd3ba8e610si4366891pfk.133.2023.10.18.12.06.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 12:06:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=BBtHsPZe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 0590C81BBA3E; Wed, 18 Oct 2023 12:06:22 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230396AbjJRTGM (ORCPT + 99 others); Wed, 18 Oct 2023 15:06:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34184 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230284AbjJRTGK (ORCPT ); Wed, 18 Oct 2023 15:06:10 -0400 Received: from mail-io1-xd2c.google.com (mail-io1-xd2c.google.com [IPv6:2607:f8b0:4864:20::d2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E4ED11F for ; Wed, 18 Oct 2023 12:06:08 -0700 (PDT) Received: by mail-io1-xd2c.google.com with SMTP id ca18e2360f4ac-7a680e6a921so6658139f.1 for ; Wed, 18 Oct 2023 12:06:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1697655967; x=1698260767; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=lEb1OnMbnE/3xh/jjCRB6JHIn7BETIF78iBYXYVKbMU=; b=BBtHsPZeoXVhRwxObkEaEJjatZSMJj4O2iJyHP71a1jnaicH61PJh7plGP7X04wrp8 EevoGd/b7Z3OfyiwPL8vDWLObof7EFzEV+jJ5+88pCYJBNap5Z/LfFWiwHbHvHnGnViV 9FJFrEuIeQAhpV9b2fDFgRDPR3VXxSymGvBe0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697655967; x=1698260767; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=lEb1OnMbnE/3xh/jjCRB6JHIn7BETIF78iBYXYVKbMU=; b=pRyxMabuxIvPhtSE/dLYIdcGFZ6Cix5/YkSW8H7c7gmUsSeBnhch5itG/Mj9ujO5Se xA8a6w970uFGmXf3Sxu0szUAQDahf98GwqQ1rZZfCF/uhER93y3TLFeS+AFqufsMndlD d7vccxtVxNUVAb4SPu1z9WyyCHAfEz51p+3fsjZi0ASKa+BfxmpnOGhqe3cMyMsxNU1n K0oWDRU7v98T7nqCKHjvYCKKRCSscc9o2YaheQk3Lk7eRh8N2J9E4oVulaXWz/q+fiA9 yTi1xJT0SEH3X00z6OR7Hv2PwIw/nWbF6MOhhn7wwEwnAqMlLTgt+9peotQPbFx+NZX/ gTgQ== X-Gm-Message-State: AOJu0Yz+mvdOvBhxJpDDa7qp11Itm0UTRALKVUFvvx+FvAFYEPUXDUZr ssvpPIBNJ7t1F1aHDFQadNUhPg== X-Received: by 2002:a05:6602:3986:b0:790:958e:a667 with SMTP id bw6-20020a056602398600b00790958ea667mr161131iob.2.1697655967353; Wed, 18 Oct 2023 12:06:07 -0700 (PDT) Received: from [192.168.1.128] ([38.15.45.1]) by smtp.gmail.com with ESMTPSA id 9-20020a5d9c09000000b0079199e52035sm269584ioe.52.2023.10.18.12.06.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 18 Oct 2023 12:06:05 -0700 (PDT) Message-ID: <24cacac8-e67e-47e6-89b4-131d64de786b@linuxfoundation.org> Date: Wed, 18 Oct 2023 13:06:04 -0600 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] selftests/clone3: Report descriptive test names Content-Language: en-US To: Mark Brown , Christian Brauner , Shuah Khan Cc: linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Shuah Khan References: <20231018-kselftest-clone3-output-v1-1-12b7c50ea2cf@kernel.org> From: Shuah Khan In-Reply-To: <20231018-kselftest-clone3-output-v1-1-12b7c50ea2cf@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 18 Oct 2023 12:06:22 -0700 (PDT) On 10/17/23 17:01, Mark Brown wrote: > The clone3() selftests currently report test results in a format that does > not mesh entirely well with automation. They log output for each test such > as: > > # [1382411] Trying clone3() with flags 0 (size 0) > # I am the parent (1382411). My child's pid is 1382412 > # I am the child, my PID is 1382412 > # [1382411] clone3() with flags says: 0 expected 0 > ok 1 [1382411] Result (0) matches expectation (0) > > This is not ideal for automated parsers since the text after the "ok 1" is > treated as the test name when comparing runs by a lot of automation (tests > routinely get renumbered due to things like new tests being added based on > logical groupings). The PID means that the test names will frequently vary > and the rest of the name being a description of results means several tests > have identical text there. > > Address this by refactoring things so that we have a static descriptive > name for each test which we use when logging passes, failures and skips > and since we now have a stable name for the test to hand log that before > starting the test to address the common issue reading logs where the test > name is only printed after any diagnostics. The result is: > > # Running test 'simple clone3()' > # [1562777] Trying clone3() with flags 0 (size 0) > # I am the parent (1562777). My child's pid is 1562778 > # I am the child, my PID is 1562778 > # [1562777] clone3() with flags says: 0 expected 0 > ok 1 simple clone3() > > In order to handle skips a bit more neatly this is done in a moderately > invasive fashion where we move from a sequence of function calls to having > an array of test parameters. This hopefully also makes it a little easier > to see what the tests are doing when looking at both the source and the > logs. > Good change. Thank you. Applied to linux-kselftest next for Linux 6.7-rc1. > Signed-off-by: Mark Brown > --- > tools/testing/selftests/clone3/clone3.c | 265 +++++++++++++++++++++++--------- > 1 file changed, 192 insertions(+), 73 deletions(-) > thanks, -- Shuah