>>> py3-libmdbx: Building testing/py3-libmdbx 0.10.2-r6 (using abuild 3.13.0-r3) started Fri, 12 Jul 2024 04:18:10 +0000 >>> py3-libmdbx: Checking sanity of /home/buildozer/aports/testing/py3-libmdbx/APKBUILD... >>> py3-libmdbx: Analyzing dependencies... >>> py3-libmdbx: Installing for build: build-base libmdbx py3-setuptools py3-pytest (1/28) Installing libmdbx (0.11.8-r0) (2/28) Installing libbz2 (1.0.8-r6) (3/28) Installing libffi (3.4.6-r0) (4/28) Installing gdbm (1.24-r0) (5/28) Installing xz-libs (5.6.2-r0) (6/28) Installing mpdecimal (4.0.0-r0) (7/28) Installing libpanelw (6.5_p20240601-r0) (8/28) Installing readline (8.2.10-r0) (9/28) Installing sqlite-libs (3.46.0-r0) (10/28) Installing python3 (3.12.3-r1) (11/28) Installing python3-pycache-pyc0 (3.12.3-r1) (12/28) Installing pyc (3.12.3-r1) (13/28) Installing py3-setuptools-pyc (70.3.0-r0) (14/28) Installing py3-parsing (3.1.2-r1) (15/28) Installing py3-parsing-pyc (3.1.2-r1) (16/28) Installing py3-packaging-pyc (24.1-r0) (17/28) Installing python3-pyc (3.12.3-r1) (18/28) Installing py3-packaging (24.1-r0) (19/28) Installing py3-setuptools (70.3.0-r0) (20/28) Installing py3-iniconfig (2.0.0-r1) (21/28) Installing py3-iniconfig-pyc (2.0.0-r1) (22/28) Installing py3-pluggy (1.5.0-r0) (23/28) Installing py3-pluggy-pyc (1.5.0-r0) (24/28) Installing py3-py (1.11.0-r3) (25/28) Installing py3-py-pyc (1.11.0-r3) (26/28) Installing py3-pytest (8.2.2-r1) (27/28) Installing py3-pytest-pyc (8.2.2-r1) (28/28) Installing .makedepends-py3-libmdbx (20240712.041813) Executing busybox-1.36.1-r31.trigger OK: 269 MiB in 127 packages >>> py3-libmdbx: Cleaning up srcdir >>> py3-libmdbx: Cleaning up pkgdir >>> py3-libmdbx: Cleaning up tmpdir >>> py3-libmdbx: Fetching https://distfiles.alpinelinux.org/distfiles/edge/py3-libmdbx-0.10.2.tar.gz Connecting to distfiles.alpinelinux.org (172.105.82.32:443) saving to '/var/cache/distfiles/py3-libmdbx-0.10.2.tar.gz.part' py3-libmdbx-0.10.2.t 100% |********************************| 29764 0:00:00 ETA '/var/cache/distfiles/py3-libmdbx-0.10.2.tar.gz.part' saved >>> py3-libmdbx: Fetching https://distfiles.alpinelinux.org/distfiles/edge/py3-libmdbx-0.10.2.tar.gz >>> py3-libmdbx: Checking sha512sums... py3-libmdbx-0.10.2.tar.gz: OK >>> py3-libmdbx: Unpacking /var/cache/distfiles/py3-libmdbx-0.10.2.tar.gz... running build running poke_libpath running build_py creating build creating build/lib creating build/lib/libmdbx copying libmdbx/mdbx.py -> build/lib/libmdbx copying libmdbx/__init__.py -> build/lib/libmdbx ============================= test session starts ============================== platform linux -- Python 3.12.3, pytest-8.2.2, pluggy-1.5.0 rootdir: /home/buildozer/aports/testing/py3-libmdbx/src/py3-libmdbx-v0.10.2 configfile: pyproject.toml collected 16 items libmdbx/tests/mdbx_test.py .FFF....F.FF...F [100%] =================================== FAILURES =================================== ____________________________ TestMdbx.test_db_iter _____________________________ self = def test_db_iter(self): MDBX_TEST_DB_DIR="%s/%s" % (MDBX_TEST_DIR, inspect.stack()[0][3]) db=libmdbx.Env(MDBX_TEST_DB_DIR, maxdbs=1024) db_pairs={} txn=db.start_transaction() for i in range(15): name=id_generator() dbi=txn.open_map(name) db_pairs[name] = [] for i in range(1024): pair=(id_generator(), id_generator()) db_pairs[name].append(pair) > dbi.put(txn, pair[0].encode("utf-8"), pair[1].encode("utf-8")) libmdbx/tests/mdbx_test.py:81: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Env { "path" : "MDBX_TEST/test_db_iter"}: {'dbi': 2} txn = , key = b'QSPOUE' value = b'MKLM47', flags = 0 def put(self, txn: TXN, key: bytes, value: bytes, flags: MDBXPutFlags=0): """ Thin wrapper around mdbx_put Raises MDBXErrorExc or OSError :param txn: Transaction to use :type txn: TXN :param key: key to store value under :type key: bytes :param value: Value to store :type value: bytes :param flags: Combination of MDBXPutFlags, defaults to 0 :type flags: MDBXPutFlags """ key_iov=Iovec(key, len(key)) value_iov=Iovec(value, len(value)) ret=_lib.mdbx_put(txn._txn, self._dbi, ctypes.c_void_p(ctypes.addressof(key_iov)), ctypes.c_void_p(ctypes.addressof(value_iov)), flags) if ret != MDBXError.MDBX_SUCCESS.value: > raise make_exception(ret) E libmdbx.mdbx.MDBXErrorExc: b'MDBX_BAD_DBI: The specified DBI-handle is invalid or changed by another thread/transaction' libmdbx/mdbx.py:2476: MDBXErrorExc _____________________ TestMdbx.test_db_readitem_writeitem ______________________ self = def test_db_readitem_writeitem(self): MDBX_TEST_DB_DIR="%s/%s" % (MDBX_TEST_DIR, inspect.stack()[0][3]) db=libmdbx.Env(MDBX_TEST_DB_DIR, maxdbs=1) > db[MDBX_TEST_KEY] = MDBX_TEST_VAL_UTF8 libmdbx/tests/mdbx_test.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ libmdbx/mdbx.py:1970: in __setitem__ val=dbi.put(txn, key, val) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Env { "path" : "MDBX_TEST/test_db_readitem_writeitem"}: {'dbi': 1} txn = , key = b'MDBX_TEST_KEY' value = b'MDBX_TEST_VAL_UTF8', flags = 0 def put(self, txn: TXN, key: bytes, value: bytes, flags: MDBXPutFlags=0): """ Thin wrapper around mdbx_put Raises MDBXErrorExc or OSError :param txn: Transaction to use :type txn: TXN :param key: key to store value under :type key: bytes :param value: Value to store :type value: bytes :param flags: Combination of MDBXPutFlags, defaults to 0 :type flags: MDBXPutFlags """ key_iov=Iovec(key, len(key)) value_iov=Iovec(value, len(value)) ret=_lib.mdbx_put(txn._txn, self._dbi, ctypes.c_void_p(ctypes.addressof(key_iov)), ctypes.c_void_p(ctypes.addressof(value_iov)), flags) if ret != MDBXError.MDBX_SUCCESS.value: > raise make_exception(ret) E libmdbx.mdbx.MDBXErrorExc: b'MDBX_BAD_DBI: The specified DBI-handle is invalid or changed by another thread/transaction' libmdbx/mdbx.py:2476: MDBXErrorExc ______________________________ TestMdbx.test_env _______________________________ self = def test_env(self): """ Test all env related methods, except reading and writing """ MDBX_TEST_DB_DIR="%s/%s" % (MDBX_TEST_DIR, inspect.stack()[0][3]) env=libmdbx.Env(MDBX_TEST_DB_DIR, maxdbs=1) env.register_thread() txn=env.start_transaction() stats=env.get_stat(txn) self.assertIsInstance(stats, libmdbx.MDBXStat) self.assertTrue(str(stats)) envinfo=env.get_info(txn) self.assertIsInstance(envinfo, libmdbx.MDBXEnvinfo) self.assertTrue(str(envinfo)) ret_env=txn.get_env() self.assertIsInstance(ret_env, libmdbx.Env) dbi=txn.open_map() > dbi.put(txn, MDBX_TEST_KEY, MDBX_TEST_VAL_UTF8) libmdbx/tests/mdbx_test.py:192: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Env { "path" : "MDBX_TEST/test_env"}: {'dbi': 1} txn = , key = b'MDBX_TEST_KEY' value = b'MDBX_TEST_VAL_UTF8', flags = 0 def put(self, txn: TXN, key: bytes, value: bytes, flags: MDBXPutFlags=0): """ Thin wrapper around mdbx_put Raises MDBXErrorExc or OSError :param txn: Transaction to use :type txn: TXN :param key: key to store value under :type key: bytes :param value: Value to store :type value: bytes :param flags: Combination of MDBXPutFlags, defaults to 0 :type flags: MDBXPutFlags """ key_iov=Iovec(key, len(key)) value_iov=Iovec(value, len(value)) ret=_lib.mdbx_put(txn._txn, self._dbi, ctypes.c_void_p(ctypes.addressof(key_iov)), ctypes.c_void_p(ctypes.addressof(value_iov)), flags) if ret != MDBXError.MDBX_SUCCESS.value: > raise make_exception(ret) E libmdbx.mdbx.MDBXErrorExc: b'MDBX_BAD_DBI: The specified DBI-handle is invalid or changed by another thread/transaction' libmdbx/mdbx.py:2476: MDBXErrorExc __________________________ TestMdbx.test_multi_write ___________________________ self = def test_multi_write(self): MDBX_TEST_DB_DIR="%s/%s" % (MDBX_TEST_DIR, inspect.stack()[0][3]) geo=libmdbx.Geometry(-1, -1, 2147483648, -1, -1, -1) db=libmdbx.Env(MDBX_TEST_DB_DIR, maxdbs=1024, geometry=geo) generated_db_names={} for i in range(16): name = id_generator().encode("utf-8") if name not in generated_db_names: generated_db_names[name]={} ref=generated_db_names[name] txn=db.start_transaction() dbi=txn.open_map(name) for k in range(1024): new_key=id_generator().encode("utf-8") if new_key not in ref: new_val=id_generator().encode("utf-8") ref[new_key]=new_val > dbi.put(txn, new_key, new_val) libmdbx/tests/mdbx_test.py:133: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Env { "path" : "MDBX_TEST/test_multi_write"}: {'dbi': 2} txn = , key = b'HDZVHV' value = b'S9UF7E', flags = 0 def put(self, txn: TXN, key: bytes, value: bytes, flags: MDBXPutFlags=0): """ Thin wrapper around mdbx_put Raises MDBXErrorExc or OSError :param txn: Transaction to use :type txn: TXN :param key: key to store value under :type key: bytes :param value: Value to store :type value: bytes :param flags: Combination of MDBXPutFlags, defaults to 0 :type flags: MDBXPutFlags """ key_iov=Iovec(key, len(key)) value_iov=Iovec(value, len(value)) ret=_lib.mdbx_put(txn._txn, self._dbi, ctypes.c_void_p(ctypes.addressof(key_iov)), ctypes.c_void_p(ctypes.addressof(value_iov)), flags) if ret != MDBXError.MDBX_SUCCESS.value: > raise make_exception(ret) E libmdbx.mdbx.MDBXErrorExc: b'MDBX_BAD_DBI: The specified DBI-handle is invalid or changed by another thread/transaction' libmdbx/mdbx.py:2476: MDBXErrorExc ____________________________ TestMdbx.test_replace _____________________________ self = def test_replace(self): MDBX_TEST_DB_DIR="%s/%s" % (MDBX_TEST_DIR, inspect.stack()[0][3]) db=libmdbx.Env(MDBX_TEST_DB_DIR, maxdbs=1024) txn=db.start_transaction() dbi=txn.open_map() > dbi.put(txn, MDBX_TEST_KEY, MDBX_TEST_VAL_BINARY) libmdbx/tests/mdbx_test.py:156: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Env { "path" : "MDBX_TEST/test_replace"}: {'dbi': 1} txn = , key = b'MDBX_TEST_KEY' value = b'\xaa\xbb\xcc\x00', flags = 0 def put(self, txn: TXN, key: bytes, value: bytes, flags: MDBXPutFlags=0): """ Thin wrapper around mdbx_put Raises MDBXErrorExc or OSError :param txn: Transaction to use :type txn: TXN :param key: key to store value under :type key: bytes :param value: Value to store :type value: bytes :param flags: Combination of MDBXPutFlags, defaults to 0 :type flags: MDBXPutFlags """ key_iov=Iovec(key, len(key)) value_iov=Iovec(value, len(value)) ret=_lib.mdbx_put(txn._txn, self._dbi, ctypes.c_void_p(ctypes.addressof(key_iov)), ctypes.c_void_p(ctypes.addressof(value_iov)), flags) if ret != MDBXError.MDBX_SUCCESS.value: > raise make_exception(ret) E libmdbx.mdbx.MDBXErrorExc: b'MDBX_BAD_DBI: The specified DBI-handle is invalid or changed by another thread/transaction' libmdbx/mdbx.py:2476: MDBXErrorExc ___________________ TestMdbx.test_success_close_written_map ____________________ self = def test_success_close_written_map(self): MDBX_TEST_DB_DIR="%s/%s" % (MDBX_TEST_DIR, inspect.stack()[0][3]) db=libmdbx.Env(MDBX_TEST_DB_DIR, maxdbs=1024) txn=db.start_transaction() opened_map=txn.open_map(MDBX_TEST_DB_NAME) > opened_map.put(txn, MDBX_TEST_KEY, MDBX_TEST_VAL_UTF8) libmdbx/tests/mdbx_test.py:111: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Env { "path" : "MDBX_TEST/test_success_close_written_map"}: {'dbi': 2} txn = , key = b'MDBX_TEST_KEY' value = b'MDBX_TEST_VAL_UTF8', flags = 0 def put(self, txn: TXN, key: bytes, value: bytes, flags: MDBXPutFlags=0): """ Thin wrapper around mdbx_put Raises MDBXErrorExc or OSError :param txn: Transaction to use :type txn: TXN :param key: key to store value under :type key: bytes :param value: Value to store :type value: bytes :param flags: Combination of MDBXPutFlags, defaults to 0 :type flags: MDBXPutFlags """ key_iov=Iovec(key, len(key)) value_iov=Iovec(value, len(value)) ret=_lib.mdbx_put(txn._txn, self._dbi, ctypes.c_void_p(ctypes.addressof(key_iov)), ctypes.c_void_p(ctypes.addressof(value_iov)), flags) if ret != MDBXError.MDBX_SUCCESS.value: > raise make_exception(ret) E libmdbx.mdbx.MDBXErrorExc: b'MDBX_BAD_DBI: The specified DBI-handle is invalid or changed by another thread/transaction' libmdbx/mdbx.py:2476: MDBXErrorExc _____________________________ TestMdbx.test_write ______________________________ self = def test_write(self): MDBX_TEST_DB_DIR="%s/%s" % (MDBX_TEST_DIR, inspect.stack()[0][3]) db=libmdbx.Env(MDBX_TEST_DB_DIR, maxdbs=1) txn=db.start_transaction() dbi=txn.open_map() > dbi.put(txn, MDBX_TEST_KEY, MDBX_TEST_VAL_BINARY) libmdbx/tests/mdbx_test.py:50: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Env { "path" : "MDBX_TEST/test_write"}: {'dbi': 1} txn = , key = b'MDBX_TEST_KEY' value = b'\xaa\xbb\xcc\x00', flags = 0 def put(self, txn: TXN, key: bytes, value: bytes, flags: MDBXPutFlags=0): """ Thin wrapper around mdbx_put Raises MDBXErrorExc or OSError :param txn: Transaction to use :type txn: TXN :param key: key to store value under :type key: bytes :param value: Value to store :type value: bytes :param flags: Combination of MDBXPutFlags, defaults to 0 :type flags: MDBXPutFlags """ key_iov=Iovec(key, len(key)) value_iov=Iovec(value, len(value)) ret=_lib.mdbx_put(txn._txn, self._dbi, ctypes.c_void_p(ctypes.addressof(key_iov)), ctypes.c_void_p(ctypes.addressof(value_iov)), flags) if ret != MDBXError.MDBX_SUCCESS.value: > raise make_exception(ret) E libmdbx.mdbx.MDBXErrorExc: b'MDBX_BAD_DBI: The specified DBI-handle is invalid or changed by another thread/transaction' libmdbx/mdbx.py:2476: MDBXErrorExc =============================== warnings summary =============================== libmdbx/tests/mdbx_test.py::TestMdbx::test_get_sysram /usr/lib/python3.12/unittest/case.py:690: DeprecationWarning: It is deprecated to return a value that is not None from a test case (>) return self.run(*args, **kwds) -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info ============================ FAILED libmdbx/tests/mdbx_test.py::TestMdbx::test_db_iter - libmdbx.mdbx.MDBX... FAILED libmdbx/tests/mdbx_test.py::TestMdbx::test_db_readitem_writeitem - lib... FAILED libmdbx/tests/mdbx_test.py::TestMdbx::test_env - libmdbx.mdbx.MDBXErro... FAILED libmdbx/tests/mdbx_test.py::TestMdbx::test_multi_write - libmdbx.mdbx.... FAILED libmdbx/tests/mdbx_test.py::TestMdbx::test_replace - libmdbx.mdbx.MDBX... FAILED libmdbx/tests/mdbx_test.py::TestMdbx::test_success_close_written_map FAILED libmdbx/tests/mdbx_test.py::TestMdbx::test_write - libmdbx.mdbx.MDBXEr... ==================== 7 failed, 9 passed, 1 warning in 0.59s ==================== >>> ERROR: py3-libmdbx: check failed >>> py3-libmdbx: Uninstalling dependencies... (1/28) Purging .makedepends-py3-libmdbx (20240712.041813) (2/28) Purging libmdbx (0.11.8-r0) (3/28) Purging py3-setuptools-pyc (70.3.0-r0) (4/28) Purging py3-setuptools (70.3.0-r0) (5/28) Purging py3-pytest-pyc (8.2.2-r1) (6/28) Purging py3-pytest (8.2.2-r1) (7/28) Purging py3-iniconfig-pyc (2.0.0-r1) (8/28) Purging py3-iniconfig (2.0.0-r1) (9/28) Purging py3-packaging-pyc (24.1-r0) (10/28) Purging py3-packaging (24.1-r0) (11/28) Purging py3-parsing-pyc (3.1.2-r1) (12/28) Purging py3-parsing (3.1.2-r1) (13/28) Purging py3-pluggy-pyc (1.5.0-r0) (14/28) Purging py3-pluggy (1.5.0-r0) (15/28) Purging py3-py-pyc (1.11.0-r3) (16/28) Purging py3-py (1.11.0-r3) (17/28) Purging python3-pyc (3.12.3-r1) (18/28) Purging python3-pycache-pyc0 (3.12.3-r1) (19/28) Purging pyc (3.12.3-r1) (20/28) Purging python3 (3.12.3-r1) (21/28) Purging gdbm (1.24-r0) (22/28) Purging libbz2 (1.0.8-r6) (23/28) Purging libffi (3.4.6-r0) (24/28) Purging libpanelw (6.5_p20240601-r0) (25/28) Purging mpdecimal (4.0.0-r0) (26/28) Purging readline (8.2.10-r0) (27/28) Purging sqlite-libs (3.46.0-r0) (28/28) Purging xz-libs (5.6.2-r0) Executing busybox-1.36.1-r31.trigger OK: 213 MiB in 99 packages