Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp439958imj; Sat, 9 Feb 2019 00:41:15 -0800 (PST) X-Google-Smtp-Source: AHgI3IaqqLD3HlH7y0wsXPCfbq/ACktUfSHY24uDPCJWPY/MDmDRaR1dXjVIjy9TRb/mLy7/H+nr X-Received: by 2002:a63:2ad4:: with SMTP id q203mr63705pgq.43.1549701675477; Sat, 09 Feb 2019 00:41:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549701675; cv=none; d=google.com; s=arc-20160816; b=UtbOjGwD4hxYbG6D0/WmjXudvEW1zvoLsT/S63ouny/IPA7ZnMq6Tk60uB7i/BeMhP xrRoMriD7gK1SCFHCwXx3solv4xktsvphNHuF6y5+bRibnfiM6aPHqy9mrKIbdXbctgw +ADYTjHkFYM7RJHdp2rabfBuONSGTRPzbHaiCndhRc6l3EtwHRYIYMYc0Ck5bKJjd1+4 5u1oyo88+YrXFutclsqcUEShitnnnHaoKvhtgR/PrUeHBwzgEDsLCQhzoNxgJ3Iy/55l OK+4BMdaBtyQoUByYMBVH4B1nfXrtU9WaGLAmVlLZwZsmkMkqAekI2+i3GeB6+/67yS5 tK/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=rjzyJ00yvZHPazjCuvu/3BokQzoEVs8zqXz2BDFCv5U=; b=rTdW1l5pDOq4dZBOQuJvXi6aURycLuhxYzdZvxyC5AX/txiYCwdP4fFzsBw8rRqBJl xx6nU3bVPDsm2XrYSRnigiNvra3+0BdbDkh71G/VJKrSb71BRfLzUVOQZDn/Ify5vrxH EBTKkOk/ydU/Yc3Sn+c8eZzC3zZRvEw51YggFmNtIVzDW2sqRfngijiZ4Huwhs17TR0K /7sHs+45OTS8KY1b+IRXcXycZcIqWwDU1DMlgteYtH8IsTsUXIIdnD4VoAQe+vHSJxxE 3bSd5AMDqMpCsIdRbTCJfKKuq/nDvgbf12KLM0jaRu2TP47In6gln/ExB72jOwEjacBV dwVw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x128si4828274pfb.128.2019.02.09.00.40.59; Sat, 09 Feb 2019 00:41:15 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726889AbfBIIjs (ORCPT + 99 others); Sat, 9 Feb 2019 03:39:48 -0500 Received: from bsmtp7.bon.at ([213.33.87.19]:3567 "EHLO bsmtp7.bon.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726702AbfBIIjs (ORCPT ); Sat, 9 Feb 2019 03:39:48 -0500 Received: from dx.site (unknown [93.83.142.38]) by bsmtp7.bon.at (Postfix) with ESMTPSA id 43xQTY23T5z5tlD; Sat, 9 Feb 2019 09:39:45 +0100 (CET) Received: from [IPv6:::1] (localhost [IPv6:::1]) by dx.site (Postfix) with ESMTP id A77381EA9; Sat, 9 Feb 2019 09:39:44 +0100 (CET) Subject: Re: [Breakage] Git v2.21.0-rc0 - t5318 (NonStop) To: Jeff King , "Randall S. Becker" Cc: "'brian m. carlson'" , 'Junio C Hamano' , git@vger.kernel.org, 'Linux Kernel' , git-packagers@googlegroups.com References: <001101d4bfd6$b9430230$2bc90690$@nexbridge.com> <20190208180321.GB27673@sigill.intra.peff.net> <002501d4bfde$b26e6050$174b20f0$@nexbridge.com> <20190208191519.GF27673@sigill.intra.peff.net> <002b01d4bfe4$2d617f40$88247dc0$@nexbridge.com> <20190208193157.GA30952@sigill.intra.peff.net> <20190208220714.GG11927@genre.crustytoothpaste.net> <005901d4bffb$6d0c34c0$47249e40$@nexbridge.com> <20190208223512.GA2135@sigill.intra.peff.net> <006601d4c001$2de3a160$89aae420$@nexbridge.com> <20190209042456.GB18286@sigill.intra.peff.net> From: Johannes Sixt Message-ID: <38f594ed-0787-aeb5-d34f-2f4775243eb7@kdbg.org> Date: Sat, 9 Feb 2019 09:39:43 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 MIME-Version: 1.0 In-Reply-To: <20190209042456.GB18286@sigill.intra.peff.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 09.02.19 um 05:24 schrieb Jeff King: > On Fri, Feb 08, 2019 at 05:53:53PM -0500, Randall S. Becker wrote: > >>> diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh index >>> 92cf8f812c..4afab14431 100644 >>> --- a/t/test-lib-functions.sh >>> +++ b/t/test-lib-functions.sh >>> @@ -1302,3 +1302,8 @@ test_set_port () { >>> port=$(($port + ${GIT_TEST_STRESS_JOB_NR:-0})) >>> eval $var=$port >>> } >>> + >>> +# Generate an output of $1 bytes of all zeroes (NULs, not ASCII zeroes). >>> +gen_zero_bytes () { >>> + perl -e 'print "\0" x $ARGV[0]' "$@" >>> +} >> >> This function does work on platform, so it's good. > > Great. Since it sounds like you're preparing some patches to deal with > /dev/zero elsewhere, do you want to wrap it up in a patch as part of > that? Please do not use yes to generate an infinite amount of bytes. Our implementation of yes() in test-lib.sh generates only 99 lines. Perhaps do this. ----- 8< ----- Subject: [PATCH] t5318: avoid /dev/zero Some platforms do not offer /dev/zero. Use printf and tr to generate a certain amount of NUL bytes. Reported-by: Randall S. Becker Signed-off-by: Johannes Sixt --- t/t5318-commit-graph.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/t/t5318-commit-graph.sh b/t/t5318-commit-graph.sh index 16d10ebce8..04d394274f 100755 --- a/t/t5318-commit-graph.sh +++ b/t/t5318-commit-graph.sh @@ -383,7 +383,8 @@ corrupt_graph_and_verify() { cp $objdir/info/commit-graph commit-graph-backup && printf "$data" | dd of="$objdir/info/commit-graph" bs=1 seek="$pos" conv=notrunc && dd of="$objdir/info/commit-graph" bs=1 seek="$zero_pos" count=0 && - dd if=/dev/zero of="$objdir/info/commit-graph" bs=1 seek="$zero_pos" count=$(($orig_size - $zero_pos)) && + printf "%0*d" $(($orig_size - $zero_pos)) 0 | tr 0 '\0' | + dd of="$objdir/info/commit-graph" bs=1 seek="$zero_pos" && test_must_fail git commit-graph verify 2>test_err && grep -v "^+" test_err >err && test_i18ngrep "$grepstr" err -- 2.20.1.86.gb0de946387