Francesco Ferro
afbce1c169
[entropy.core] update tests for entropy tag sorting
2017-09-09 11:46:06 +02:00
Sławomir Nizio
d9843c2d1d
[tests] enforce default caching policy
...
When ran in a chroot in environment where entropy.tools.total_memory()
would return 0, the test failed.
2016-04-14 22:38:14 +02:00
Fabio Erculiani
363c6a175f
[entropy.*] migrate all retrieveNeeded uses to retrieveNeededLibraries
2014-10-20 15:04:19 +02:00
Fabio Erculiani
7b2810c054
[entropy.db] rewrite needed libraries SQL schema, keep compat.
2014-09-30 09:10:11 +01:00
Fabio Erculiani
1f6bd34749
[entropy] prefix package download URLs with the category directory
...
This makes possible to avoid directory hot spots on repository mirrors.
This commit requires some mileage and real-world testing, but it
seems to be running good on a relatively small repository.
No backward compatibility issues have been reported.
2014-02-15 19:10:16 +01:00
Fabio Erculiani
d759bdd74b
[entropy.client] move LoadersMixin back into the Client class
2014-02-14 16:13:34 +01:00
Fabio Erculiani
603c96fc05
[entropy.locks] add is_already_acquired()
...
This method returns whether the lock has been already acquired.
It is useful in cases where the reentrancy property is leveraged.
2013-12-26 22:52:13 +01:00
Fabio Erculiani
0df7092e05
[entropy.locks] drop "_lock", just "acquire" or "release", it's cleaner
2013-12-26 22:52:11 +01:00
Fabio Erculiani
1f2575204e
[entropy.locks] make ResourceLock reentrant wrt to individual threads only
2013-12-26 22:52:11 +01:00
Fabio Erculiani
e6b129ae7e
[entropy.client] move ClientSystemSettingsPlugin to a separate module
...
This will break the circular dependency between loaders and client modules
2013-12-12 19:24:19 +01:00
Fabio Erculiani
aa4e2441be
[entropy.client] move _enabled_repos to a property, allow lazy loading
2013-12-12 18:35:17 +01:00
Fabio Erculiani
3a7269aa5c
[entropy.db] EntropyBaseRepository: turn lock methods into no-op if direct mode
...
Now that the repository lock is reentrant, it's good to have the
methods take into account direct mode as well. In direct mode,
we explicitly don't want to deal with any kind of locking, because
we accept to manipulate stale data. In order to hide locking code
from the outside and have it transparently managed inside entropy.*
methods, we must respect requests made in direct mode.
2013-12-12 14:25:44 +01:00
Fabio Erculiani
023e8e1b72
[entropy.db] EntropyBaseRepository: make possible to permanently enable direct mode
2013-12-12 10:21:27 +01:00
Fabio Erculiani
7808ad6b92
[entropy.db.sqlite] migrate locking code to entropy.locks.ResourceLock
...
The new EntropySQLiteRepository uses ResourceLock, and gains support
for reentrancy, anti-deadlock safety measures (only for nested calls),
unification of memory and file repositories locking code (the semantics
was already the same).
2013-12-10 21:42:34 +01:00
Fabio Erculiani
fc597d04c5
[entropy.security] refactor System, add internal locking support, improve speed
2013-12-10 16:39:17 +01:00
Fabio Erculiani
94ab49fd0b
[tests] use const_mk{s,d}temp instead of tmpfile ones, default TMPDIR to /var/tmp
2013-12-09 14:36:34 +01:00
Fabio Erculiani
6a2d45df47
[entropy.locks] set recursed to False only when the reference counter is 0
2013-12-09 14:24:37 +01:00
Fabio Erculiani
d080db0d3b
[tests] locks: fix test class name
2013-12-09 14:21:05 +01:00
Fabio Erculiani
bf3a8b79f9
[entropy.locks] use TLS for reentrancy safety checks, update tests
2013-12-09 14:19:21 +01:00
Fabio Erculiani
ebf63e6060
[entropy.locks] fix shared/exclusive locking mix due to reentrancy, add tests
2013-12-08 16:15:39 +01:00
Fabio Erculiani
3545f2b619
[entropy.db] add direct access support to repository
...
In latency sensitive code paths, the performance penality caused
by file lock contention and memory cache invalidation is too high.
This problem happens in Rigo, which is extremely latency sensitive.
Since we don't want to crap on the user, a way to solve this is
letting API consumers skip the memory cache and read data directly
from the database store. The trade off is that data may be stale,
incomplete, or invalid, but as long as the consumer is aware of this,
that's fine.
2013-12-07 20:30:06 +01:00
Fabio Erculiani
6af6a2115e
[entropy.client] move Trigger class under package.actions, make it "private"
2013-12-07 20:29:20 +01:00
Fabio Erculiani
c54c893e55
[entropy.db] implement locking infrastructure (with the same semantics) for in-memory repositories
2013-12-07 20:27:57 +01:00
Fabio Erculiani
d7f22534b2
[entropy.db] rewrite locking infrastructure, handle multithreading use case
2013-12-07 20:27:57 +01:00
Fabio Erculiani
e717f7a1b3
[entropy.db.sqlite] drop support for locking based on rwsem for memory repositories
...
Firstly, rwsem is semantically different from flock (but this was known) and
this may confuse the API consumer. Secondly, the locking infrastructure is
purely meant for inter-process synchronization, threads synchronization is
not a current use case.
2013-12-07 20:25:55 +01:00
Fabio Erculiani
366fc37f59
[entropy.db.sqlite] implement locking infrastructure
2013-12-07 20:24:23 +01:00
Fabio Erculiani
8852a15913
[entropy.misc] add shared(), release() context managers to FlockFile
2013-12-07 20:24:22 +01:00
Fabio Erculiani
a2e1e6ba94
[entropy.client] delay installed repository initialization as much as possible
2013-12-05 23:11:36 +01:00
Fabio Erculiani
a42711086b
[tests] tools: mute output
2013-11-30 11:23:40 +01:00
Fabio Erculiani
cd6d6b9d22
[tests] use const_mkdtemp() instead of tempfile.mkdtemp()
2013-11-30 10:54:13 +01:00
Fabio Erculiani
3a05acd16a
[tests] spm: use const_mkdtemp() instead of tempfile.mkdtemp
2013-11-30 08:25:30 +01:00
Fabio Erculiani
a01f0bd103
[tests] mute QA and Security test function outputs
2013-11-29 19:41:08 +01:00
Fabio Erculiani
982d99fe30
[tests] client: silence tests
2013-11-29 19:37:24 +01:00
Fabio Erculiani
464ae46d90
[tests] drop debug output
2013-11-29 19:29:12 +01:00
Fabio Erculiani
e406a4edaa
[entropy.*] create new dependencies metadata "pkg_dependencies"
...
The old "dependencies" metadata is deprecated. It was found that
the generated metadata might get corrupted by colliding atom strings.
The new implementation avoids collisions completely and is more
efficient.
2013-11-29 19:15:44 +01:00
Fabio Erculiani
2b082167cd
[entropy.tools] read_elf_real_dynamic_libraries: correctly filter out elf_file
2013-11-29 16:30:23 +01:00
Fabio Erculiani
56bc937e47
[tests] cleanup run
2013-11-28 19:55:00 +01:00
Fabio Erculiani
e7c482ac21
[entropy.db] add atom field to preserved_libs metadata
2013-11-27 12:30:09 +01:00
Fabio Erculiani
005ac42610
[tests] port code to the new PackageActionFactory API
2013-11-23 13:58:39 +01:00
Fabio Erculiani
7091c56fe0
[entropy.tools] rewrite read_elf_linker_paths(), improve speed, add tests
2013-11-21 16:43:18 +01:00
Fabio Erculiani
60af35b748
[entropy.tools] rewrite read_elf_broken_symbols(), add tests
2013-11-21 16:30:51 +01:00
Fabio Erculiani
70fc459840
[entropy.tools] rewrite read_elf_real_dynamic_libraries(), add tests
2013-11-21 16:05:29 +01:00
Fabio Erculiani
96ef5868f4
[entropy.db] initial repository database support for preserved libraries
2013-11-20 17:09:48 +01:00
Fabio Erculiani
7eb0687ba9
[entropy.db] make listAllDependencies() public
2013-11-19 14:48:20 +01:00
Fabio Erculiani
5f93a73f46
[tests] update bytes_into_human() test case
2013-11-03 16:59:20 +01:00
Fabio Erculiani
060c12193d
[entropy.tools] drop spawn_function(), no longer needed
2013-09-18 20:50:45 +02:00
Fabio Erculiani
b6e028cf24
[tests] misc: fix FastRSS tests
2013-04-02 23:35:34 +01:00
Fabio Erculiani
4183fe9b6c
[tests] db: fix some tests to accomodate Python 3.3
2013-04-02 23:23:42 +01:00
Fabio Erculiani
2dc1438373
[tests] security: create temporary directory using TMPDIR or, if unset, $PWD
2013-03-23 19:00:15 +00:00
Fabio Erculiani
b395b13d84
[tests] db: fix test_libs_download
2013-03-23 11:42:42 +00:00