Skip to content

Refactor ldcache locator#1648

Merged
elezar merged 3 commits intoNVIDIA:mainfrom
elezar:refactor-ldcache-locator
Feb 16, 2026
Merged

Refactor ldcache locator#1648
elezar merged 3 commits intoNVIDIA:mainfrom
elezar:refactor-ldcache-locator

Conversation

@elezar
Copy link
Member

@elezar elezar commented Feb 13, 2026

This change simplifies the lookup of libraries in the Ldcache. Instead of storing a list of cache entries to the libraries they resolve to the cache entries and any symlinks in the chain to the final libraries are stored. This simplifies the lookup of libraries to a list traversal.

@coveralls
Copy link

coveralls commented Feb 13, 2026

Pull Request Test Coverage Report for Build 22057622212

Details

  • 50 of 84 (59.52%) changed or added relevant lines in 4 files are covered.
  • 29 unchanged lines in 3 files lost coverage.
  • Overall coverage decreased (-0.3%) to 39.189%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/lookup/ldcache.go 27 30 90.0%
pkg/lookup/symlinks.go 5 16 31.25%
pkg/lookup/symlinks/symlink.go 0 20 0.0%
Files with Coverage Reduction New Missed Lines %
pkg/nvcdi/lib.go 4 63.13%
pkg/lookup/file.go 6 83.51%
pkg/lookup/symlinks.go 19 36.21%
Totals Coverage Status
Change from base Build 22056798804: -0.3%
Covered Lines: 5711
Relevant Lines: 14573

💛 - Coveralls

Signed-off-by: Evan Lezar <elezar@nvidia.com>
Signed-off-by: Evan Lezar <elezar@nvidia.com>
candidates, err := chain.Locate(library)
chain, err := symlinks.ResolveChain(library)
if err != nil {
b.logger.Errorf("error processing library %s from ldcache: %v", library, err)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: may be valuable to add a warning message here:

b.logger.Warningf("Failed to resolve symlink chain for library %q: %v", library, err)

Signed-off-by: Evan Lezar <elezar@nvidia.com>
@elezar elezar force-pushed the refactor-ldcache-locator branch from 72ec6f9 to b148b43 Compare February 16, 2026 09:42
@elezar elezar merged commit d82f204 into NVIDIA:main Feb 16, 2026
16 checks passed
@elezar elezar deleted the refactor-ldcache-locator branch February 16, 2026 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants