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

unknown overlay, reflink test failure #54

Closed
xiota opened this issue Jun 27, 2024 · 7 comments
Closed

unknown overlay, reflink test failure #54

xiota opened this issue Jun 27, 2024 · 7 comments

Comments

@xiota
Copy link

xiota commented Jun 27, 2024

xcp 0.21.1, AUR package. I believe it is a docker container. I didn't set it up.

Please provide guidance to obtain information needed to add support to the test script (eg, commands to run prior to the check).

==> Starting check()...
WARNING: unknown filesystem overlay, some tests might fail
found filesystem overlay, using flags use_linux
...
failures:

---- linux::tests::test_reflink stdout ----
thread 'linux::tests::test_reflink' panicked at libfs/src/linux.rs:320:9:
assertion failed: worked
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace


failures:
    linux::tests::test_reflink
@tarka
Copy link
Owner

tarka commented Jun 28, 2024

Thanks for the report. It's been a while since I've used Arch, could you give me the commands you ran leading to this error and the details of the machine you're running it on. You mentioned a docker container; can you link to the Dockerfile or image?

@tarka
Copy link
Owner

tarka commented Jun 28, 2024

OK, I've had a look at the PKGBUILD and I think I've worked out what's happening. The check() function runs test-linux.sh, which tries to work out what FS it is running on in CI. In this case you're using an overlayfs, which hides the underlying FS, so tests are going to fail. check() would be better off running a subset of the tests. I've left a comment on the AUR page:

xcp author here. This ./tests/scripts/test-linux.sh probably isn't the best option to use for check(), it's mostly intended for use in CI where we know the setup beforehand. In particular if you run it in a Docker container you'll have issues with overlayfs, which hides the underlying FS identity. See #54

You would probably be better running a subset of the tests that will work on all linux-native filesystems; e.g. cargo test --workspace --locked --features test_no_reflink,test_no_acl,test_no_sparse,test_no_extents.

@tarka tarka closed this as completed Jun 28, 2024
@xiota
Copy link
Author

xiota commented Jun 28, 2024

I was in the middle of drafting a reply, but see your new comment... Your assessment seems correct. In output from mount, I recognize paths overlayfs references are on ext4 partitions, but don't see how to determine that from inside the container.

@tarka
Copy link
Owner

tarka commented Jun 28, 2024

This really requires modification of the AUR package. But in the short-term you may be able to disable the check() function with --mflags and --nocheck (assuming you're using yay). See Jguer/yay#755 and https://man.archlinux.org/man/makepkg.8.en

@xiota
Copy link
Author

xiota commented Jun 28, 2024

Is there any reason not to change the script so that the default case, or a new overlay case, disables the tests that may not be supported? It is useful for the PKGBUILD to be able to run the tests that are supported on the file system that's being used.

@tarka
Copy link
Owner

tarka commented Jun 29, 2024

On thinking about it I'll make the default case the lowest common denominator.

@tarka
Copy link
Owner

tarka commented Jun 29, 2024

v0.21.2 released with and updated test-linux.sh.

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

No branches or pull requests

2 participants