Message ID | x494mfy5igz.fsf@segfault.boston.devel.redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Jeff Moyer <jmoyer@redhat.com> writes: > Hi, > > When running xfs/259 against a file system that has crcs disabled, the > test will fail. The problem is that mkfs.xfs now defaults to enabling > crcs. So, when the test checks the underlying file system and finds > crcs are disabled, it tries to create a file system with a block size > that is too small to support them. The solution is to explicitly > specify the crc feature. > > Signed-off-by: Jeff Moyer <jmoyer@redhat.com> > > diff --git a/tests/xfs/259 b/tests/xfs/259 > index 16c1935..e0022ce 100755 > --- a/tests/xfs/259 > +++ b/tests/xfs/259 > @@ -72,7 +72,7 @@ for del in $sizes_to_check; do > lofile=$(losetup -f) > losetup $lofile "$testfile" > "$MKFS_XFS_PROG" -l size=32m -b size=$blocksize $lofile \ > - >/dev/null || echo "mkfs failed!" > + -m crc=$_fs_has_crcs>/dev/null || echo "mkfs failed!" It occurs to me that this may break on systems using a mkfs.xfs that does not support the "-m crc" option. Is there a standard way to test for such things? -Jeff -- To unsubscribe from this list: send the line "unsubscribe fstests" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Fri, Dec 04, 2015 at 10:47:47AM -0500, Jeff Moyer wrote: > Jeff Moyer <jmoyer@redhat.com> writes: > > > Hi, > > > > When running xfs/259 against a file system that has crcs disabled, the > > test will fail. The problem is that mkfs.xfs now defaults to enabling > > crcs. So, when the test checks the underlying file system and finds > > crcs are disabled, it tries to create a file system with a block size > > that is too small to support them. The solution is to explicitly > > specify the crc feature. > > > > Signed-off-by: Jeff Moyer <jmoyer@redhat.com> > > > > diff --git a/tests/xfs/259 b/tests/xfs/259 > > index 16c1935..e0022ce 100755 > > --- a/tests/xfs/259 > > +++ b/tests/xfs/259 > > @@ -72,7 +72,7 @@ for del in $sizes_to_check; do > > lofile=$(losetup -f) > > losetup $lofile "$testfile" > > "$MKFS_XFS_PROG" -l size=32m -b size=$blocksize $lofile \ > > - >/dev/null || echo "mkfs failed!" > > + -m crc=$_fs_has_crcs>/dev/null || echo "mkfs failed!" > > It occurs to me that this may break on systems using a mkfs.xfs that > does not support the "-m crc" option. Is there a standard way to test > for such things? > I suppose we could add a $crc_options to the mkfs command line that can be set appropriately in the if/else. If the test fs has crc support, set crc_options="-m crc=1". Otherwise, maybe use '_scratch_mkfs_xfs_supported -m crc=0' (from common/rc:_require_xfs_mkfs_crc()) in the else condition to either set crc_options="-m crc=0" or drop the option (crc_options="")? Another option could be just to unconditionally set crc=[0|1] and add a _require_xfs_crc() to the test, but that would just skip the test on older systems. Brian > -Jeff > -- > To unsubscribe from this list: send the line "unsubscribe fstests" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe fstests" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Brian Foster <bfoster@redhat.com> writes: >> > @@ -72,7 +72,7 @@ for del in $sizes_to_check; do >> > lofile=$(losetup -f) >> > losetup $lofile "$testfile" >> > "$MKFS_XFS_PROG" -l size=32m -b size=$blocksize $lofile \ >> > - >/dev/null || echo "mkfs failed!" >> > + -m crc=$_fs_has_crcs>/dev/null || echo "mkfs failed!" >> >> It occurs to me that this may break on systems using a mkfs.xfs that >> does not support the "-m crc" option. Is there a standard way to test >> for such things? >> > > I suppose we could add a $crc_options to the mkfs command line that can > be set appropriately in the if/else. If the test fs has crc support, set > crc_options="-m crc=1". Otherwise, maybe use > '_scratch_mkfs_xfs_supported -m crc=0' (from > common/rc:_require_xfs_mkfs_crc()) in the else condition to either set > crc_options="-m crc=0" or drop the option (crc_options="")? How does one determine whether mkfs.xfs supports the crc= option? That was the question I tried to ask. ;-) > Another option could be just to unconditionally set crc=[0|1] and add a > _require_xfs_crc() to the test, but that would just skip the test on > older systems. I think we can agree that would be a bad approach. :) -Jeff -- To unsubscribe from this list: send the line "unsubscribe fstests" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Fri, Dec 04, 2015 at 03:56:56PM -0500, Jeff Moyer wrote: > Brian Foster <bfoster@redhat.com> writes: > > >> > @@ -72,7 +72,7 @@ for del in $sizes_to_check; do > >> > lofile=$(losetup -f) > >> > losetup $lofile "$testfile" > >> > "$MKFS_XFS_PROG" -l size=32m -b size=$blocksize $lofile \ > >> > - >/dev/null || echo "mkfs failed!" > >> > + -m crc=$_fs_has_crcs>/dev/null || echo "mkfs failed!" > >> > >> It occurs to me that this may break on systems using a mkfs.xfs that > >> does not support the "-m crc" option. Is there a standard way to test > >> for such things? > >> > > > > I suppose we could add a $crc_options to the mkfs command line that can > > be set appropriately in the if/else. If the test fs has crc support, set > > crc_options="-m crc=1". Otherwise, maybe use > > '_scratch_mkfs_xfs_supported -m crc=0' (from > > common/rc:_require_xfs_mkfs_crc()) in the else condition to either set > > crc_options="-m crc=0" or drop the option (crc_options="")? > > How does one determine whether mkfs.xfs supports the crc= option? That > was the question I tried to ask. ;-) You can test for XFS_MKFS_HAS_NO_META_SUPPORT, if it's set to true then mkfs.xfs has no crc support. More details you can refer to commit 90a3bfc5b673cc06ec81b7f7dc9788d3e30c5993 Thanks, Eryu > > > Another option could be just to unconditionally set crc=[0|1] and add a > > _require_xfs_crc() to the test, but that would just skip the test on > > older systems. > > I think we can agree that would be a bad approach. :) > > -Jeff > -- > To unsubscribe from this list: send the line "unsubscribe fstests" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe fstests" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/tests/xfs/259 b/tests/xfs/259 index 16c1935..e0022ce 100755 --- a/tests/xfs/259 +++ b/tests/xfs/259 @@ -72,7 +72,7 @@ for del in $sizes_to_check; do lofile=$(losetup -f) losetup $lofile "$testfile" "$MKFS_XFS_PROG" -l size=32m -b size=$blocksize $lofile \ - >/dev/null || echo "mkfs failed!" + -m crc=$_fs_has_crcs>/dev/null || echo "mkfs failed!" sync losetup -d $lofile done
Hi, When running xfs/259 against a file system that has crcs disabled, the test will fail. The problem is that mkfs.xfs now defaults to enabling crcs. So, when the test checks the underlying file system and finds crcs are disabled, it tries to create a file system with a block size that is too small to support them. The solution is to explicitly specify the crc feature. Signed-off-by: Jeff Moyer <jmoyer@redhat.com> -- To unsubscribe from this list: send the line "unsubscribe fstests" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html