[PATCH] test: dbus: Unregister timeout source at end of test

Jouni Malinen j at w1.fi
Thu Oct 2 13:54:42 PDT 2025


On Tue, Jul 22, 2025 at 09:30:45AM +0200, Benjamin Berg wrote:
> Using timeout_add registers the GSource with the default GMainContext.
> This GMainContext will remain the same between tests, and the registered
> sources will therefore not be destroyed at the end of the test and will
> only be removed after they have triggered and returned False.
> 
> Change the test timeout code to use a helper and ensure the GSource is
> unregistered again when the test exits. While this is not an actual
> problem, it does mean that python can garbage collect the TestDbus
> instance earlier as it is otherwise kept alive until the GSource is
> free'ed and the reference to the timeout method has been dropped.

Thanks, applied.

-- 
Jouni Malinen                                            PGP id EFC895FA



More information about the Hostap mailing list