Received: by 2002:a05:6a10:8a4f:0:0:0:0 with SMTP id dn15csp2600462pxb; Mon, 31 Jan 2022 03:40:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJwVGZm4ty86Hio3yHjylxdJWDmp+oh6Ju9bvEzYWs5lMR9Mt/mwL9lJI6pZlpmeVIzmcGuN X-Received: by 2002:a63:9044:: with SMTP id a65mr16269836pge.325.1643629228158; 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=xJct3tsqrUs658O0eKSrospQm5xRy1tTI04pJpyZL0w4oLJQSnifSUU1ItRa9K6/5M A2lZ7PC1WhTxri+NoC7LDEFNqf8EVRLofIbc8YmoKhnt2c8pfjtEO7zf2UuW3DiSv/xX JMfEjnrH7RD8rkKasoYE2p4C/E1d6FtxjFJc0cHsGuxoWxRHbXltvIsFG0qy0DAmThMk rLXH2SD1BjeeorMYvp8gNCLj3Onh1xPtTOqVf4Fcp6NBpuupCf3+eMtAcFPEdr9FwRLX VXqFi6M1GP/QsAazRnUhhTMNtk/bT1q4RwJihQdfPCoS1hFkVgSAn6jERzt4jv1gTxI6 DUYg== 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=BstT/Nbt3MI2dru2W9T6xWAwyUw0xClca5K9dP8OMlI=; b=NW6BAYgnnBk8gOWqjP/EFt+m6vNRGXHhi00buCpuJMMVkoslGqmkMppYwvDGbw6T9A akpNqEDQSe6KF/T5pVQsQyrPHQogOhH3rsnLH3P69CSk9XNm6Pk495pfBrQ4VuJznYQ8 YdIDBJ4efkeBg4c1lzUD55YHzoV14U8iU4YqtA7T7evSE4s8dlbd1/nfvhOSqdZnoPi7 TqsNgFGVwCY7Dtm9RCUHo4Tveltu/DdbXXHlEMmfoQVQEQ4t0Ow35BGxPPb1nBaTDflu dd1RJo7J3mcmyDhrrOL5xHYF/4hHVYx57ThBv+Iifw397RqvLPqa8m4l+bwnXNUAgmP3 xzQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=iBrSApDL; 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 70si13346651pgb.73.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=iBrSApDL; 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 S242987AbiA1V10 (ORCPT + 99 others); Fri, 28 Jan 2022 16:27:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54496 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244758AbiA1V1Y (ORCPT ); Fri, 28 Jan 2022 16:27:24 -0500 Received: from mail-pj1-x1034.google.com (mail-pj1-x1034.google.com [IPv6:2607:f8b0:4864:20::1034]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA7FBC06173B for ; Fri, 28 Jan 2022 13:27:24 -0800 (PST) Received: by mail-pj1-x1034.google.com with SMTP id o11so7641600pjf.0 for ; Fri, 28 Jan 2022 13:27:24 -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=BstT/Nbt3MI2dru2W9T6xWAwyUw0xClca5K9dP8OMlI=; b=iBrSApDLmp0ob8yP+f6nZttYwwTgQD6Z6ydFvMo0ZIWknm3IhYzIiDlMRP4PT7Pnsr DVNwGnS9VhpW9fAJNzyNpvDgOCk909OhTnDW9oJDeTtpCLpG0cD5T47tDNJlNFR7FWms MT7Z/COaK6wwhvAZg+L0jwnP+qXkLGebvPcBxHV6l8uAYyHfyFa/3Jtv/SkBZkoOT2e4 Zec4M1yLGbWKmb+SNcL/GubTuEVnvk7rkBRjGkirz08RRoTWhbpG4eaIT4PZdDzzg2rA MfxZ2B8qi+FpcI1ikwwvdIPA1YOn2XZT3GTkaXrBq7N1lvmOgtH4vYKKIe0BS7lMK3Va uS7g== 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=BstT/Nbt3MI2dru2W9T6xWAwyUw0xClca5K9dP8OMlI=; b=FCtUxt+hbDRZoY747ST2IUIU1keQS+awQKLR6KK+w0SHfRG0Igij5lXr4XQNMq8UsR l131Sk8z4dofnMl89UMr0fNdUlUUmDZLsoZSL0ay3YbOJVYMgFveIM0QT5tyXANjcSAZ ffFtD62in7gx4I4bpWmhVYqRob58WE68KnSed/dgT52OsRgFV2UgrCqdAYQWNOKKSDRG JTveXhbYGkvizjPkUdnfWhAYj6fypeUaHtk0BA5v939baGZvqGeFIh6n+9F1aQYaxEQ/ VuvkqdZ+4kXpVQzWADLPmX34kX5/pYBeOHeKFM1XpgBxFgLGBAx19M0Txi0WgeABAGIU QI0w== X-Gm-Message-State: AOAM531TEowEQc8cnbbKI8l90C3bGBac+GJgnDQl/ImS8CZ4aQyZuAAU L5vvYwxT1fTlSVxBpehqv9TU7dHRrnT4F8Ft8AC47BvBwWsg8UKk X-Received: by 2002:a17:903:187:: with SMTP id z7mr10311618plg.123.1643405243887; Fri, 28 Jan 2022 13:27:23 -0800 (PST) MIME-Version: 1.0 References: <20211013191320.2490913-1-dlatypov@google.com> <0f85025124359304c8a2a97d007b66d5655645c1.camel@codeconstruct.com.au> In-Reply-To: From: Brendan Higgins Date: Fri, 28 Jan 2022 16:27:12 -0500 Message-ID: Subject: Re: [RFC PATCH] kunit: flatten kunit_suite*** to kunit_suite** in executor To: Daniel Latypov Cc: Jeremy Kerr , 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 Fri, Jan 28, 2022 at 4:19 PM Daniel Latypov wrote: > > 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 :) I agree. Honestly, just changing the type signature from `struct kunit_suite * const * const *` to `struct kunit_suite * const *` in the suite_set struct sells me on this. I missed this before, but now that I am aware of this, I would like to see it go in soon. > 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 I'm absolutely fine with it. We are nowhere near the point where that matters at all. > Linux release as the module rework. > But I can hold off if it'll make your life more difficult. Also agree. I am excited to see Jeremy's new module code. I don't want to make his life any harder than it already is ;-) > > > > Cheers, > > > > > > Jeremy