-
Notifications
You must be signed in to change notification settings - Fork 68
Closed
Description
Per func (c *context) , if func (c *context) resolveXAttrs returns ErrNotSupported, it should ignore that error and continue:
base.xattrs, err = c.resolveXAttrs(fp, fi, base)
if err != nil && err != ErrNotSupported {
return nil, err
}
However, func (c *context) resolveXAttrs is returning
fmt.Errorf("xattr extraction is not supported: %w", ErrNotSupported)
which is != ErrNotSupported. Instead, that should be an an errors.Is-based test.
It's probably worth checking any other == or != tests for an error against something other than nil. In just this file, I noticed errNotAHardLink might have the same issue, although a casual inspection suggests this might be okay right now as there's no fmt.Errorf calls using %w to wrap that error.
I noticed this because the Windows test runs for containerd's Snapshotter are failing with
testsuite.go:213: failure reason: failed to build manifest: failed to get resource "\\a": xattr extraction is not supported: not supported
in containerd/containerd#4419, and that "not supported" is not supposed to be a failure.
Metadata
Metadata
Assignees
Labels
No labels