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 03077C433FE for ; Tue, 7 Dec 2021 20:11:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241152AbhLGUPY (ORCPT ); Tue, 7 Dec 2021 15:15:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229648AbhLGUPX (ORCPT ); Tue, 7 Dec 2021 15:15:23 -0500 Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com [IPv6:2607:f8b0:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AAB44C061574 for ; Tue, 7 Dec 2021 12:11:52 -0800 (PST) Received: by mail-pl1-x636.google.com with SMTP id k4so10241800plx.8 for ; Tue, 07 Dec 2021 12:11:52 -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=CCAgM8slb4K09PKhqmBF079Y70RCQ4lbYveDYt8lCQ4=; b=JBR3p2w0p1REi7da+Y/qkO1BXVmBH0+BCWLImomUaJ7EKiJmnhNJtSVzpsoYLwMel4 BsS0T/vnC5+kOWm1LfOdhVLxGX2/3iqiiC5bvw3ggxRzyPn2oxGUPBk7oMFh41kCbQZA AMkUxJoKjz4o266CF3rOAZKMy+lF06RvT4Qu4GthXQKgNg7Ww/P8mAqCy8ubHScSVmwx TkJYZygEg/R/ZkaVJRZeONJ4XOI40XDXT2zlO43m3ZOvCVVGPqGeV7NZAryi4wOZCdBU Hyp4TnaTamGe9+vlx6BRw9HT7MDnCpA5RpLUr0JsZR0Mbi2VsaoIFwsjM8IiJ/GD7Cvd 7Ohw== 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=CCAgM8slb4K09PKhqmBF079Y70RCQ4lbYveDYt8lCQ4=; b=3iyqGeDutJfbCYZtL0UWwWyRvzRK7ek9rcnhJUrYuM5lBh4NZHksyhxIiKloz4pzSj KM5s2i7/AtuvlIgEykep2W23Ll/QfbsVY1LVDkU+QFne96jFLryr+4Wv01ifGcyfKYHj KJiEWUHQzgZuHVtjczbTZa/pz6sadrom/LO0d14vlILDQgAIpXveXMuTSCrZP90hTN+I 5MfXUM7l1G1R7ciZVJ2ZveVIVdcfbaaP3kr5/edhoHNs/fY09MMyv4m/3lzrXQ12Aof6 iJqFwMt4BHc3xdQ+ZOBI8zGikbTYnZTCCbvr23Dv3h+Q6/IWRc/1onrVOjiC6fhC9G2R o90Q== X-Gm-Message-State: AOAM530VY1pkskzm8DLUWhBweBZe8fAdq6Lk9e+lVJUU7PW7+yhQ1TE5 7xm6VWDk7U3QmGUxf/kTiifeGTohcFyjzYH00yafCdmIR9oV6A== X-Google-Smtp-Source: ABdhPJznZcB66MJzIdr4SBIn0glBslWQ/qbV4M3Bz7VKmHOvu3WKhcA4xfGI4Mvw0tzHQuTxHeE4UBpMzK4v7lxYXxc= X-Received: by 2002:a17:90b:230c:: with SMTP id mt12mr1656289pjb.63.1638907911981; Tue, 07 Dec 2021 12:11:51 -0800 (PST) MIME-Version: 1.0 References: <20211103042228.586967-1-dlatypov@google.com> In-Reply-To: <20211103042228.586967-1-dlatypov@google.com> From: Brendan Higgins Date: Tue, 7 Dec 2021 15:11:40 -0500 Message-ID: Subject: Re: [PATCH v2] kunit: add run_checks.py script to validate kunit changes 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 Wed, Nov 3, 2021 at 12:22 AM Daniel Latypov wrote: > > This formalizes the checks KUnit maintainers have been running (or in > other cases: forgetting to run). > > This script also runs them all in parallel to minimize friction (pytype > can be fairly slow, but not slower than running kunit.py). > > Example output: > $ ./tools/testing/kunit/run_checks.py > Waiting on 4 checks (kunit_tool_test.py, kunit smoke test, pytype, mypy)... > kunit_tool_test.py: PASSED > mypy: PASSED > pytype: PASSED > kunit smoke test: PASSED > > On failure or timeout (5 minutes), it'll dump out the stdout/stderr. > E.g. adding in a type-checking error: > mypy: FAILED > > kunit.py:54: error: Name 'nonexistent_function' is not defined > > Found 1 error in 1 file (checked 8 source files) > > mypy and pytype are two Python type-checkers and must be installed. > This file treats them as optional and will mark them as SKIPPED if not > installed. > > This tool also runs `kunit.py run --kunitconfig=lib/kunit` to run > KUnit's own KUnit tests and to verify KUnit kernel code and kunit.py > play nicely together. > > It uses --build_dir=kunit_run_checks so as not to clobber the default > build_dir, which helps make it faster by reducing the need to rebuild, > esp. if you're been passing in --arch instead of using UML. > > Signed-off-by: Daniel Latypov > Reviewed-by: David Gow Reviewed-by: Brendan Higgins