From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS3215 2.6.0.0/16 X-Spam-Status: No, score=-3.4 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by dcvr.yhbt.net (Postfix) with ESMTP id 9B1421F54E for ; Fri, 29 Jul 2022 12:28:56 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="HQWd6a9Q"; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235979AbiG2M2v (ORCPT ); Fri, 29 Jul 2022 08:28:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232085AbiG2M2u (ORCPT ); Fri, 29 Jul 2022 08:28:50 -0400 Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0AAE924F38 for ; Fri, 29 Jul 2022 05:28:49 -0700 (PDT) Received: by mail-wr1-x430.google.com with SMTP id p10so1609981wru.8 for ; Fri, 29 Jul 2022 05:28:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=dYH/PJWKrAZvl1XQlIdFcunJNpZNVCkruyhnh38JqkU=; b=HQWd6a9Q51nwm37RIYiiE9gBPCoSSOfHKnKSZvhV1HLe5v8RhO5dpWVD7Xt2o88imz 96WTZFjSCufFpVn35l9vT2QSRNtuvmGIn3V2JcWuzFiDxzF77qUILE8eCKsZ8fNAQZPn AV62JF9IRuGZq+jZmilzq0KCPjgLf9mkeHgZejKeBtVx3Z1pzdEg0w9WdQemmaaem/Ic 3CxsvPfkm04I6Mu7cMY4vynOlvQF+yzl7u0yalUDLkS2yN1eZxA/dlSmE646jFrLKx8w WMrYfay5SjgJ+TxO9zSiIXjTQOYtLnn0miUJYXOKyjBi+UgGFXVijhcv44ZmIs/R8YBW 6htw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=dYH/PJWKrAZvl1XQlIdFcunJNpZNVCkruyhnh38JqkU=; b=Z6950Ff7f5h+SB8fUYuSS4PHsKkHhAvCRDnhTICQbGDOUwLms1jdH2fjwqudLBFnD3 szx3fLotK4JMggRQIxzu1SglL0lHTEoOqKfQ4bM66IXqrladhSRPfULuevOUrdRdBGcA dvAh4+u30N7JOSCN+3+/KbWXecf6SYvJ2sjr0EaWwphOyxWh2YWcziQH6Vc9vILolM8L FbVLJHR7lCXcNI8hxM2EHUmGvAi44WemVjUWzgCu5sHTo7+76FIaVGvQbIUMWWRwa3KE nTuEoULY/sc1vwfDBdq0H7fVeyMBFxtnwrOCxP1v+h2S0h3Tqb7kiSiUjBgfJZYlDxLv fT3g== X-Gm-Message-State: ACgBeo1EY+eFWPOEhTI/sE/mGCmS7oI0uW2CZ4lKGlyjNQZ36Gc0k1Za /ydA0/DGr2eP+Z5HGjDXzj2ZxWzbJTs= X-Google-Smtp-Source: AA6agR5EQ3RNeZHMwgUxDheAMGaQi9PSKFWTN33X8e+1Oo+BwC8lNMBxeNZyUBHjhnzs5d5sPEXfsQ== X-Received: by 2002:a5d:5266:0:b0:21f:1280:85f with SMTP id l6-20020a5d5266000000b0021f1280085fmr1515425wrc.412.1659097727096; Fri, 29 Jul 2022 05:28:47 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id bi9-20020a05600c3d8900b003a0375c4f73sm4000640wmb.44.2022.07.29.05.28.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jul 2022 05:28:46 -0700 (PDT) Message-Id: <501a89aa0b2de396b0c7b82b2e24046b9c98c382.1659097724.git.gitgitgadget@gmail.com> In-Reply-To: References: From: "Johannes Schindelin via GitGitGadget" Date: Fri, 29 Jul 2022 12:28:43 +0000 Subject: [PATCH 1/2] t5351: avoid relying on `core.fsyncMethod = batch` to be supported Fcc: Sent Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit MIME-Version: 1.0 To: git@vger.kernel.org Cc: Johannes Schindelin , Johannes Schindelin Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Johannes Schindelin On FreeBSD, this mode is not supported. But since 3a251bac0d1a (trace2: only include "fsync" events if we git_fsync(), 2022-07-18) t5351 will fail if this mode is unsupported. Let's address this in the minimal fashion, by detecting that that mode is unsupported and expecting a different count of hardware flushes in that case. This fixes the CI/PR builds on FreeBSD again. Note: A better way would be to test only what is relevant in t5351.6 "unpack big object in stream (core.fsyncmethod=batch)" again instead of blindly comparing the output against some exact text. But that would pretty much revert the idea of above-mentioned commit, and that commit was _just_ accepted into Git's main branch so one must assume that it was intentional. Signed-off-by: Johannes Schindelin --- bulk-checkin.c | 2 ++ t/t5351-unpack-large-objects.sh | 10 ++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/bulk-checkin.c b/bulk-checkin.c index 98ec8938424..855b68ec23b 100644 --- a/bulk-checkin.c +++ b/bulk-checkin.c @@ -340,6 +340,8 @@ void fsync_loose_object_bulk_checkin(int fd, const char *filename) */ if (!bulk_fsync_objdir || git_fsync(fd, FSYNC_WRITEOUT_ONLY) < 0) { + if (errno == ENOSYS) + warning(_("core.fsyncMethod = batch is unsupported on this platform")); fsync_or_die(fd, filename); } } diff --git a/t/t5351-unpack-large-objects.sh b/t/t5351-unpack-large-objects.sh index f785cb06173..dd7ebc40072 100755 --- a/t/t5351-unpack-large-objects.sh +++ b/t/t5351-unpack-large-objects.sh @@ -70,9 +70,15 @@ test_expect_success 'unpack big object in stream (core.fsyncmethod=batch)' ' GIT_TRACE2_EVENT="$(pwd)/trace2.txt" \ GIT_TEST_FSYNC=true \ git -C dest.git $BATCH_CONFIGURATION unpack-objects