Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp985833rwi; Mon, 31 Oct 2022 09:48:49 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5ucgKpkEOhw00u2gvIGrvI6Oot8GdM1daJVEGK/49q7g/AVvKAwpKAbFOIj22QKzJnRCf+ X-Received: by 2002:a17:902:d54a:b0:186:e852:6775 with SMTP id z10-20020a170902d54a00b00186e8526775mr15232938plf.44.1667234928844; Mon, 31 Oct 2022 09:48:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667234928; cv=none; d=google.com; s=arc-20160816; b=pQm4VWLFGxK2g2PhUg20w8CtP37J+r8fTddP6bBzyJjblRElh1UR6eApIQsxcZsNX+ UPMG1bWFYrC5yPMmApMMubSPb/u/MQ/vdRH3BMe46rYsP4FPJNvHnv2ePJFD2CJ0FMHm PjrhGqOCzW2ncIzZx1zw6bWT0cmyodqA/G2v19TGxElmiVMh5tdWo9Ql34dpe/87Go8d VQ0a2HgVuQWgEvyd4Q4QQQafZaDZdekzyFNZgHb2x7GEKNV7FnEOb2kO4QMGPkyJ9mTj 5FKYey55tsh1jr8IIqE3/loP+NtJwwY/eRNfDJBbiCRFnFJ5ArhQ1xwyclT3A7ch33iX fDTA== 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=OGDQThFOxauPDUbKkMnQ1WVxEo1L149BaHAo2/PIs94=; b=Z83FALhGupFTcbGbEUvyZ/eK1AExgZCsCiJ5Ydw2ho0xWMLHhhi7wMXLkqj8OAyUuN 75d7yW61ixGbq4fQU/zKDS6+g8wi/Cfta2zJmYz8NJKDOWvcQTnI4CuTAo/P198JJ90n 23TonNWtVTga+h2DhbWaOWNLldxhrO19MmemuoWdvttFrpir0/8PBTPgwaxjAQnZ/6R5 9Ous1+JXIok///ZwpBsDcp4dO3Lyz0sd1SuVY3nGF9/n3WxeJboQsqXrQybbw5SDyUdQ Sddaa+1jhHB3cj5i8bgZNSt7J7Ik6MRQUnAh3e5bkL9BBjE2p2yVxYrPdTAlreyv6/gS MTMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b="jP/GNUvQ"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p21-20020a056a000b5500b0056590cd0969si9982512pfo.208.2022.10.31.09.48.34; Mon, 31 Oct 2022 09:48:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b="jP/GNUvQ"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S231860AbiJaQhW (ORCPT + 98 others); Mon, 31 Oct 2022 12:37:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52606 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231183AbiJaQhU (ORCPT ); Mon, 31 Oct 2022 12:37:20 -0400 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B0015E56 for ; Mon, 31 Oct 2022 09:37:19 -0700 (PDT) Received: by mail-ej1-x633.google.com with SMTP id k2so30884818ejr.2 for ; Mon, 31 Oct 2022 09:37:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=OGDQThFOxauPDUbKkMnQ1WVxEo1L149BaHAo2/PIs94=; b=jP/GNUvQTENsDaBdHVAlI7AfG4mal0HOq2Y3LVR3qDTk5EdDcfBxL/qwz1YXQUf7X5 NlH2gXW5xMoQqPWzBv6wKq+e3OGCGycAAkDhRY1gCDolIbKfCTCuNrThCN2oBFe5xyQG OrFtT/5IBJiXBJKa01ZM2aUY7zfzE2pDz735px5sgA63NLS63B1+k+0m9i64ukpraY7h jAxnODFQfVTrGEhvjISrbbWtE+RaHV6/0KbB5wTfU/GTlfgral0Y0oQjKZv6r9Ig2Cxx sQTx2cwfcA4KBZbxsnwo9mw1oDRweYJMvS0WKLB4v7b0v5cC3g1YMhtca4bozPNbeoE3 gaxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=OGDQThFOxauPDUbKkMnQ1WVxEo1L149BaHAo2/PIs94=; b=wTgK8zysvpK24jwf9TdNAmMyLdc5IoAskqUeanRkQQ+oIEf6/JJz8R+UunXEu+27Q8 4U5/hugCNiaogOeAwc2FzI5zec8Vme/UlU7QNeneeELggJxHWyQ5hIN5GWi8K/a2Klq9 oeugjMkAfm7idomDWCzsJZEXiBxwitiBV+ATyO7VnIIVd2UlIjOZkfEQl1fqAraEXYWi 2kk6NJIgEcZMLW8GDqbErTd2l61velmjj5c7m/RuryGfhlQn5vkCGVvRu8emN0Pi2A4B hS1leyGbxYR8IpyLo5Q5N4d2D63nT6SFyzmOLJT3Sm40MlXir8mfzW7x07/FQWOLJ31Z EJ3A== X-Gm-Message-State: ACrzQf3AOsvK7wSu/Fvp8DaaifBGPRsOZaPNBR6hxLHl9GLlffyIumO1 nmTYBLOXzYxfER8QYTn/vNcCahbMMcDq2M5Ibuf/Dw== X-Received: by 2002:a17:907:86a0:b0:78d:df8b:4d17 with SMTP id qa32-20020a17090786a000b0078ddf8b4d17mr13518713ejc.254.1667234238076; Mon, 31 Oct 2022 09:37:18 -0700 (PDT) MIME-Version: 1.0 References: <20221028210256.3776835-1-dlatypov@google.com> In-Reply-To: From: Daniel Latypov Date: Mon, 31 Oct 2022 09:37:06 -0700 Message-ID: Subject: Re: [PATCH 1/2] kunit: tool: make unit test not print parsed testdata to stdout To: David Gow Cc: brendanhiggins@google.com, rmoar@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" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL 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 On Sat, Oct 29, 2022 at 8:31 PM David Gow wrote: > > On Sat, Oct 29, 2022 at 5:03 AM Daniel Latypov wrote: > > > > Currently, if you run > > $ ./tools/testing/kunit/kunit_tool_test.py > > you'll see a lot of output from the parser as we feed it testdata. > > > > This makes the output hard to read and fairly confusing, esp. since our > > testdata includes example failures, which get printed out in red. > > > > Silence that output so real failures are easier to see. > > > > Signed-off-by: Daniel Latypov > > --- > > Thanks -- this has been annoying me for ages. > > That being said, this isn't a perfect fix, the "usage" text and > "Reconfiguring .config" still show up for me: > --- > davidgow@slicestar:~/Development/linux-kselftest$ > ./tools/testing/kunit/kunit_tool_test.py > ..............................usage: kunit_tool_test.py run [-h] > [--build_dir DIR] [--make_options X=Y] [--alltests] [--kunitconfig > PATHS] [--kconfig_add CONFIG_X=Y] [--arch ARCH] [--cross_compile > PREFIX] [--qemu_config FILE] [--qemu_ar > gs] [--jobs N] > [--timeout SECONDS] [--kernel_args] > [--run_isolated {suite,test}] [--raw_output [{all,kunit}]] [--json > [FILE]] > [filter_glob] > kunit_tool_test.py run: error: argument --raw_output: invalid choice: > 'invalid' (choose from 'all', 'kunit') > ..............................Generating .config ... > .Regenerating .config ... > ......... > ---------------------------------------------------------------------- > Ran 70 tests in 0.232s > > OK > --- > > That's still a significant improvement on what we had before, though, so: Yeah, I was originally going to make this patch silence all the output. But I figured I would focus this patch on just the code using our kunit_printer abstraction, aka the parser. We could address the other ones, but we'd have to mock out the built-in print function. As someone who is guilty of print(f) debugging, doing that means I no longer have an easy of way of adding debugging code to those test cases :P