Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp2982916ybh; Mon, 16 Mar 2020 13:28:57 -0700 (PDT) X-Google-Smtp-Source: ADFU+vt/Fq0eheWrVSC5XqoYwXXxDGSDnSgCD5vlHHwwiaNwJ5Fh5PERGBb+chS4Kks5GRxJL1/e X-Received: by 2002:aca:4e08:: with SMTP id c8mr971499oib.143.1584390536922; Mon, 16 Mar 2020 13:28:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584390536; cv=none; d=google.com; s=arc-20160816; b=xJf9Wq1xQW/6e7kdpvMArX7iEd8G/E1Qzz61rQO9VbYQSZBxio5EY32kFYOgg3Ohrj R8gkWZwfTFhvqbMuXFG6G+RkwldSvQRgDDUoyPdku3ZIwb8KIXASfejijzTNuIoTaJhf KZ0TPB+B5yxO9uW92CNrMXtRhvLWDDQ/mABK3NwbpCEVWDyGs2CUCopyBlS6vlw3UCUi F/irfddhrVkZFZfDWAScWwchOCRbzuw8Mm7baR/kBTal4sr5U9q3F2ZNm1oIicEIf210 U4vTU+y1cjIe5fPqWIe60wW23GNrlcEIWPm0bdRRTq3SEPTQscKYj1OPQlPxKFunK6aJ sPmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=S2gv1QhjogxptslpnkdxgZhw8u/nAyfilbVaSMlvcmU=; b=eEDEVg0BZ8AVpNjwD6P/t9Gktt0R+y5F2ifEy3df6DdAWVUFOMlfkjTLgx6/i+pbKI q1m/1ZoV+1D0zyAOSM1lTFjUGD04ikknPO3DSSnnXbwLL0BWAsjicFJf6S5zzu9W3698 k62ldrDXoE1zAkIKcNcPdFTRnD2udJib0BqkQtG0M2zn4nje1b9NXGR01DuaMxFYs0AA 2MtWt45OPA7rElkeaa3kB6s2+8kBfep6p17NxsirFFMeKzcGP72EJlTTKRqEIqWFFzLc cpOfo8sovZz+qZ7jJUjNV4SzZxMX2gHXMGtHH7Lr9Rua9Yw/LpIOuIylLveelfCG+ozG 7NUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=PMiOVc3v; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id l13si474506oib.268.2020.03.16.13.28.43; Mon, 16 Mar 2020 13:28:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=PMiOVc3v; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1732542AbgCPU1c (ORCPT + 99 others); Mon, 16 Mar 2020 16:27:32 -0400 Received: from mail-qk1-f195.google.com ([209.85.222.195]:34765 "EHLO mail-qk1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732505AbgCPU1c (ORCPT ); Mon, 16 Mar 2020 16:27:32 -0400 Received: by mail-qk1-f195.google.com with SMTP id f3so28658719qkh.1 for ; Mon, 16 Mar 2020 13:27:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=S2gv1QhjogxptslpnkdxgZhw8u/nAyfilbVaSMlvcmU=; b=PMiOVc3vQbipGLvlB6qHP0Ixsz0PjMhpv8/8WD86hkkaD7DCDUtRTaLv/Veghz8yaY bvFeSUzKfRpitgsIMyOeBQAuV41Om8Rc9UX5jsVnzyLjCi2sKG2KpkOdOE766UR8i3hs PgFjzwqYOdh8+BQBzqxGXIn0Q5ZUxAI/GrGwdpyRsQDguhXbbODhq4N1b50sVPPsZgUS CJnTQZNio8h84hnqW5iF21LNrggfj1AYOUbxqfrVKa596fPHNv0gl22xM7u0Jtm3i2aa 8iKSnsdnqs1zTlQYqLDoUchqW432txsk+lO735Fm+yRfyhH901W50Yk78OmLgnf0QJVb f0Jw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=S2gv1QhjogxptslpnkdxgZhw8u/nAyfilbVaSMlvcmU=; b=YrefEpWt0+qEN8OW+iCKZ/QskzISFXkzUWE3ZoSH5BDNI69fd9cGwvJXjX+/NUEo8w yNNW5Ft6qO/YrHjHzbLqMM8kyNT/UpuSQ3++LPFNv726+2xQKPt5x7iCsYaoZxRzeoZb 1CendQP66ifKq3E4aeePIQB1IFI/6v2wRJQwq+4TyV1p6VNvm5rUVMBPBReshkKsNAPi wxYxx4p28JJ02BBz7AmIN93gCHtWgW0Jmg+/m4ayA+Wfu0Mw8xUNTRbr3eCj4v8ADVXH Hi7cK601qiMXaQ5qvciUs99RGzK1q+H4FaJ77AjpF0DkWa3Axdgv2wOPiiF0DEvT/Ont NmJg== X-Gm-Message-State: ANhLgQ2UDzrqVGh4qnJN3D47PBUSdBNHHyw+H1dU1PhZIvZ7LWEzy0jm e4geV7JPbPuS+zoxgoC1At8eIyNMBBamrl2LR6bR2Q== X-Received: by 2002:a37:f511:: with SMTP id l17mr1520749qkk.479.1584390450866; Mon, 16 Mar 2020 13:27:30 -0700 (PDT) MIME-Version: 1.0 References: <20200305200409.239406-1-heidifahim@google.com> In-Reply-To: From: Heidi Fahim Date: Mon, 16 Mar 2020 13:27:19 -0700 Message-ID: Subject: Re: [PATCH v2 1/2] kunit: kunit_parser: make parser more robust To: shuah Cc: Brendan Higgins , Linux Kernel Mailing List , "open list:KERNEL SELFTEST FRAMEWORK" , KUnit Development Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 13, 2020 at 1:22 PM shuah wrote: > > On 3/5/20 2:25 PM, Brendan Higgins wrote: > > On Thu, Mar 5, 2020 at 12:04 PM Heidi Fahim wrote: > >> > >> Previously, kunit_parser did not properly handle kunit TAP output that > >> - had any prefixes (generated from different configs e.g. > >> CONFIG_PRINTK_TIME) > >> - had unrelated kernel output mixed in the middle of > >> it, which has shown up when testing with allyesconfig > >> To remove prefixes, the parser looks for the first line that includes > >> TAP output, "TAP version 14". It then determines the length of the > >> string before this sequence, and strips that number of characters off > >> the beginning of the following lines until the last KUnit output line is > >> reached. > >> These fixes have been tested with additional tests in the > >> KUnitParseTest and their associated logs have also been added. > >> > >> Signed-off-by: Heidi Fahim > > > > Reviewed-by: Brendan Higgins > > > > Heidi and Brendan, > > git apply is throwing away formatting in > > tools/testing/kunit/test_data/test_config_printk_time.log > > > Applying: kunit: kunit_parser: make parser more robust > .git/rebase-apply/patch:396: space before tab in indent. > # Subtest: kunit-resource-test > .git/rebase-apply/patch:397: space before tab in indent. > 1..5 > .git/rebase-apply/patch:398: space before tab in indent. > ok 1 - kunit_resource_test_init_resources > .git/rebase-apply/patch:399: space before tab in indent. > ok 2 - kunit_resource_test_alloc_resource > .git/rebase-apply/patch:400: space before tab in indent. > ok 3 - kunit_resource_test_destroy_resource > warning: squelched 11 whitespace errors > warning: 16 lines add whitespace errors. > > Can you fix this and resend patches. If apply this as is, > all the formatting you have in there goes away. > > This is what gets applied. > > [ 0.060000] TAP version 14 > [ 0.060000] # Subtest: kunit-resource-test > [ 0.060000] 1..5 > [ 0.060000] ok 1 - kunit_resource_test_init_resources > [ 0.060000] ok 2 - kunit_resource_test_alloc_resource > [ 0.060000] ok 3 - kunit_resource_test_destroy_resource > [ 0.060000] ok 4 - kunit_resource_test_cleanup_resources > [ 0.060000] ok 5 - kunit_resource_test_proper_free_ordering > [ 0.060000] ok 1 - kunit-resource-test > [ 0.060000] # Subtest: kunit-try-catch-test > [ 0.060000] 1..2 > [ 0.060000] ok 1 - kunit_test_try_catch_successful_try_no_catch > [ 0.060000] ok 2 - kunit_test_try_catch_unsuccessful_try_does_catch > [ 0.060000] ok 2 - kunit-try-catch-test > [ 0.060000] # Subtest: string-stream-test > [ 0.060000] 1..3 > [ 0.060000] ok 1 - string_stream_test_empty_on_creation > [ 0.060000] ok 2 - string_stream_test_not_empty_after_add > [ 0.060000] ok 3 - string_stream_test_get_string > [ 0.060000] ok 3 - string-stream-test > [ 0.060000] List of all partitions: > [ 0.060000] No filesystem could mount root, tried: > > thanks, > -- Shuah Thanks Shuah. I made the fix by marking the .log files as binaries which should make the git apply work well now. See my v3 patch for specifics. Best, Heidi