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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 388B8C433FE for ; Thu, 6 Oct 2022 15:01:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230469AbiJFPB2 (ORCPT ); Thu, 6 Oct 2022 11:01:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230418AbiJFPBW (ORCPT ); Thu, 6 Oct 2022 11:01:22 -0400 Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E8F5AE202 for ; Thu, 6 Oct 2022 08:01:20 -0700 (PDT) Received: by mail-wm1-x335.google.com with SMTP id bg9-20020a05600c3c8900b003bf249616b0so1094676wmb.3 for ; Thu, 06 Oct 2022 08:01:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:from:to:cc:subject:date :message-id:reply-to; bh=mCXboyvyUW+ZS9pW2eDzzGWkdP/eMiqxpyCoOXN9g8U=; b=G8rEsyuI30VngbROKH6V73AlmNZqF/LqYD0AxHTD64TNlDQiR5aUXxGqOBW7VMtgJc WBd/eLM1mWEEhJTirjfLz73yYNfWBWWb/A9QYFxzKifX0O9Joy659mE+8SjD/SObbqJF wZ8rQiZ8RwCCip5iGf9Wgcmi/ds4neTexNTZ2HVOZaIZNAESINQjBriOXh95Etrgjuu1 i/htLl9AUePCNJGZrw7uuJ+Is0UtkW2H7I0gahB8N+sIIc6D7BdX5mlYfmi4M1fc19oA qK93APXMc0/QmZom5Bo724cTZMqV9WbxwguyYNZof2iZvieRpx1ne12FvLO7S9tBJmjp uNLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mCXboyvyUW+ZS9pW2eDzzGWkdP/eMiqxpyCoOXN9g8U=; b=s0kNLU6Z8loeiiwp5VBVcG2bR38kOTyM2pzn5Y13Aro0x63X3ZVzS4mZloheOzbH5x Sfke+MKJJS9r1dh24XqPLIsprYwEB2gHFbhcH7NXKc94KP9rkek26aQK2+etKaPtfpsB hFVsEqwl+isu2ILVXuZhzDsRAkj/0dSQbhqCrB6uRtwA5I3NShtm6xwLD/xHZgccWSy1 IDSXY2Ip89uW/XthGcumcNd68TUBiNs8ywGoC03f8qysvVhUchaoLLNCO0nbDlH5aSs9 cVwiMo8JjJ+EYfkNV6Y95QNeFtg1nDx65kPvi+6E7eaU5zde3mVnR7DJ00t40CglVA4V aBYw== X-Gm-Message-State: ACrzQf1iUnkq3HXjAazHwjoa7Ps9bwKtOjuVYTDvOsUsOSercoVWw+Sy aQHQZ4HIez1UzLZNd8zOYG2wI//lH0M= X-Google-Smtp-Source: AMsMyM6vRdj8IYmGVb610wyLi1FpZpCXuGoc0XpSBAPHiCRA4Z6sFHwWFWXECFyCk38ABwXXt6bHng== X-Received: by 2002:a05:600c:524b:b0:3b4:8c0c:f3b6 with SMTP id fc11-20020a05600c524b00b003b48c0cf3b6mr7542251wmb.50.1665068478353; Thu, 06 Oct 2022 08:01:18 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id v3-20020a5d6b03000000b0022860e8ae7csm11108006wrw.77.2022.10.06.08.01.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Oct 2022 08:01:18 -0700 (PDT) Message-Id: <472d05111a38276192e30f454f42aa39df51d604.1665068476.git.gitgitgadget@gmail.com> In-Reply-To: References: From: "Phillip Wood via GitGitGadget" Date: Thu, 06 Oct 2022 15:01:14 +0000 Subject: [PATCH 1/3] [RFC] tests: add test_todo() to mark known breakages Fcc: Sent Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit MIME-Version: 1.0 To: git@vger.kernel.org Cc: =?UTF-8?Q?=C3=86var_Arnfj=C3=B6r=C3=B0?= Bjarmason , Derrick Stolee , Phillip Wood , Phillip Wood Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Phillip Wood test_todo() is intended as a fine grained replacement for test_expect_failure(). Rather than marking the whole test as failing test_todo() is used to mark individual failing commands within a test. This approach to writing failing tests allows us to detect unexpected failures that are hidden by test_expect_failure(). Failing commands are reported by the test harness in the same way as test_expect_failure() so there is no change in output when migrating from test_expect_failure() to test_todo(). If a command marked with test_todo() succeeds then the test will fail. This is designed to make it easier to see when a command starts succeeding in our CI compared to using test_expect_failure() where it is easy to fix a failing test case and not realize it. test_todo() is built upon test_expect_failure() but accepts commands starting with test_* in addition to git. As our test_* assertions use BUG() to signal usage errors any such error will not be hidden by test_todo(). This commit coverts a few tests to show the intended use of test_todo(). A limitation of test_todo() as it is currently implemented is that it cannot be used in a subshell. Signed-off-by: Phillip Wood --- t/README | 12 +++ t/t0000-basic.sh | 64 ++++++++++++++ t/t3401-rebase-and-am-rename.sh | 12 +-- t/t3424-rebase-empty.sh | 6 +- t/t3600-rm.sh | 8 +- t/test-lib-functions.sh | 147 +++++++++++++++++++++++--------- 6 files changed, 194 insertions(+), 55 deletions(-) diff --git a/t/README b/t/README index 979b2d4833d..642aeab80b4 100644 --- a/t/README +++ b/t/README @@ -892,6 +892,10 @@ see test-lib-functions.sh for the full list and their options. - test_expect_failure []