Skip to content

Commit

Permalink
lookup: add tests for partialLookupInRoot
Browse files Browse the repository at this point in the history
This lets us make sure we are correctly handling all sorts of lookups
that aren't obvious just by looking at MkdirAll. Of particular note are
the tail-chained and other deep symlink resolution stacks (MkdirAll will
just return an error, but the remainingPath we get is quite important).

In addition, add some explicit tests for the error paths in
symlinkStack. We can't force these with actual lookups (since they
indicate a programming bug), but at least make sure we're testing them
properly.

This raises the test coverage to 88.6% now that we are testing more of
the error paths in partialLookupInRoot.

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
  • Loading branch information
cyphar committed Jul 9, 2024
1 parent 45ab189 commit b6aed59
Show file tree
Hide file tree
Showing 2 changed files with 620 additions and 0 deletions.
Loading

0 comments on commit b6aed59

Please sign in to comment.