lib/util:tests/time.c - "test_timestring" - fix it on Solaris

Andrew Bartlett abartlet at samba.org
Sun Dec 5 19:59:46 MST 2010


On Sun, 2010-12-05 at 23:10 +0100, Matthias Dieter Wallnöfer wrote:
> The branch, master has been updated
>        via  654e010 lib/util:tests/time.c - "test_timestring" - fix it on Solaris
>       from  55dba7b s4:cluster/cluster.h - fix another gcc 3.4 "struct" warning
> 
> http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
> 
> 
> - Log -----------------------------------------------------------------
> commit 654e0102ddb0acaaf45fb55c15818722235fcc9f
> Author: Matthias Dieter Wallnöfer <mdw at samba.org>
> Date:   Sun Dec 5 22:20:06 2010 +0100
> 
>     lib/util:tests/time.c - "test_timestring" - fix it on Solaris
>     
>     Solaris returns "Thu Jan 01" and not "Thu Jan  1" - therefore proof for
>     both.

I'm not sure that this patch is correct.

Given we had a test for a particular value, and we carefully build the
value with strftime() if available, why does this patch accept different
values, rather than fix the the timestring() function?

In general, I'm suspicious of patches that fix tests by changing the
test result rather than fixing the original function.  

Perhaps none of the callers care, as long as it's clear to human readers
of the string, but there are rather a lot of callers to this function.

Andrew Bartlett

-- 
Andrew Bartlett                                http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org
Samba Developer, Cisco Inc.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20101206/4084dbcc/attachment.pgp>


More information about the samba-technical mailing list