- Now it's checked that cleanup behaves as expected in a concurrent
setting for `put` and `remove`. Note that Lincheck never checks that a
value is actually cleaned up. Instead, it compares the result with the
single-threaded execution of a scenario. Hence, the non-concurrent
`CleanableSoftValueCacheTest` is crucial, as it separately ensures
correct deterministic cleanup in a single-threaded environment.
- We cannot test that operations returning a new value (such as `get`)
always return values which haven't been cleaned up yet, because the
value might be cleaned up by another thread between the return point
of the operation and cleanup checking.
^KT-62136
- This new version fixes problems with concurrent hash maps in model
checking tests and allows us to remove the correctness guarantee for
them.
^KT-62136
- The non-concurrent `CleanableSoftValueCacheTest` ensures that
deterministic cleanup behaves correctly. A Lincheck test can only
discover differences between the single-threaded and concurrent
executions of a test scenario, so it cannot find correctness issues
with deterministic cleanup on its own.
^KT-61222
- Lincheck tests the linearizability of a concurrent data structure,
which helps us verify that `CleanableSoftValueCache` works in
concurrent scenarios.
^KT-62136 fixed
- Lincheck is compiled with JDK 11 and the `low-level-api-fir` module is
based on the JDK 8 toolchain, so we need to add a new module with a
JDK 11 toolchain to support Lincheck tests. We cannot bump
`low-level-api-fir` to JDK 11 because `low-level-api-fir-for-ide`
requires it to be based on a JDK 8 toolchain.
- Using a Gradle test suite is unfortunately not an option, because
`low-level-api-fir-for-ide` will think that the whole
`low-level-api-fir` module is compiled with JDK 11 if just a single
test suite has this toolchain.
^KT-62136