Re: [ANNOUNCE] Git v2.9.1

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

 



Jeff King <peff@xxxxxxxx> writes:

> On Mon, Jul 11, 2016 at 11:35:05PM +0200, Andreas Schwab wrote:
>
>> Junio C Hamano <gitster@xxxxxxxxx> writes:
>> 
>> >       local_tzoffset: detect errors from tm_to_time_t
>> 
>> not ok 19 - show date (iso:5758122296 -0400)
>> #      
>> #                      echo "$time -> $expect" >expect &&
>> #                      test-date show:$format "$time" >actual &&
>> #                      test_cmp expect actual
>> #              
>> not ok 20 - show date (iso-local:5758122296 -0400)
>> #      
>> #                      echo "$time -> $expect" >expect &&
>> #                      test-date show:$format "$time" >actual &&
>> #                      test_cmp expect actual
>> 
>> This is outside the range of 32bit time_t.
>
> Yes, that's somewhat the point of the test.
>
> How does it fail for you (what does it look like with "-v")? We may be
> able to check for an outcome that matches both cases.
>
> Otherwise, we'll have to skip the test, perhaps with something like the
> patch below. I suspect the problem is actually the size of "unsigned
> long", not time_t, as we use that internally for a bunch of time
> computation.
>
> ---
> diff --git a/help.c b/help.c
> index 19328ea..0cea240 100644
> --- a/help.c
> +++ b/help.c
> @@ -419,6 +419,13 @@ int cmd_version(int argc, const char **argv, const char *prefix)
>  	 * with external projects that rely on the output of "git version".
>  	 */
>  	printf("git version %s\n", git_version_string);
> +	while (*++argv) {
> +		if (!strcmp(*argv, "--build-options")) {
> +			printf("sizeof-unsigned-long: %d",
> +			       (int)sizeof(unsigned long));
> +			/* maybe also save and output GIT-BUILD_OPTIONS? */
> +		}
> +	}
>  	return 0;
>  }

I had the same thought, except that I would have expected this to go
to one of these test-* helpers, and then a lazy prereq for 64-bit
time_t would be written on top of it to skip these new tests.

> +build_option () {
> +	git version --build-options |
> +	sed -ne "s/^$1: //p"
> +}
> +
> +test_lazy_prereq 64BIT '
> +	test 8 -le "$(build_option sizeof-unsigned-long)"
> +'

It is somewhat disturbing that nobody seems to be regularly building
on 32-bit platforms these days, which is the only reason I can think
of why this was never reported until it hit a maintenance track.
This should have been caught last week at f6a729f3 (Merge branch
'jk/tzoffset-fix', 2016-07-06) when the topic hit 'master' at the
latest, and more preferrably it should have already been caught last
month at 08ec8c5e (Merge branch 'jk/tzoffset-fix' into next,
2016-06-28).

Those who care about 32-bit builds need to start building and
testing 'next' and 'master' regularly, or similar breakages are
bound to continue happening X-<.

Volunteers?

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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]