Received: by 2002:a05:6a10:8a4f:0:0:0:0 with SMTP id dn15csp2600458pxb; Mon, 31 Jan 2022 03:40:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJz5PbAttUWGRezsZyV9sClUyRQUCmFFG/COCNoC/xYgetv8Xhg1u+r/+MyGaw/veWTnoel8 X-Received: by 2002:a62:1a10:: with SMTP id a16mr20109845pfa.67.1643629228035; Mon, 31 Jan 2022 03:40:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643629228; cv=none; d=google.com; s=arc-20160816; b=L03HVRCDgv9W/pSgnGNqGZYGp3jKvBgH8WT+qfnnoSFUuW+PE2570Nbhma5VOCTfDC twAKa38Jiy9HQBxPUdAC2b4jsZ5wzod1tnRKFUzxH7+jiHCsH/Aum/ZknL490MiZuBN3 F/Zy8QdHAzKS8Bw7i9SjMyNowipd1umqI3mooW+uxKLSoh4ObK2LhozkTiVgmY+fyyDl DWrL8iu+dNpl9ekB9ApJc1cAarI35goXgfDzOhVW7WH6xWlMNS7ofDm2VTz+Fx4IV2UZ NRSfB/tblJms+x4DFr94TOCnAww21QeCTgpGg2s7mPIu3S1Z/wQBaCA/1tmPZXZSXrZc cVQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=7lZ8ffNlvdrvmT96h8/DlPx1/riHLrWMluhYkp5LYp8=; b=SYP6iRIoPD8BpPGcthm8D7KIGyVdzVEc+zHoE4KuKvhWAv55Njj7DlCA2GM06+loUC cf7CR7b7cT6Gp1Pp8cIi+0LHS6NYyulcNWEJ6HVQgM8+70SOITBmyGkt5NNJITvbbSjE jJTHqGNUcVx1JvVhEbs23SKE2oSJJaE+NhjVi0TwuA4RaG6XqCvExRYahIj9DLT4iPQW RuAi05G+v6gtldv/mN1pKb/dqzeWMQ9645fhRcoaANE7tbDzFajng2yn7Wwv8Y97s92k twlsT/d3OI0ddHph/0J1EMTyzy0MOknRSgxcSOfWmL9S/B8gYWMV9K1LLXTby/6bOM6f PPrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=WPJyhTdg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 16si13713488pfm.354.2022.01.31.03.40.17; Mon, 31 Jan 2022 03:40:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=WPJyhTdg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242834AbiA1VTz (ORCPT + 99 others); Fri, 28 Jan 2022 16:19:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240672AbiA1VTy (ORCPT ); Fri, 28 Jan 2022 16:19:54 -0500 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 780F1C06173B for ; Fri, 28 Jan 2022 13:19:54 -0800 (PST) Received: by mail-ej1-x632.google.com with SMTP id ah7so20130122ejc.4 for ; Fri, 28 Jan 2022 13:19:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=7lZ8ffNlvdrvmT96h8/DlPx1/riHLrWMluhYkp5LYp8=; b=WPJyhTdgPV3Sykuapr6GtS6LgbfAH6PC27FjN8jYgQuo5QUlp5+ug2+Hk+fIo5DI3z HCvaadpIgU4KhTvB0y4Hu++cXJ01Y24EI+Ie6Tk0xUInrFr3ceYyGbzHUm6vO/pinP84 ntLGJcYZ6ZSJ2VGZ6Tzo3Nn/jjHF2Cd1iIQDRT4gmkKcEKNMQzqcfgRxMBWfnphibPVp xR7e0PL3WO5a62HRLkPc9nXuAo/JubYtcwQjubNwfLz84R2vjQ8hQhfhbvectYh5ZQmS MW40oNJ331TtmVOns2bXlhFJPnaipOppQR9I5MbWuxmqPH+6CrBxgozpjXDC02Wt2JDL xq4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=7lZ8ffNlvdrvmT96h8/DlPx1/riHLrWMluhYkp5LYp8=; b=C6YUxKUaUI4RYmCvSm2p0gi2dBFa2FKhliMit7FUApeS+WXv/rjSXwNMuyiqst0UY2 OeEzp+7fvSgyvmbar2m7+uxQlIg2KM5cjolFqMrq9zFlGMUCrJ+MeWQ6MAuOedzoCYYH DVjHYwVE4b9/NxHWJ3qFKoqNEFGoIiDEQXeTIlnhvMU2Zg6i9yIQueDd9yByL39fAByZ /54zgP1xzKJwWyotQCAXhI5uT817QjaPp8bP8su7Yy4qCBNM0/sGh6Tn84JY46lGTaAv dAeETNolEkKeWdqGQ2iHaDzeiXCfT9lC87MAqHBTb82Q5anZ9YKJLwFVu7HcIEabyQuw 91jQ== X-Gm-Message-State: AOAM533XSOJWoTt9Jun/wog7HPYiIthycfdfQJtx9xcflaD+OFaXILUi 2TSg9DcsSA3u6+eHqTnOwcYNfUdyvA54yV6rip2YIg== X-Received: by 2002:a17:906:794f:: with SMTP id l15mr8720055ejo.75.1643404792858; Fri, 28 Jan 2022 13:19:52 -0800 (PST) MIME-Version: 1.0 References: <20211013191320.2490913-1-dlatypov@google.com> <0f85025124359304c8a2a97d007b66d5655645c1.camel@codeconstruct.com.au> In-Reply-To: <0f85025124359304c8a2a97d007b66d5655645c1.camel@codeconstruct.com.au> From: Daniel Latypov Date: Fri, 28 Jan 2022 13:19:41 -0800 Message-ID: Subject: Re: [RFC PATCH] kunit: flatten kunit_suite*** to kunit_suite** in executor To: Jeremy Kerr Cc: Brendan Higgins , davidgow@google.com, linux-kernel@vger.kernel.org, kunit-dev@googlegroups.com, linux-kselftest@vger.kernel.org, skhan@linuxfoundation.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 13, 2021 at 6:55 PM Jeremy Kerr wrote: > Resulting in the .kunit_test_suites section just being a set of > contiguous pointers to struct kunit_suite. We get the number of suites > from the section size. > > That was my thinking, anyway. I think it probably makes sense to do that > cleanup after the section patch, as that means we don't need any > post-processing on the suites arrays. To be honest, I'm actually tempted to pay the cost of postprocessing and proposing a change like this for real. Going from kunit_suite*** to ** shaves off a lot of code from the unit test and the filtering code path. Specifically I'm thinking this can go into the kunit branch, https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git/?h=kunit Then when we have the series reworking modules, one of two things can happen. 1. if we get to kunit_suite** with null-terminated arrays, fixing the executor just means dropping the post-processing step. 2. If we get to kunit_suite* as mentioned above, then there'll be a bit more work, but not as much. Alternatively, I can wait and send you an updated version of this patch to include at the start of your series like PATCH 1/x: this patch with post-processing, using either * or ** ... PATCH x/x: final rework, and drop the postprocessing It's just that the prospect of submitting a patch that reduces so much code makes me eager to try and get it submitted :) Brendan and David seem ok with paying the bit of runtime overhead for post-processing, esp. if we time it so this patch lands in the same Linux release as the module rework. But I can hold off if it'll make your life more difficult. > > Cheers, > > > Jeremy