test/gtest: stop the inert-tracer test depending on NIXL_PLUGIN_DIR (#2092)
## What? `Tracing.RequestedBackendWithoutPluginIsInert` asked `makeTracer` for the `nvtx` backend and expected a null tracer. It now asks for a backend name no plugin can provide, matching what the sibling test `Tracing.MakeTracerUnknownBackendReturnsNull` already did; the name lives in one `kUnloadableBackend` constant used by both. ## Why? The old assertion rested on a property of the *environment*, not of the code: its own comment said "no `libtrace_backend_*.so` is registered in this unit binary". Whenever a real `libtrace_backend_nvtx.so` is discoverable, the plugin loads, `makeTracer` correctly returns a live tracer, and the test fails. That is the case in the dev container, where `NIXL_PLUGIN_DIR` points at an install tree containing the NVTX trace plugin, and it would be the case in any CI leg that installs NIXL before running the `unit` suite. The test has been permanently red locally for weeks and was written off as "pre-existing, unrelated" in the validation notes of three telemetry PRs (#1952, #2054, #2086). Beyond the recurring explanation, a genuine regression in the null-tracer / inert-`Span` path would have been indistinguishable from the known-red state. Coverage is unchanged: this test exists to prove that a null tracer leaves call sites on the safe default-constructed `Span` path, which never required NVTX specifically. Real NVTX behaviour stays covered by the e2e `TestTransferTracing` tests, which load the actual plugin. Tracking: NIX-1710. <details> <summary>Rejected alternative, and verification</summary> Clearing `NIXL_PLUGIN_DIR` inside the test via the existing `gtest::ScopedEnv` helper does not work reliably: `getPluginDir()` is read once in the `nixlPluginManager` constructor and cached in `plugin_dirs_` for the process lifetime, so the outcome would depend on whether an earlier test in the binary already touched the plugin manager. Verified both directions with the container's default `NIXL_PLUGIN_DIR`, i.e. with no workaround applied: - Baseline (this change stashed, rebuilt): exactly one failure, `RequestedBackendWithoutPluginIsInert`, reporting a live tracer pointer where `nullptr` was expected. - With the change: all 17 `Tracing.*` tests pass, and the full `unit` suite is 157 passed / 2 skipped / 3 failed — the three failures being `objCrtTestFixture.TransferBelowThreshold` and the two `ObjClientTests/objParamTestFixture.ReadTransfer` params, which need an object-storage endpoint this container does not provide. </details> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Tests** * Improved tracing plugin-loading tests to consistently cover environments where the requested backend is unavailable. * Updated inert-tracer coverage to validate behavior when no tracing plugin can be loaded. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Signed-off-by: Efraim Eygin <eeygin@nvidia.com>
E
e-eygin committed
4e50bc3480f1c6d4cada705266693f57ba6ca717
Parent: c5a9850
Committed by GitHub <noreply@github.com>
on 8/18/2026, 10:20:41 AM