Message ID | 20221102164005.2516646-3-dlatypov@google.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp19166wru; Wed, 2 Nov 2022 09:47:01 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5pZkBSPyl+LTgMCMtZwscbdJkXZp89XZqpBz4IuNNe0p8Ng24iQNmuhePTTCdHRRkWmNV2 X-Received: by 2002:a17:906:2681:b0:783:6a92:4c38 with SMTP id t1-20020a170906268100b007836a924c38mr24492723ejc.75.1667407621537; Wed, 02 Nov 2022 09:47:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667407621; cv=none; d=google.com; s=arc-20160816; b=vzcTzYHJnWMTKuGJZ1UGVD845lPKo3uwsRx9atJpRXV09/M6IJ0eRLuvdq5T2bohqU sPxaFONqwdNfeJ4iyHWZWpFL8n78xLO/jTcfTFbgfPukPXHAzdGE6p1d5VyXeWAbjexz X5YJzjI33/E+Cn2NJ1SynKN2CozG3g9/qQZJcuTtG/qVH+q7oxFEieC7PBfuHHT580e6 IS0ek4E2EJmpfRa2W4Wgp0kT0IZ0cgLt+tA3KMfqCtHfa143As+p+oRjyzcSTARkVemA OEDnU5smouGn2K5wg6GqA+rAX6cWriiDdfe9ZtOS5h8vu0EYuBjs8t5ePMShzg96iuZU JVbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:dkim-signature; bh=YpyV4sjuN6nTtNbz4mfvOqF+6FZYm3YsT8sqkJTRsbo=; b=eDu39BGEXO5t0l1vyA/Wl6AGP4e4GTkIgG93TQ6O36NKE+CNQ2rUSYLPnhqR6VYX/O Q4GIpo0hKNm4u7nJAc7fLdPLPXK14S8iHUlL8Cjd8sadcKvfOFcoib4ER/eTzF1HR64d 1e0kvtpnNk9BmGtIKXlbigF3WiXgg6A3M6kEFyxgkyONVk6tIRtib7mjdRtADOakNHGb ZGHeev80PLYSU+ZR8zNakRDSGo9LaX5DwpQg5JHRbRUkl1O4ieUAQ4xUy9CuccB7tKKb hDBPu+fqxSxrv66BYU6sUxZf5YSN715jVcYAlHRe9VGljOh5k67YNujHebE6bn7weg51 zQew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=tYOdkg3v; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k26-20020aa7d8da000000b0045bfaaab6d1si13198307eds.48.2022.11.02.09.46.25; Wed, 02 Nov 2022 09:47:01 -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=tYOdkg3v; 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 S232075AbiKBQpD (ORCPT <rfc822;yves.mi.zy@gmail.com> + 99 others); Wed, 2 Nov 2022 12:45:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230394AbiKBQoj (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 2 Nov 2022 12:44:39 -0400 Received: from mail-yw1-x114a.google.com (mail-yw1-x114a.google.com [IPv6:2607:f8b0:4864:20::114a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8048510B4 for <linux-kernel@vger.kernel.org>; Wed, 2 Nov 2022 09:40:45 -0700 (PDT) Received: by mail-yw1-x114a.google.com with SMTP id 00721157ae682-367f94b9b16so162842097b3.11 for <linux-kernel@vger.kernel.org>; Wed, 02 Nov 2022 09:40:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=YpyV4sjuN6nTtNbz4mfvOqF+6FZYm3YsT8sqkJTRsbo=; b=tYOdkg3vf+59PIaLFlt3AchFCjbgSfE5+sKR/Ibm9yt6tvf4L9pmL54S+KOmiWse82 LH5y2tsuRIQlIw6+jxyiY+OBIrhZ59fPZKJj9ay1usM6BRCSTyP5B7d0hybfCT3bG7K6 bVKYaq4DI4E+j1yO6LoRWzS8Ie91OLuCW982zwz/Es9Xl1EedNUp/WcVIGO40vJ/nQIs vG9QINdWWcmb7eFn7AQS0fAe0OTQ0OCKgaoQj9O7tEZ4GjxlXFkLmRGvj9MN+JhMwkj2 4S3KK+LP8iupGAOh/1/c2ii1SS7tBoc2Pt/u4ZQZ0dHrHcfX7i8Lb9NNDlY+L7q2bMea gDLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=YpyV4sjuN6nTtNbz4mfvOqF+6FZYm3YsT8sqkJTRsbo=; b=D4qKFX3Dw0p9+5LVMAQtN2O+6g5tgIsLWc5nKzj6yg/UW+1VOhCppPisd6CDdE55bQ bcum+FRLJQSCM8/KIkGVIM+wcnsp5Z7u2SzACNr2eW1oYLcvqh1fjVXkZzwfH8WJ+m69 eOUfqGXvBSkIjX6WQChOa9ZMCpU6dorSD8bzNfZ6k/d6RJHIGLPleKm2hSaDljNKIMEP D9tnDJLxEOfZNQd6LEzSXPT56WJ1fJfMSa213ILMkrp/wLUy+8elPpaJl8+/HipemBnb iTkuDxeviKDkDZidfAo7N0Q3ed5+cW8x4Yh2f9PBv75MLiBTl4byOt82MCnmalPZJ0iQ ke6w== X-Gm-Message-State: ACrzQf1kDhxoPz/+guGLhu9BTObnkyFFasoOf+d5SntF9pHGvdEyA2bZ RBjWGM/FW1+GjYfAoiXR4lARt5UmnPARtA== X-Received: from dlatypov-spec.c.googlers.com ([fda3:e722:ac3:cc00:24:72f4:c0a8:3f35]) (user=dlatypov job=sendgmr) by 2002:a81:1e10:0:b0:36b:532a:52be with SMTP id e16-20020a811e10000000b0036b532a52bemr23987758ywe.54.1667407244828; Wed, 02 Nov 2022 09:40:44 -0700 (PDT) Date: Wed, 2 Nov 2022 09:40:05 -0700 In-Reply-To: <20221102164005.2516646-1-dlatypov@google.com> Mime-Version: 1.0 References: <20221102164005.2516646-1-dlatypov@google.com> X-Mailer: git-send-email 2.38.1.273.g43a17bfeac-goog Message-ID: <20221102164005.2516646-3-dlatypov@google.com> Subject: [PATCH 3/3] kunit: tool: remove redundant file.close() call in unit test From: Daniel Latypov <dlatypov@google.com> To: brendanhiggins@google.com, davidgow@google.com Cc: rmoar@google.com, linux-kernel@vger.kernel.org, kunit-dev@googlegroups.com, linux-kselftest@vger.kernel.org, skhan@linuxfoundation.org, Daniel Latypov <dlatypov@google.com> Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748403613806164742?= X-GMAIL-MSGID: =?utf-8?q?1748403613806164742?= |
Series |
[1/3] kunit: tool: make TestCounts a dataclass
|
|
Commit Message
Daniel Latypov
Nov. 2, 2022, 4:40 p.m. UTC
We're using a `with` block above, so the file object is already closed.
Signed-off-by: Daniel Latypov <dlatypov@google.com>
---
tools/testing/kunit/kunit_tool_test.py | 2 --
1 file changed, 2 deletions(-)
Comments
On Thu, Nov 3, 2022 at 12:40 AM Daniel Latypov <dlatypov@google.com> wrote: > > We're using a `with` block above, so the file object is already closed. > > Signed-off-by: Daniel Latypov <dlatypov@google.com> > --- Nice catch. Reviewed-by: David Gow <davidgow@google.com> Cheers, -- David > tools/testing/kunit/kunit_tool_test.py | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/tools/testing/kunit/kunit_tool_test.py b/tools/testing/kunit/kunit_tool_test.py > index 0063773c0fc4..c41567eaf3c3 100755 > --- a/tools/testing/kunit/kunit_tool_test.py > +++ b/tools/testing/kunit/kunit_tool_test.py > @@ -239,8 +239,6 @@ class KUnitParserTest(unittest.TestCase): > self.assertEqual( > "example", > result.subtests[1].name) > - file.close() > - > > def test_ignores_prefix_printk_time(self): > prefix_log = test_data_path('test_config_printk_time.log') > -- > 2.38.1.273.g43a17bfeac-goog >
diff --git a/tools/testing/kunit/kunit_tool_test.py b/tools/testing/kunit/kunit_tool_test.py index 0063773c0fc4..c41567eaf3c3 100755 --- a/tools/testing/kunit/kunit_tool_test.py +++ b/tools/testing/kunit/kunit_tool_test.py @@ -239,8 +239,6 @@ class KUnitParserTest(unittest.TestCase): self.assertEqual( "example", result.subtests[1].name) - file.close() - def test_ignores_prefix_printk_time(self): prefix_log = test_data_path('test_config_printk_time.log')