From ce50f1f3ac9c2e053b1b4644587be8ef1f69af88 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Fri, 29 Jul 2022 12:28:43 +0000 Subject: t5351: avoid relying on `core.fsyncMethod = batch` to be supported 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 Signed-off-by: Junio C Hamano --- t/t5351-unpack-large-objects.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 't') diff --git a/t/t5351-unpack-large-objects.sh b/t/t5351-unpack-large-objects.sh index f785cb0617..dd7ebc4007 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