Skip to content

Continuity is failing to ignore unsupported xattrs on Windows #206

@TBBle

Description

@TBBle

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions