Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: V11db_gdbm.ztst fails on Cygwin



On Thu, Mar 2, 2017, at 02:52 AM, Jun T. wrote:
> @@ -1,4 +1,4 @@
> -c
> -d
>  a
>  b
> +c
> +d
> 
> ${(k)dabse} gives 'a c', instead of 'c a' as expeced by the test.
 
> The order the records are visited by gdbm_{firstkey,nextkey}()
> depends on the hash values used by gdbm, and (due to some reason
> unknown to me) it seems the hash values used on Cygwin are different
> from those used on Linux.
(...)
> Is it really necessary to test that gdbm_{firstkey,nextkey}()
> gives the same order on different OSs?

Was counting on determinism here. A fragile thing, but determinism
should guarantee this. Wonder why Cygwin's gdbm flips order.

Any idea how to write test result so that both hash key orders match?
-- 
  Sebastian Gniazdowski
  psprint3@xxxxxxxxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author