Skip to content

Conversation

@robin-nitrokey
Copy link
Member

This patch uses the simplified Store trait to also simplify the store
implementation used by the virt module: Instead of using references to
static storages and filesystems protected by a mutex, we can now just
use separate non-static instances for every test.

The only downside is that we can no longer provide raw access to the
IFS via the StoreProvider::ifs function, so we cannot run the
provisioner app with this platform implementation. But I think this is
an acceptable tradeoff.

@robin-nitrokey
Copy link
Member Author

With trussed-dev/littlefs2#98, we can use Box<dyn DynStorageAlloc> instead of type parameters for the three storage types. So I’ve removed the StoreProvider trait. Callers can either use StoreConfig::ram() to quickly setup in-memory storage or compose their own StoreConfig (e. g. in the usbip runner). As the store setup is now so easy and we use custom wrapper functions in most crates anyway, I’ve also removed the with_{fs,ram}_client{s,} helper functions to keep things simple.

@robin-nitrokey
Copy link
Member Author

This reduces the runtime for the fido-authenticator integration tests from 80 s to 33 s for me.

@robin-nitrokey robin-nitrokey marked this pull request as ready for review March 4, 2025 21:13
This patch uses the simplified Store trait to also simplify the store
implementation used by the virt module:  Instead of using references to
static storages and filesystems protected by a mutex, we can now just
use separate non-static instances for every test.

The only downside is that we can no longer provide raw access to the
IFS via the StoreProvider::ifs function, so we cannot run the
provisioner app with this platform implementation.  But I think this is
an acceptable tradeoff.
@robin-nitrokey robin-nitrokey merged commit ac106d6 into main Mar 5, 2025
2 checks passed
@robin-nitrokey robin-nitrokey deleted the virt-store branch March 5, 2025 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants