You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the logic to create a Vmm object is scattered across vmm/lib.rs and vmm.builder.rs files and it is quite convoluted and some times difficult to follow. Moreover, there is a lot of architecture specific code inserted in arbitrary places which further increases the un-readability.
Apart from the aesthetics and readability aspect, the state of the code makes it quite difficult to unit test. There are functions that take 7 arguments just to pass them (way) down the stack. That makes unit-testing very hard, since we often need to construct dummy versions of objects (like EventManager) even though they are not used in the part of the code we are trying to test.
Solution
Re-work the vmm construction code to simplify code paths and isolate architecture-specific code.
The text was updated successfully, but these errors were encountered:
Description
Currently, the logic to create a
Vmm
object is scattered acrossvmm/lib.rs
andvmm.builder.rs
files and it is quite convoluted and some times difficult to follow. Moreover, there is a lot of architecture specific code inserted in arbitrary places which further increases the un-readability.Apart from the aesthetics and readability aspect, the state of the code makes it quite difficult to unit test. There are functions that take 7 arguments just to pass them (way) down the stack. That makes unit-testing very hard, since we often need to construct dummy versions of objects (like
EventManager
) even though they are not used in the part of the code we are trying to test.Solution
Re-work the
vmm
construction code to simplify code paths and isolate architecture-specific code.The text was updated successfully, but these errors were encountered: