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

V11db_gdbm.ztst fails on Cygwin



V11db_gdbm.ztst fails on Cygwin as:

./V11db_gdbm.ztst: starting.
--- /tmp/zsh.ztst.2148/ztst.out	2017-03-02 19:26:45.040189100 +0900
+++ /tmp/zsh.ztst.2148/ztst.tout	2017-03-02 19:26:45.055788600 +0900
@@ -1,4 +1,4 @@
-c
-d
 a
 b
+c
+d
Test ./V11db_gdbm.ztst failed: output differs from expected as shown above for:
 ztie -d db/gdbm -f $dbfile dbase
 dbase=( a b c d )
 zuntie dbase
 ztie -d db/gdbm -f $dbfile dbase
 print -rl -- "${(kv)dbase[@]}"
 zuntie dbase
Was testing: replace hash / database, scan
./V11db_gdbm.ztst: test failed.


${(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. The gdbm I'm using on Cygwin is from the
Cygwin's package repository (binary distribution).

Is it really necessary to test that gdbm_{firstkey,nextkey}()
gives the same order on different OSs?

PS
On macOS V11db_gdbm.ztst succeeds (with gdbm built by myself from
the gdbm source).


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