From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1F359C433ED for ; Fri, 30 Apr 2021 16:10:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E9B876145D for ; Fri, 30 Apr 2021 16:10:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229818AbhD3QKx convert rfc822-to-8bit (ORCPT ); Fri, 30 Apr 2021 12:10:53 -0400 Received: from mav.lukeshu.com ([104.207.138.63]:46288 "EHLO mav.lukeshu.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229579AbhD3QKv (ORCPT ); Fri, 30 Apr 2021 12:10:51 -0400 Received: from lukeshu-dw-thinkpad (unknown [IPv6:2601:281:8200:26:4e34:88ff:fe48:5521]) by mav.lukeshu.com (Postfix) with ESMTPSA id 9B85480590; Fri, 30 Apr 2021 12:10:02 -0400 (EDT) Date: Fri, 30 Apr 2021 10:10:00 -0600 Message-ID: <87lf8zpxd3.wl-lukeshu@lukeshu.com> From: Luke Shumaker To: =?ISO-8859-1?Q?=C6var_Arnfj=F6r=F0?= Bjarmason Cc: Luke Shumaker , git@vger.kernel.org, Avery Pennarun , Charles Bailey , Danny Lin , "David A .\ Greene" , David Aguilar , Jakub Suder , James Denholm , Jeff King , Jonathan Nieder , Junio C Hamano , =?UTF-8?B?Tmd1?= =?UTF-8?B?eeG7hW4g?= =?ISO-8859-1?Q?Th=E1i_?= =?UTF-8?B?Tmfhu41j?= Duy , Roger L Strain , Techlive Zheng , Eric Sunshine , Luke Shumaker Subject: Re: [PATCH v3 03/30] subtree: t7900: use test-lib.sh's test_count In-Reply-To: <87wnskxfwo.fsf@evledraar.gmail.com> References: <20210426174525.3937858-1-lukeshu@lukeshu.com> <20210427211748.2607474-1-lukeshu@lukeshu.com> <20210427211748.2607474-4-lukeshu@lukeshu.com> <87wnskxfwo.fsf@evledraar.gmail.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.2 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Fri, 30 Apr 2021 03:45:10 -0600, Ævar Arnfjörð Bjarmason wrote: > On Tue, Apr 27 2021, Luke Shumaker wrote: > > Use test-lib.sh's `test_count`, instead instead of having > > t7900-subtree.sh do its own book-keeping with `subtree_test_count` that > > has to be explicitly incremented by calling `next_test`. > > This just retains an existing pattern and all that, but I think this > pattern of testing makes for hard to read & maintain tests. It looks > like all of these could just be: > > test_when_finished "rm -rf repo" && > git init repo && > [...] > > I.e. the only thing that's being done here is to piggy-back on the test > count to create a unique repo. Thanks for the tip, I'll do that for any new tests I add, going forward. -- Happy hacking, ~ Luke Shumaker