Re: [PATCH] t5500.43: make the check a bit more robust

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Johannes Schindelin via GitGitGadget" <gitgitgadget@xxxxxxxxx>
writes:

> Note: we have code in `demultiplex_sideband()` _specifically_ to stitch
> back together lines that were delivered in separate sideband packets.
> However, this stitching fails when a primary packet is delivered in
> between the two sideband packets: since a primary packet was received,
> `demultiplex_sideband()` has to return that (and cannot wait for other
> sideband packets, and therefore has to flush any incomplete line it
> received).

Ouch.  Good find.

>  	git -C myclient fetch --progress origin 2>log &&
> -	test_i18ngrep "remote: Total 3 " log
> +	if ! test_i18ngrep "remote: Total 3 " log
> +	then
> +		# It is possible that the "Total 3" line is delivered in
> +		# multiple sideband packets, and that a primary packet is
> +		# delivered in between. When that happens, the line will be
> +		# presented on multiple "remote:" lines.
> +		sed "/^remote: T/{
> +			:a
> +			N
> +			s/\nremote: //
> +			ba

OK, so if we see multiple and adjacent "remote:" lines, we strip the
leading "remote: " prefix from the second and subsequent lines and
concatenate them into one giant line?  Sounds good.

Will queue.  Thanks.

> +		}" log >log.unsplit &&
> +		test_i18ngrep "remote: Total 3 " log.unsplit
> +	fi
>  '
>  
>  test_expect_success 'in_vain resetted upon ACK' '
>
> base-commit: d4a392452e292ff924e79ec8458611c0f679d6d4



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux