New tests added in 2.1.3 fails on ppc64l4
It failed in ldb_connect
(gdb) l
2166 }
2167 ldb_module_set_private(ldb_kv->module, ldb_kv);
2168 talloc_steal(ldb_kv->module, ldb_kv);
2169
2170 if (ldb_kv_cache_load(ldb_kv->module) != 0) {
2171 ldb_asprintf_errstring(ldb, "Unable to load ltdb cache "
2172 "records for backend '%s'", name);
2173 talloc_free(ldb_kv->module);
2174 return LDB_ERR_OPERATIONS_ERROR;
2175 }
(gdb) bt
#0 ldb_kv_init_store (ldb_kv=0x10003f5e0, name=0x7ffff7064bc0 "ldb_mdb backend", ldb=0x10003f3b0, options=0x7fffffffdee8, _module=0x10003f3b0) at ../../ldb_key_value/ldb_kv.c:2171
#1 0x00007ffff7063f70 in lmdb_connect (ldb=0x10003f3b0, url=<optimized out>, flags=<optimized out>, options=0x7fffffffdee8, _module=0x10003f3b0) at ../../ldb_mdb/ldb_mdb.c:1141
#2 0x00007ffff7f1bc04 in ldb_module_connect_backend (ldb=0x10003f3b0, url=0x100038fd0 "mdb://lmdb_free_list_test.ldb", options=0x7fffffffdee8, backend_module=0x10003f3b0)
at ../../common/ldb_modules.c:217
#3 0x00007ffff7f451d0 in ldb_connect (ldb=0x10003f3b0, url=0x100038fd0 "mdb://lmdb_free_list_test.ldb", flags=<optimized out>, options=0x7fffffffdee8) at ../../common/ldb.c:269
#4 0x0000000100002c44 in setup (state=0x1000302b0) at ../../tests/ldb_lmdb_free_list_test.c:170
#5 0x00007ffff7e67da8 in cmocka_run_one_test_or_fixture () from /lib64/libcmocka.so.0
#6 0x00007ffff7e68490 in _cmocka_run_group_tests () from /lib64/libcmocka.so.0
#7 0x0000000100001478 in main (argc=<optimized out>, argv=<optimized out>) at ../../tests/ldb_lmdb_free_list_test.c:666
sh-5.0# ./bin/ldb_lmdb_free_list_test
[==========] Running 3 test(s).
[ RUN ] test_free_list_no_read_lock
Could not run test: 0x1 != 0
[ LINE ] --- ../../tests/ldb_lmdb_free_list_test.c:171: error: Failure!Test setup failed
[ ERROR ] test_free_list_no_read_lock
Failed to connect to 'mdb://lmdb_free_list_test.ldb' with backend 'mdb': Unable to load ltdb cache records for backend 'ldb_mdb backend'[ RUN ] test_free_list_read_lock
Could not run test: 0x1 != 0
[ LINE ] --- ../../tests/ldb_lmdb_free_list_test.c:171: error: Failure!Test setup failed
[ ERROR ] test_free_list_read_lock
Failed to connect to 'mdb://lmdb_free_list_test.ldb' with backend 'mdb': Unable to load ltdb cache records for backend 'ldb_mdb backend'[ RUN ] test_free_list_stale_reader
Could not run test: 0x1 != 0
[ LINE ] --- ../../tests/ldb_lmdb_free_list_test.c:171: error: Failure!Test setup failed
[ ERROR ] test_free_list_stale_reader
Failed to connect to 'mdb://lmdb_free_list_test.ldb' with backend 'mdb': Unable to load ltdb cache records for backend 'ldb_mdb backend'[==========] 3 test(s) run.
[ PASSED ] 0 test(s).
The standard dictionary in Python 3.7 is ordered
But it can fail with python2
Simple reproducer:
for i in {1..10}; do PYTHONHASHSEED=random python2 -c 'import ldb; msg = ldb.Message(); msg.dn = ldb.Dn(ldb.Ldb(), "dc=foo29"); msg["dc"] = b"foo"; print(repr(msg)) '; done
======================================================================
FAIL: test_repr (__main__.LdbMsgTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "tests/python/api.py", line 2322, in test_repr
"Message({'dn': Dn('dc=foo29'), 'dc': MessageElement(['foo'])})")
AssertionError: "Message({'dc': MessageElement(['foo']), 'dn': Dn('dc=foo29')})" != "Message({'dn': Dn('dc=foo29'), 'dc': MessageElement(['foo'])})"
----------------------------------------------------------------------
Ran 1025 tests in 29.146s
FAILED (failures=1)
sh-4.4# make all
PYTHONHASHSEED=1 WAF_MAKE=1 ../../buildtools/bin/waf build
/bin/sh: ../../buildtools/bin/waf: No such file or directory
make: *** [Makefile:7: all] Error 127
- Apply a patch to hide local ABI symbols to avoid issues with new binutils
- Patch the waf script to explicitly call python2 as "env python" doesn't
yield py2 anymore