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

xfstests: add zfs support to latest xfstests #5481

Open
behlendorf opened this issue Dec 13, 2016 · 7 comments
Open

xfstests: add zfs support to latest xfstests #5481

behlendorf opened this issue Dec 13, 2016 · 7 comments
Labels
Bot: Not Stale Override for the stale bot Component: Test Suite Indicates an issue with the test framework or a test case Status: Inactive Not being actively updated

Comments

@behlendorf
Copy link
Contributor

Recent updates to CentOS 7, Ubuntu 16.04, and almost certain other modern versions of Linux have resulted in xfstests no longer building. The failures have been resolved in current versions of xfstests. What needs to happen is for our patch stack to be rebased on the latest xfstests and then submitted upstream for inclusion.

@behlendorf behlendorf added the Component: Test Suite Indicates an issue with the test framework or a test case label Dec 13, 2016
behlendorf added a commit to behlendorf/zfs that referenced this issue Dec 13, 2016
The ZFS enabled versions of xfstests fails to build cleanly on
Ubuntu 16.04 and CentOS 7.  This issue should be resolved by
rebasing the ZFS patches against the latest xfstests and pushing
those patches upstream.  This would allow us to use an unmodified
xfstests.

Signed-off-by: Brian Behlendorf <[email protected]>
Issue openzfs#5481
behlendorf added a commit to behlendorf/zfs that referenced this issue Dec 14, 2016
The ZFS enabled versions of xfstests fails to build cleanly on
Ubuntu 16.04 and CentOS 7.  This issue should be resolved by
rebasing the ZFS patches against the latest xfstests and pushing
those patches upstream.  This would allow us to use an unmodified
xfstests.

Signed-off-by: Brian Behlendorf <[email protected]>
Issue openzfs#5481
behlendorf added a commit that referenced this issue Dec 14, 2016
The ZFS enabled versions of xfstests fails to build cleanly on
Ubuntu 16.04 and CentOS 7.  This issue should be resolved by
rebasing the ZFS patches against the latest xfstests and pushing
those patches upstream.  This would allow us to use an unmodified
xfstests.

Reviewed-by: Giuseppe Di Natale <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Issue #5481
Closes #5482
@behlendorf behlendorf changed the title Test Suite: xfstests build issue xfstests: add zfs support to latest xfstests Jan 24, 2017
wli5 pushed a commit to wli5/zfs that referenced this issue Feb 28, 2017
The ZFS enabled versions of xfstests fails to build cleanly on
Ubuntu 16.04 and CentOS 7.  This issue should be resolved by
rebasing the ZFS patches against the latest xfstests and pushing
those patches upstream.  This would allow us to use an unmodified
xfstests.

Reviewed-by: Giuseppe Di Natale <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Issue openzfs#5481
Closes openzfs#5482
wli5 pushed a commit to wli5/zfs that referenced this issue Feb 28, 2017
The ZFS enabled versions of xfstests fails to build cleanly on
Ubuntu 16.04 and CentOS 7.  This issue should be resolved by
rebasing the ZFS patches against the latest xfstests and pushing
those patches upstream.  This would allow us to use an unmodified
xfstests.

Reviewed-by: Giuseppe Di Natale <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Issue openzfs#5481
Closes openzfs#5482
behlendorf added a commit to behlendorf/zfs that referenced this issue Apr 6, 2017
The ZFS enabled versions of xfstests fails to build cleanly on
Amazon Linux.  This issue should be resolved by rebasing the ZFS
patches against the latest xfstests and pushing those patches
upstream.  This would allow us to use an unmodified xfstests.

Signed-off-by: Brian Behlendorf <[email protected]>
Issue openzfs#5481
behlendorf added a commit that referenced this issue Apr 7, 2017
The ZFS enabled versions of xfstests fails to build cleanly on
Amazon Linux.  This issue should be resolved by rebasing the ZFS
patches against the latest xfstests and pushing those patches
upstream.  This would allow us to use an unmodified xfstests.

