Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp536396pxb; Wed, 6 Oct 2021 10:01:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxqaBewwXdjLm5elxb/AvosuSQJEQK+dSbcQDrUGktHg3XqcUSL2/KrwwA62qFE+3wVHe/L X-Received: by 2002:a05:6402:40c2:: with SMTP id z2mr1126542edb.41.1633539711825; Wed, 06 Oct 2021 10:01:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633539711; cv=none; d=google.com; s=arc-20160816; b=XG8lw8DxwsRv7zVAXUTwMODl6ZToYcUogINi+EQyInj+8qSyGrZ0+02GjyJinVUT0U HTUiH0//HGb3n+GHxvMtXYhOMlH4kyAtDN9swCQ5CwMQwkQNRiRUe2Ykp1H4tjg8NDjk f+hDkX8AWDywpK1ecgKWrZN+9PNxF0c8QddVFPRQlc5dyB3zqKP9mAJWwFfYV4m0/9VB 0fF2HoYHKE83MHKKfMK3T0eAzVokhRMHEobEfttVnERYaXazxHxwaUN5JYloladTvm1c rq1GvSbEaml2koBdeNBZIm04fwK3W0tg861gM7fthF2yvWzAg6/anQ3SPmFMUMij/uxD bFlg== 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=mqaPyN17NjXVoG/gNUtKAvMoZ8+ulh+88z1SV9+12xE=; b=wFrOOv83PFc+xJ7u1bagkegSaopWSZDZ95t3mMDiPijMOlDm/da62Sn4jLor+l1wss tZKpvHukEegKd2+dgelPS8HAclx4dYHj8hICVdcdcXwZ5lzCz2ZaCmAyA+csoaTDmWy9 QnWc8Vjd9IvVzf2vkvWfmUZEl4CfxUiATLZsoYv3bTRi195YTexyjHWNn0ODGSUzq5VS L+F+S1y+UE4/iMxk3Ib+oOjBnnE15NjSQF86EmM3YIa3rPTNujQTLValPm5nJRGvLHJ3 Ngd0hbHPdM/kqavN/djnJcYQCqLNBVcDjWRZ7TRQw7o8EaUQukAoBrd11d/n9CITYY+6 X4qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=BYKN2VHa; 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 r9si7953088ejj.752.2021.10.06.10.01.23; Wed, 06 Oct 2021 10:01:51 -0700 (PDT) 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=BYKN2VHa; 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 S229548AbhJFRBS (ORCPT + 99 others); Wed, 6 Oct 2021 13:01:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230077AbhJFRBS (ORCPT ); Wed, 6 Oct 2021 13:01:18 -0400 Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D6C32C061746 for ; Wed, 6 Oct 2021 09:59:25 -0700 (PDT) Received: by mail-pj1-x102c.google.com with SMTP id ls18so2677566pjb.3 for ; Wed, 06 Oct 2021 09:59:25 -0700 (PDT) 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=mqaPyN17NjXVoG/gNUtKAvMoZ8+ulh+88z1SV9+12xE=; b=BYKN2VHaAmXZLVgq1UN36v7yVsoFefS8C8VigcuoqiYVw+F/O+VpFMRN2/tmiGKsHz GA4i5CaAQatPZ5+/aeltZMrsMXPipQ/AL/prvV34hRIlomT4vOw9Xhpz5yhRwNCt7ccQ +B0z0UdV8Wxiiph7VBpjxKg3uWIiChl39E6wk+MR/kEEEHiu1NhMp5YzvLUBcsbo6Qx3 X1EPp23TGFE63ERTq5VXTGuv30SR3UYucP4aghl/kkMnWlj0J/+8jIGKphG2YWdlFQWc P9Fe9fJ8wSTPY37w0Qed1R2qpFP/XLNrmiaLTziUWqeP6sfWJw5I62EWiE3fNAWefWLR r4nw== 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=mqaPyN17NjXVoG/gNUtKAvMoZ8+ulh+88z1SV9+12xE=; b=Kzd+j51OdaF4pxrEE2hkjWPHas7jA+S/rWDOkcK6XkpAVfaf648QxrH9UoNG2gBCIz hLObnMFq2CGnQMsekISAYny/ZUsW7S0/10hh4tSAwPMnY98F88fcRHbVEx6ek8cWOZyl 5gOaSjigtvSIfeLUGBv9UumVgIN4fE0vYxDj+nzQb6JKZCR5fgKmOuCf6mEcnoFbZYxX cz3jqzOnrGz8etbUauF/G4cfnThED2l3im1pPW1/33G4qqg9WRlZWBAOOnRFWpu6P1i+ yDP5SvurGX6rpDlkvpFtoK4PIOw9uK7tFwq/JWtaYAFvUZxoGJMeHq2bq9DwhBEcTz6t 4kVA== X-Gm-Message-State: AOAM530n989Mi8ikldj4UbJspDzeuqtIeyd2iI/VgpmqAsYHsqQWsFFp mVdQ9wop631jycykmIieuWbNvtT60pvA/Vbgwkyuvw== X-Received: by 2002:a17:90a:e7c8:: with SMTP id kb8mr11974176pjb.95.1633539565107; Wed, 06 Oct 2021 09:59:25 -0700 (PDT) MIME-Version: 1.0 References: <20210930222048.1692635-1-dlatypov@google.com> <20210930222048.1692635-3-dlatypov@google.com> In-Reply-To: <20210930222048.1692635-3-dlatypov@google.com> From: Brendan Higgins Date: Wed, 6 Oct 2021 09:59:14 -0700 Message-ID: Subject: Re: [PATCH v4 2/4] kunit: tool: factor exec + parse steps into a function To: Daniel Latypov Cc: 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 Thu, Sep 30, 2021 at 3:20 PM Daniel Latypov wrote: > > Currently this code is copy-pasted between the normal "run" subcommand > and the "exec" subcommand. > > Given we don't have any interest in just executing the tests without > giving the user any indication what happened (i.e. parsing the output), > make a function that does both this things and can be reused. > > This will be useful when we allow more complicated ways of running > tests, e.g. invoking the kernel multiple times instead of just once, > etc. > > We remove input_data from the ParseRequest so the callers don't have to > pass in a dummy value for this field. Named tuples are also immutable, > so if they did pass in a dummy, exec_tests() would need to make a copy > to call parse_tests(). > > Removing it also makes KunitParseRequest match the other *Request types, > as they only contain user arguments/flags, not data. > > Signed-off-by: Daniel Latypov > Reviewed-by: David Gow Acked-by: Brendan Higgins