All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Randall S. Becker" <rsbecker@nexbridge.com>
To: "'Johannes Sixt'" <j6t@kdbg.org>, "'Jeff King'" <peff@peff.net>
Cc: "'brian m. carlson'" <sandals@crustytoothpaste.net>,
	"'Junio C Hamano'" <gitster@pobox.com>, <git@vger.kernel.org>,
	"'Linux Kernel'" <linux-kernel@vger.kernel.org>,
	<git-packagers@googlegroups.com>
Subject: RE: [Breakage] Git v2.21.0-rc0 - t5318 (NonStop)
Date: Sat, 9 Feb 2019 11:55:58 -0500	[thread overview]
Message-ID: <000301d4c098$57df9720$079ec560$@nexbridge.com> (raw)
In-Reply-To: <38f594ed-0787-aeb5-d34f-2f4775243eb7@kdbg.org>

On February 9, 2019 3:40, Johannes Sixt <j6t@kdbg.org> wrote:
> 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 <rsbecker@nexbridge.com>
> Signed-off-by: Johannes Sixt <j6t@kdbg.org>
> ---
>  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

This would be fine with me. I'm going to prepare an alternative and let the committers decide.


  reply	other threads:[~2019-02-09 16:56 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-08 11:08 [Breakage] Git v2.21.0-rc0 - t5318 (NonStop) Randall S. Becker
2019-02-08 16:50 ` Jeff King
2019-02-08 17:49   ` Randall S. Becker
2019-02-08 18:03     ` Jeff King
2019-02-08 18:29       ` Johannes Sixt
2019-02-08 19:31         ` Junio C Hamano
2019-02-08 18:47       ` Randall S. Becker
2019-02-08 19:15         ` Jeff King
2019-02-08 19:26           ` Randall S. Becker
2019-02-08 19:31             ` Jeff King
2019-02-08 20:38               ` Randall S. Becker
2019-02-08 21:00                 ` Jeff King
2019-02-08 21:44                   ` Randall S. Becker
2019-02-08 22:07               ` brian m. carlson
2019-02-08 22:12                 ` Randall S. Becker
2019-02-08 22:18                   ` brian m. carlson
2019-02-08 22:36                     ` Randall S. Becker
2019-02-08 22:35                   ` Jeff King
2019-02-08 22:53                     ` Randall S. Becker
2019-02-09  4:24                       ` Jeff King
2019-02-09  8:39                         ` Johannes Sixt
2019-02-09 16:55                           ` Randall S. Becker [this message]
2019-02-09 23:29                           ` Jeff King
2019-02-10  9:40                             ` Johannes Sixt
2019-02-09 16:53                         ` Randall S. Becker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='000301d4c098$57df9720$079ec560$@nexbridge.com' \
    --to=rsbecker@nexbridge.com \
    --cc=git-packagers@googlegroups.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=j6t@kdbg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peff@peff.net \
    --cc=sandals@crustytoothpaste.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.