* [PATCH] xfstests: add _require_sparse_files
@ 2010-10-28 12:34 Christoph Hellwig
2010-11-09 11:34 ` Christoph Hellwig
0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2010-10-28 12:34 UTC (permalink / raw)
To: xfs
Add a helper to check if the filesystem supports sparse files. This is
used to guard tests that exercise sparse file functionality and would
take forever on filesystems that have to zero all blocks on extending
truncates.
Unfortunately there's no good way to autodetect this functionality, so
just implement it as a blacklist for now.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Index: xfstests-dev/014
===================================================================
--- xfstests-dev.orig/014 2010-10-28 11:51:58.000000000 +0000
+++ xfstests-dev/014 2010-10-28 11:52:06.000000000 +0000
@@ -47,6 +47,7 @@ _cleanup()
_supported_fs generic
_supported_os IRIX Linux
+_require_sparse_files
_setup_testdir
echo "brevity is wit..."
Index: xfstests-dev/129
===================================================================
--- xfstests-dev.orig/129 2010-10-28 11:52:08.000000000 +0000
+++ xfstests-dev/129 2010-10-28 11:52:24.000000000 +0000
@@ -52,8 +52,10 @@ echo_and_run()
_supported_fs generic
_supported_os Linux
-_setup_testdir
_require_scratch
+_require_sparse_files
+
+_setup_testdir
_scratch_mkfs >/dev/null 2>&1
_scratch_mount "-o nosuid"
Index: xfstests-dev/130
===================================================================
--- xfstests-dev.orig/130 2010-10-28 11:52:26.000000000 +0000
+++ xfstests-dev/130 2010-10-28 11:52:35.000000000 +0000
@@ -55,8 +55,10 @@ _cleanup()
_supported_fs generic
_supported_os Linux IRIX
-_setup_testdir
_require_scratch
+_require_sparse_files
+
+_setup_testdir
_scratch_mkfs >/dev/null 2>&1
_scratch_mount
Index: xfstests-dev/240
===================================================================
--- xfstests-dev.orig/240 2010-10-28 11:52:37.000000000 +0000
+++ xfstests-dev/240 2010-10-28 11:52:43.000000000 +0000
@@ -48,6 +48,8 @@ _cleanup()
_supported_fs generic
_supported_os Linux
+_require_sparse_files
+
echo "Silence is golden."
# real QA test starts here
Index: xfstests-dev/common.rc
===================================================================
--- xfstests-dev.orig/common.rc 2010-10-28 11:49:38.000000000 +0000
+++ xfstests-dev/common.rc 2010-10-28 11:51:56.000000000 +0000
@@ -857,6 +857,22 @@ _require_fs_space()
_notrun "This test requires at least ${GB}GB free on $MNT to run"
}
+#
+# Check if the filesystem supports sparese files.
+#
+# Unfortunately there is no better way to do this than a manual black list.
+#
+_require_sparse_files()
+{
+ case $FSTYP in
+ hfsplus)
+ _notrun "Sparse files not supported by this filesystem type: $FSTYP"
+ ;;
+ *)
+ ;;
+ esac
+}
+
# check that a FS on a device is mounted
# if so, return mount point
#
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] xfstests: add _require_sparse_files
2010-10-28 12:34 [PATCH] xfstests: add _require_sparse_files Christoph Hellwig
@ 2010-11-09 11:34 ` Christoph Hellwig
2010-11-09 12:00 ` Dave Chinner
0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2010-11-09 11:34 UTC (permalink / raw)
To: xfs
updated version to also include test 239 which reqires the check, too.
---
From: Christoph Hellwig <hch@lst.de>
Subject: [PATCH] xfstests: add _require_sparse_files
Add a helper to check if the filesystem supports sparse files. This is
used to guard tests that exercise sparse file functionality and would
take forever on filesystems that have to zero all blocks on extending
truncates.
Unfortunately there's no good way to autodetect this functionality, so
just implement it as a blacklist for now.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Index: xfstests-dev/014
===================================================================
--- xfstests-dev.orig/014 2010-11-09 11:28:58.000000000 +0000
+++ xfstests-dev/014 2010-11-09 11:30:14.000000000 +0000
@@ -47,6 +47,7 @@ _cleanup()
_supported_fs generic
_supported_os IRIX Linux
+_require_sparse_files
_setup_testdir
echo "brevity is wit..."
Index: xfstests-dev/129
===================================================================
--- xfstests-dev.orig/129 2010-11-09 11:28:58.000000000 +0000
+++ xfstests-dev/129 2010-11-09 11:30:14.000000000 +0000
@@ -52,8 +52,10 @@ echo_and_run()
_supported_fs generic
_supported_os Linux
-_setup_testdir
_require_scratch
+_require_sparse_files
+
+_setup_testdir
_scratch_mkfs >/dev/null 2>&1
_scratch_mount "-o nosuid"
Index: xfstests-dev/130
===================================================================
--- xfstests-dev.orig/130 2010-11-09 11:28:58.000000000 +0000
+++ xfstests-dev/130 2010-11-09 11:30:14.000000000 +0000
@@ -55,8 +55,10 @@ _cleanup()
_supported_fs generic
_supported_os Linux IRIX
-_setup_testdir
_require_scratch
+_require_sparse_files
+
+_setup_testdir
_scratch_mkfs >/dev/null 2>&1
_scratch_mount
Index: xfstests-dev/240
===================================================================
--- xfstests-dev.orig/240 2010-11-09 11:28:58.000000000 +0000
+++ xfstests-dev/240 2010-11-09 11:30:14.000000000 +0000
@@ -48,6 +48,8 @@ _cleanup()
_supported_fs generic
_supported_os Linux
+_require_sparse_files
+
echo "Silence is golden."
# real QA test starts here
Index: xfstests-dev/common.rc
===================================================================
--- xfstests-dev.orig/common.rc 2010-11-09 11:28:58.000000000 +0000
+++ xfstests-dev/common.rc 2010-11-09 11:30:14.000000000 +0000
@@ -857,6 +857,22 @@ _require_fs_space()
_notrun "This test requires at least ${GB}GB free on $MNT to run"
}
+#
+# Check if the filesystem supports sparese files.
+#
+# Unfortunately there is no better way to do this than a manual black list.
+#
+_require_sparse_files()
+{
+ case $FSTYP in
+ hfsplus)
+ _notrun "Sparse files not supported by this filesystem type: $FSTYP"
+ ;;
+ *)
+ ;;
+ esac
+}
+
# check that a FS on a device is mounted
# if so, return mount point
#
Index: xfstests-dev/239
===================================================================
--- xfstests-dev.orig/239 2010-11-09 11:30:18.000000000 +0000
+++ xfstests-dev/239 2010-11-09 11:30:23.000000000 +0000
@@ -45,6 +45,8 @@ _cleanup()
_supported_fs generic
_supported_os Linux
+_require_sparse_files
+
AIO_TEST=src/aio-dio-regress/aio-dio-hole-filling-race
[ -x $AIO_TEST ] || _notrun "$AIO_TEST not built"
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] xfstests: add _require_sparse_files
2010-11-09 11:34 ` Christoph Hellwig
@ 2010-11-09 12:00 ` Dave Chinner
0 siblings, 0 replies; 3+ messages in thread
From: Dave Chinner @ 2010-11-09 12:00 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: xfs
On Tue, Nov 09, 2010 at 06:34:54AM -0500, Christoph Hellwig wrote:
> updated version to also include test 239 which reqires the check, too.
>
> ---
> From: Christoph Hellwig <hch@lst.de>
> Subject: [PATCH] xfstests: add _require_sparse_files
>
> Add a helper to check if the filesystem supports sparse files. This is
> used to guard tests that exercise sparse file functionality and would
> take forever on filesystems that have to zero all blocks on extending
> truncates.
>
> Unfortunately there's no good way to autodetect this functionality, so
> just implement it as a blacklist for now.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Looks ok, minor typo needs fixing, but:
Reviewed-by: Dave Chinner <dchinner@redhat.com>
> +#
> +# Check if the filesystem supports sparese files.
sparse
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-11-09 11:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-28 12:34 [PATCH] xfstests: add _require_sparse_files Christoph Hellwig
2010-11-09 11:34 ` Christoph Hellwig
2010-11-09 12:00 ` Dave Chinner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox