Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FAIL: TestNodeRestoreAt - node_test.go:260: testXattrFile: xattrs don't match ([{user.foo [98 97 114]}] != []) #4646

Open
vt-alt opened this issue Jan 21, 2024 · 2 comments

Comments

@vt-alt
Copy link

vt-alt commented Jan 21, 2024

Output of restic version

restic 0.16.3 compiled with go1.21.6 on linux/amd64

What backend/service did you use to store the repository?

Unknown to me since these are unit tests.

Problem description / Steps to reproduce

When go test ./... runs purely on tmpfs, on Linux kernel v6.1.37, test TestNodeRestoreAt failure occurs.

Expected behavior

On Linux kernel 6.6.y there is no test failure on the same conditions (other box though).

Actual behavior

[00:00:28] + RESTIC_TEST_FUSE=0
[00:00:28] + go test ./...
...
[00:00:49] --- FAIL: TestNodeRestoreAt (0.00s)
[00:00:49]     --- FAIL: TestNodeRestoreAt/#08 (0.00s)
[00:00:49]         node_test.go:260: �[31mtestXattrFile: xattrs don't match ([{user.foo [98 97 114]}] != [])�[39m
[00:00:49]             
[00:00:49]     --- FAIL: TestNodeRestoreAt/#09 (0.00s)
[00:00:49]         node_test.go:260: �[31mtestXattrDir: xattrs don't match ([{user.foo [98 97 114]}] != [])�[39m
[00:00:49]             
[00:00:49] {"name":"","type":"","mtime":"0001-01-01T00:00:00Z","atime":"0001-01-01T00:00:00Z","ctime":"0001-01-01T00:00:00Z","uid":0,"gid":0,"linktarget":"vГЎlГ®d \t ГњГ±iВўГІde \n Е›бє—Е•inЗµ","content":null}
[00:00:49] {"name":"","type":"","mtime":"0001-01-01T00:00:00Z","atime":"0001-01-01T00:00:00Z","ctime":"0001-01-01T00:00:00Z","uid":0,"gid":0,"linktarget":"\u0000\u0001\u0002\ufffd\ufffd\ufffd","linktarget_raw":"AAEC+vv8","content":null}
[00:00:49] FAIL
[00:00:49] FAIL	github.com/restic/restic/internal/restic	0.577s

Do you have any idea what may have caused this?

Perhaps this is because xattrs user.* namespace is not supported on tmpfs on Linux before v6.6?

@MichaelEischer
Copy link
Member

Yes, the tests currently assume that /tmp is capable of handling xattrs. You can us the TMPDIR environment variable to let the tests store their data somewhere else.

@vt-alt
Copy link
Author

vt-alt commented Jan 22, 2024

Our build system (on ALT) works purely on tmpfs and there is no other disks/filesystems. I currently settled on doing in %check script:

printf '6.6\n%s\n' $(uname -r) | sort -CV ||
sed -i '/rtest.Assert/s/n2.ExtendedAttributes/test.ExtendedAttributes/' internal/restic/node_test.go

It would be better to have option to disable only user xattrs comparison or skip this test altogether.
But I agree that this is not high priority.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants