~qaul/community

Testing Ratman internals

Details
Message ID
<87blpnj3lh.fsf@kookie.space>
DKIM signature
missing
Download raw message
Hey Nora,

as mentioned on the call, there's some things that we probably need to
do to make the switch in the routing core more testable.

I think the spawning a handler for each endpoint should be okay, with
maybe optionally having a second function just for testing which can
poll all endpoints, instead of just one?  I guess maybe the tests could
just use the "run_inner" functions to poll exactly the endpoint they are
expecting.  So maybe we make the inner function actually just
"poll_inner", which polls an endpoint once, then "run_inner" wraps this
in a loop, for convenience, and then "run" spawns these for all the
loops.

Alternatively we could try to just use the clockctrl fences and
"Stepped" run modes to step through the polling, but that might be
annoying in comparison?

Also, talking about external testing, say we want to allow people to
step the switch poll in ratman from their own app, without having access
to all the internals, how do we best expose this? Do we have a target
enum "Switch(...)", that takes a device ID as a parameter?

Curious about your thoughts here!


~k