https://git.schokokeks.org/derivepassphrase.git/tree/1cefab9b2c4c51366b0daa1eb06f1652ef6e53fdRecent commits to derivepassphrase.git (1cefab9b2c4c51366b0daa1eb06f1652ef6e53fd)2025-05-20T20:12:39+02:00tag:gitlist.org,2012:commit/1cefab9b2c4c51366b0daa1eb06f1652ef6e53fdMerge topic branch 'concurrency-testing' into master2025-05-20T20:12:39+02:00Marco Riccisoftware@the13thletter.info
<pre>* concurrency-testing:
Document the new concurrency testing setup in the changelog
Add tests for the configuration mutex
Convert the configuration mutex to an explicit class
GitHub: Closes #23.
</pre>
tag:gitlist.org,2012:commit/e2a78697e37719107c025ae6a8a9dce25dfb3943Document the new concurrency testing setup in the changelog2025-05-19T21:45:21+02:00Marco Riccisoftware@the13thletter.info
<pre></pre>
tag:gitlist.org,2012:commit/47376f4dcf2a2cc121df9b44b94b4036bf1bdb3bAdd tests for the configuration mutex2025-05-18T23:08:44+02:00Marco Riccisoftware@the13thletter.info
<pre>Conceptually, we need two types of tests for the configuration mutex:
the first type asserts that the program logic works for *any* kind of
(potentially fake) configuration mutex, and the second type asserts that
the configuration mutex works for *any* set of (potentially fake)
operations. In both cases, the fake parts usually impose a specific
order of locking or running, controllable from the outside.
We modify the `ConfigurationMutex` class to shift the management of the
lock file descriptor into the lock and unlock functions themselves,
instead of cramming them into `__enter__` and `__exit__`. (This means
that subclasses need not deal with the lock file, or in fact, with any
of the platform-specific locking machinery.) A custom subclass in the
`tests` namespace provides a faked mutex that imposes a specific locking
order, controllable from the outside via message passing. This subclass
is then used with a state machine to test various sets of operations
together with the faked mutex, i.e. to provide tests of the first type.
(The standard tests, executed with the actual mutex implementation,
already provide tests of the second type.)
Regrettably, this set of tests requires concurrency support.
Specifically, because the click testing machinery needs to reset
process-wide properties for each concurrent unit, and because the tests
require this to be done in a time-overlapped manner, the tests
specifically require multiprocessing support. Care must also be taken
to ensure that coverage management works: that it is enabled in the
subprocesses whenever it is enabled in the parent (which is
a straightforward configuration issue), and that the parent process does
not accidentally remove these coverage measurements as junk files in
case the subprocesses are spawned in specifically prepared and
automatically cleaned up temporary directories (which is a manual labor
issue).
</pre>
tag:gitlist.org,2012:commit/48d3973ca29372cdaff248fcb742c61c8bcf3430Convert the configuration mutex to an explicit class2025-04-12T20:01:40+02:00Marco Riccisoftware@the13thletter.info
<pre>The class form is easier to monkeypatch than the generator form.
</pre>
tag:gitlist.org,2012:commit/314f65ee96a03034e2d19eed2399fc14d9623b09Merge topic branch 'documentation-fixes' into master2025-04-09T21:58:45+02:00Marco Riccisoftware@the13thletter.info
<pre>* documentation-fixes:
Reintroduce explicit type annotations for vault CLI arguments
</pre>
tag:gitlist.org,2012:commit/4076d407e367536615cd63029a167c8710a2a17cReintroduce explicit type annotations for vault CLI arguments2025-04-09T21:53:48+02:00Marco Riccisoftware@the13thletter.info
<pre>The command-line function for the "vault" subcommand is now implemented
by accepting wildcard keyword arguments, so `mkdocstrings-python` no
longer has explicit type information for the known list of keyword
arguments to fall back on. So, explicitly (re-)annotate that list with
type information.
</pre>
tag:gitlist.org,2012:commit/fcf724d2e617a7480c8ff1d380fcb378c4e50c33Merge topic branch 'click-820-expected-incompatibilities' into master2025-04-09T19:47:01+02:00Marco Riccisoftware@the13thletter.info
<pre>* click-820-expected-incompatibilities:
Fix expected incompatibilities in the CLI machinery with click 8.2.0
</pre>
tag:gitlist.org,2012:commit/bbac630952e16e4ba0e9f7eef3c7538b4edbe646Fix expected incompatibilities in the CLI machinery with click 8.2.02025-04-09T19:43:39+02:00Marco Riccisoftware@the13thletter.info
<pre>click 8.2.0 is currently in pre-release, though a release candidate has
already been tagged as such. This candidate deprecated some internals,
which we access. Thus fix what we can reasonably assume will otherwise
be broken by click 8.2.0.
</pre>
tag:gitlist.org,2012:commit/d539649e3f89b92ff3123ebd8a2dddce40f24719Merge topic branch 'cleanup-lockfiles-in-test-harness' into master2025-04-09T19:29:34+02:00Marco Riccisoftware@the13thletter.info
<pre>* cleanup-lockfiles-in-test-harness:
Clean up configuration write lock files in the test suite
</pre>
tag:gitlist.org,2012:commit/34c4a591bc6fdd3f5856f169f645dc07f0560bccClean up configuration write lock files in the test suite2025-04-09T19:27:50+02:00Marco Riccisoftware@the13thletter.info
<pre>When using a temporary, isolated `derivepassphrase` configuration
directory in the test suite, also clean up the matching configuration
write lock file, which is not located in the configuration directory.
</pre>