1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
samba-mirror/lib/ldb
Lukas Slebodnik 7a7a5ccf50 ldb: The test api.py should not rely on order of entries in dict
Test failed on s390x but there is a simple reproducer for any
architecture.

The built-in function repr returns the canonical string representation
of the object. We needn't care about order attributes in string
representation. Therefore test should pass for any order.

    for i in {1..30}; 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)

Signed-off-by: Lukas Slebodnik <lslebodn@fedoraproject.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
2019-01-29 22:09:07 +01:00
..
ABI ldb: version 1.5.2 2019-01-15 11:29:56 +01:00
common lib:ldb: Use correct C99 initializer for 'struct tm' 2019-01-28 10:29:21 +01:00
docs
examples
include ldb: Add new function ldb_dn_add_child_val() 2018-08-15 07:08:24 +02:00
ldb_key_value ldb_tdb: Remove pointless check of ldb_dn_is_valid() 2018-08-15 07:08:24 +02:00
ldb_ldap ldb: allow a timeout of -1 result in no timeout timer at all. 2016-02-17 03:43:22 +01:00
ldb_ldb ldb: Add MDB support to ldb:// 2018-05-23 02:27:12 +02:00
ldb_map lib:ldb: Add FALL_THROUGH statements in ldb_map/ldb_map_outbound.c 2018-03-01 04:37:41 +01:00
ldb_mdb lib ldb: move key value code to lib/ldb/ldb_key_value 2018-07-30 14:31:54 +02:00
ldb_sqlite3 CVE-2018-1140 ldb: Check for ldb_dn_get_casefold() failure in ldb_sqlite 2018-08-14 13:57:15 +02:00
ldb_tdb lib ldb: move key value code to lib/ldb/ldb_key_value 2018-07-30 14:31:54 +02:00
man man pages: change http://samba.org to https://www.samba.org 2016-12-09 13:10:26 +01:00
modules paged results: new paged results module using GUID list 2018-12-21 07:21:19 +01:00
nssldb
tests ldb: The test api.py should not rely on order of entries in dict 2019-01-29 22:09:07 +01:00
tools lib:ldb: Use C99 initializer for tdb_logging_context 2019-01-28 10:29:21 +01:00
web
_ldb_text.py ldb/tests/_ldb_text: remove unused imports 2018-10-25 21:45:55 +02:00
configure build: Move python detection back into waf (instead of in configure and Makefile) 2018-12-14 14:40:19 +01:00
Doxyfile
examples.dox
ldb.pc.in
mainpage.dox
Makefile build: Move python detection back into waf (instead of in configure and Makefile) 2018-12-14 14:40:19 +01:00
pyldb_util.c lib/ldb: Additionally accept unicode as string param in Py2 2018-04-30 15:43:19 +02:00
pyldb-util.pc.in lib/ldb: Enable use of a python3 pyldb-util system library 2017-03-10 07:31:10 +01:00
pyldb.c lib:ldb: Use C99 initializer for PyGetSetDef in pyldb 2019-01-28 10:29:20 +01:00
pyldb.h pyldb: protect PyErr_LDB_ERROR_IS_ERR_RAISE() with do {} while(0) 2016-11-23 16:53:28 +01:00
README_gcov.txt
wscript ldb: version 1.5.2 2019-01-15 11:29:56 +01:00