Reviewed-by: Giuseppe Di Natale <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Issue #5481
Closes #5977
@stale
Copy link

stale bot commented Aug 25, 2021

This issue has been automatically marked as "stale" because it has not had any activity for a while. It will be closed in 90 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Status: Stale No recent activity for issue label Aug 25, 2021
@behlendorf behlendorf added Bot: Not Stale Override for the stale bot and removed Status: Stale No recent activity for issue labels Sep 2, 2021
@implr
Copy link

implr commented Nov 28, 2023

I might take a stab at rebasing this over a weekend. It's a bit hard to piece together what is the current state though. Can you confirm that branch zfs of https://github.com/zfsonlinux/xfstests is the latest version of the patchset, or does someone somewhere have something further along?

@behlendorf
Copy link
Contributor Author

behlendorf commented Nov 28, 2023

@implr that would be very welcome. That is the latest version of the branch I'm aware of, I believe xfstests has changed considerably since it was last updated so you might want to use those commits as a guide of what needs to be updated to get things going. I'd love to be able to add xfstests to our regular testing.

@implr
Copy link

implr commented Nov 29, 2023

Yeah I had a brief look already, rebasing those patches over a decade of changes is hopeless. From scratch shouldn't be too bad though.
Another thing is that xfstests gained a bunch of zfs-relevant tests because of btrfs (reflinks, dedup, etc). Those might be a bit harder to get working due to btrfs specifics, but making generic run looks very doable.

@implr
Copy link

implr commented Dec 18, 2023

Small progress update: I have a partial patch at https://github.com/implr/xfstests/tree/zfs. I tested on ubuntu2204 for now with their packaged zfs, so I didn't try any of the reflink/FICLONE tests yet. I used this local.config:

export TEST_DEV=test/t
export TEST_DIR=/mnt/test
export SCRATCH_DEV=/dev/vdc
# will be destroyed/recreated, pick a name that doesn't exist on your system
export SCRATCH_ZPOOL_NAME=scrat
export SCRATCH_MNT=/mnt/scratch

Note SCRATCH_DEV is a block device. I kept @behlendorf's "TEST_DEV is a fs name" approach for convenience, but I really wanted scratch to be a blkdev, as that would allow us to try the various dm-flakey tests (and perhaps even the btrfs pool tests). However, that ended up being quite complicated, as ZFS pools are identified by names, while a lot of parts of xfstests really want to be able to just mount $SCRATCH_DEV. I fixed it for the general case, but a lot of the devmapper stuff remains broken.

A bunch of other tests fail too. Some of them look like I'm missing things in the port, some are more suspicious, but I didn't have time to debug them yet. exclude.zfs.txt has the list.

@implr
Copy link

implr commented Jan 30, 2024

I've moved onto getting the reflink tests to run and ran into a problem.
xfstests checks if the fs supports clone_range like this. That always fails on zfs for two reasons:

  1. 64k < default recordsize, so it fails with EINVAL
  2. it creates and then clones the file immediately after, which usually falls within the same txg, so zfs returns EAGAIN (and xfs_io doesn't retry)

While 1 is trivial to work around (lower recordsize on the test fs, or just patch the 64k to something bigger), I don't really know what to do about 2. For a proper fix we could patch xfs_io, but that might take a while to upstream, and meanwhile be tedious to manage (it's a separate thing, not part of xfstests). A workaround would be waiting for the next txg, but how? I guess there's always an option for a few second sleep, but that's really stupid.

Any ideas?

@behlendorf
Copy link
Contributor Author

#15842 should be the fix for 2. It would be particularly helpful if you could run the reflink tests with that PR. Hopefully it'll help us identify any other places where ZFS behaves differently than the other Linux filesystem which support reflink.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bot: Not Stale Override for the stale bot Component: Test Suite Indicates an issue with the test framework or a test case Status: Inactive Not being actively updated
Projects
None yet
Development

No branches or pull requests

3 participants
@behlendorf @implr and others