Article View: linux.kernel.git
Article #2691Re: [PATCH 2/3] t: add "test-tool genbytes" to avoid slow tr(1) on macOS
From: Johannes Sixt
Date: Mon, 09 Nov 2026 09:33
Date: Mon, 09 Nov 2026 09:33
35 lines
8577 bytes
8577 bytes
Am 08.11.26 um 17:34 schrieb Johannes Sixt:
> Am 08.11.26 um 13:24 schrieb Kristofer Karlsson:
>> - test-tool genzeros 2147483649 | tr "\000" "1" >expect &&
>> + printf 000000000%02147483640d 0 >expect &&
>>
>> I tried this out and it works on Linux but fails on macOS[1]. What
>> happens is that printf only outputs the nine literal zeros
>> ("000000000") there, and silently ignores the very large padding.
>
> Fair enough.
>
>> [1] https://github.com/gitgitgadget/git/actions/runs/42475956442/job/128717309586
Well, this patch passed for me[2], but I have no idea whether the
particular tests were skipped due to the EXPENSIVE prerequisite or not.
[2] https://github.com/j6t/git/actions/runs/42583623620/job/129048078411
diff --git a/t/t4205-log-pretty-formats.sh b/t/t4205-log-pretty-formats.sh
index 01b97c8888..5dedb9054e 100755
--- a/t/t4205-log-pretty-formats.sh
+++ b/t/t4205-log-pretty-formats.sh
@@ -1182,7 +1182,8 @@ unfold () {
'
test_expect_success EXPENSIVE,SIZE_T_IS_64BIT 'set up huge commit' '
- test-tool genzeros 2147483649 | tr "\000" "1" >expect &&
+ # 3 * 715827883 == 2147483649
+ printf %0715827883d 0 0 0 >expect &&
huge_commit=$(git commit-tree -F expect HEAD^{tree})
'
Technical Details
Message-ID:
<ddea802a-d4f4-4de9-9108-e68201841bc4@kdbg.org>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-74892-linux-kernel-git=dewy.ruReferences:
<pull.2301.git.1794063565.gitgitgadget@gmail.com> <4c02ada9b85028f26f7e7bcc62e2ac12443da9c5.1794063565.git.gitgitgadget@gmail.com> <50b6c35f-e9c3-47ef-8fca-aebd2620623a@kdbg.org> <CAL71e4NFyAShDZPW9JRB7Bpg3aLY5mY4wdn5m_ZYoLQjHZw_jA@mail.gmail.com> <6992b7e9-8721-4e1f-9c00-9fd0e0704e80@kdbg.org> <CAL71e4NKsTZNoLFOuSPfiJPf7oS57S01MpM5V+UOr+bgMGjOkQ@mail.gmail.com> <c8688e1a-17b6-4d0b-ba9a-fc1e0fa8938b@kdbg.org>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-74892-linux-kernel-git=dewy.ru From: j6t@kdbg.org (Johannes Sixt) Newsgroups: linux.kernel.git Subject: Re: [PATCH 2/3] t: add "test-tool genbytes" to avoid slow tr(1) on macOS Date: Mon, 9 Nov 2026 10:33:03 +0100 Organization: Usenet Network Message-ID: <ddea802a-d4f4-4de9-9108-e68201841bc4@kdbg.org> References: <pull.2301.git.1794063565.gitgitgadget@gmail.com> <4c02ada9b85028f26f7e7bcc62e2ac12443da9c5.1794063565.git.gitgitgadget@gmail.com> <50b6c35f-e9c3-47ef-8fca-aebd2620623a@kdbg.org> <CAL71e4NFyAShDZPW9JRB7Bpg3aLY5mY4wdn5m_ZYoLQjHZw_jA@mail.gmail.com> <6992b7e9-8721-4e1f-9c00-9fd0e0704e80@kdbg.org> <CAL71e4NKsTZNoLFOuSPfiJPf7oS57S01MpM5V+UOr+bgMGjOkQ@mail.gmail.com> <c8688e1a-17b6-4d0b-ba9a-fc1e0fa8938b@kdbg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Injection-Info: usenet.network; logging-data="318780"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:cysmowJVoQxG5poDNoxouy2Q9Gs= sha256:yYqxbxOIM/dXSBR17NpLBCjTHKN1xa1GLPcKE22h+uA= sha1:0mofU943peet1osbALWn3uOXyno= sha256:DZlgN0zuCPMCJ1NiNu3gTy1JJbboEL9HoiGxgj95g7I= Content-Language: en-US List-ID: <git.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 94D0C113761; Mon, 9 Nov 2026 12:39:05 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -2.951 X-Spam-Status: No, score=-2.951 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 17EK4TAbsBi9; Mon, 9 Nov 2026 12:38:59 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=git+bounces-74892-linux-kernel-git=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=kdbg.org X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mail.dewy.ru (Postfix) with ESMTPS id 5D34D113763; Mon, 9 Nov 2026 12:38:56 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by tor.lore.kernel.org (Postfix) with ESMTP id B503CE3816; Mon, 9 Nov 2026 09:33:17 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1794216795; b=1TYblM35BoLy//kmxbEOTodyBm/ipL/ZuzNw6LaSuXFu56UCn8SaaHYSYurhalyxG9sj gQoMnUECETG+42F6whn2KTEEGaH9Ucl71dQVuRie3SFwK6neGEFDv6Vi0QjiaPaqpqajC 1d6f3AgMQaF6dPgQh7Xudf+rnrl0kqQdFncYLPGIRLFuD1KFqIc3GMd33yOI6u4ZiJnBr t8qgsG5woXl4q9COTJtVp3gqOyRwUHFSQRWr//NN5drMQGIGuLExVtKQsqbW+bq4+daR1 MhSl+23/WKXnGJbhSgDQQaA3WJQyGJblWl8HET69G7x8D8/Dj7z96LHyMSesANhSZpw== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794216795; h=X-Original-To:Received:DMARC-Filter:Received:Message-ID:Date: X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe: List-Unsubscribe:List-Owner:Precedence:MIME-Version:User-Agent: Subject:From:To:Cc:References:Content-Language:In-Reply-To: Content-Type:Content-Transfer-Encoding; bh=z3W3Qg8QFXCjIuK9W5vq/n+2Rzg3/vXzcbXPulAAASo=; b=mP5O0y0zkCL9wwqxvpWyUX47TklrPBS7mV0k0Ci8bKnsuq1BwgAFDSLYIMD6pu3vVO2D I2UhC4/JCSaZHMos7mx8n+6cg/rgjoZDVLjf9BWwd/lQDouPnwYka8TdbPvlrH3S3paLq zKdKlPR1XUo27KBGZZlXSzimXrD/t04Y9vhBVA+fgfQyQ+CMLAldj1E8qle4nHhhIWFmI nZ9oDkRYBQRps08dA/ZlUdgbPjhtSHZ1qVkfwjfmu22yQ+tSsxPAvREi/ZD9ITFK4VOJs f0Hpbs6+jW3M8iS9DMGFiYMKeIx0vklsKW0sR8iLx+naInDFhQryiS5G0/UnIu25USg== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=none header.from=kdbg.org; spf=pass smtp.mailfrom=kdbg.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7764C606A335; Mon, 9 Nov 2026 09:33:15 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=213.33.87.14 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794216794; b=RG1SZFOQP3Nv3xGQX9KJZBEPa3C7Z1+WIgdrGb194sTA9wFnBPn/IdKjRw60ozRi123P veKbFhwLqqi8Fnf3yalUOmIW6CY4PFcJamsEYdLHIWlFXl+VgvfRGWyLGm9NYHyiLZVEK Xsx4ZDZ45bfauz+GTUSy/CJdht5sW59cZjuSnLzFIpOP7Iq809uz6NoOvGFUNjQmD3mk5 quhsjjBwEU4IyZT4guCquf4REPmCZeT3IjGTrzwUjtd6YcxuJPSmsQtl+WyOtXpDvcw0j MKQWSkiHR99a0X8IKHswo4ychRt9NgHYmo5aI2Rw2myB1/YZHAyNyUiXnPrtBmsTUrg== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794216794; h=DMARC-Filter:Received:Message-ID:Date:MIME-Version:User-Agent: Subject:From:To:Cc:References:Content-Language:In-Reply-To: Content-Type:Content-Transfer-Encoding; bh=z3W3Qg8QFXCjIuK9W5vq/n+2Rzg3/vXzcbXPulAAASo=; b=fAEI9GDCUPy+kZQLnisbPix8UwJJXkNxMXYcOoDLtGm6FZ7m1ufXKSDbYpv8QR5HxOD5 w37bcRSh8LTyWuvU1DaCGKOlE7d3gwZG9kbnM8TmcYsfZvc5CQlL+7R7zwr+WJQ7FJT3j XlfhNGIW5wAQafrxa2xe68c7ejn1L5Gib6eoWh4cyPQMVoCOi06lKmd+EdRovl/V462pa VXzO/aDQz+JX+kq74EeI8965CSbZuo1LM87+a0sgjytu/jwZKaqTHGHhygtTATKxlOjG4 MitUv/AQp/ezhq/caxQzuL0RXJJ4KldxzA7zAeKU3cQiUNuB1STGiKfZRfvSjYHIZfw== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=kdbg.org; spf=pass smtp.mailfrom=kdbg.org; arc=none smtp.remote-ip=213.33.87.14 X-Received: from bsmtp.bon.at (bsmtp.bon.at [213.33.87.14]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E78C5606A31C for <git@vger.kernel.org>; Mon, 9 Nov 2026 09:33:13 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org E78C5606A31C X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kdbg.org X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kdbg.org X-Received: from [192.168.0.102] (unknown [93.83.142.38]) by bsmtp.bon.at (Postfix) with ESMTPSA id 4jNPhv5B8MzRrZy; Mon, 9 Nov 2026 10:33:03 +0100 (CET) X-Mailing-List: git@vger.kernel.org X-List-Post: <mailto:git@vger.kernel.org> X-List-Help: <mailto:git+help@vger.kernel.org> X-List-Subscribe: <mailto:git+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:git+owner@vger.kernel.org> X-Precedence: list X-User-Agent: Mozilla Thunderbird X-Cc: Patrick Steinhardt <ps@pks.im>, git@vger.kernel.org, Kristofer Karlsson via GitGitGadget <gitgitgadget@gmail.com> X-In-Reply-To: <c8688e1a-17b6-4d0b-ba9a-fc1e0fa8938b@kdbg.org>