onnxruntime
40e30488 - Add unit test for fix of plugin EP library handle leak in PR 28396 (#28430)

Commit
53 days ago
Add unit test for fix of plugin EP library handle leak in PR 28396 (#28430) ### Description Add a unit test that verifies `RegisterExecutionProviderLibrary` / `UnregisterExecutionProviderLibrary` does not leak the library handle (regression test for #28396). `ProviderLibrary::Load()` loads the EP library and probes for the `GetProvider` symbol. Most plugin EP libraries don't export it, so the probe fails. Before #28396, `Load()` returned the error without calling `Unload()`, leaking a refcount. ### Test approach The test copies the EP library to a temporary directory with a unique filename, ensuring it has never been loaded in the process. After register + unregister, it checks that the library is fully unloaded (refcount == 0). --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Parents
Loading