]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
generic/340: Remove second fallocate test
authorJan Kara <jack@suse.cz>
Mon, 9 May 2016 00:53:18 +0000 (10:53 +1000)
committerDave Chinner <david@fromorbit.com>
Mon, 9 May 2016 00:53:18 +0000 (10:53 +1000)
Currently holetest program uses both posix_fallocate(3) and fallocate(3)
to setup the file. However this unnecessarily prolongs the test run and
doesn't really bring any additional code coverage. So remove the
fallocate(3) pass as using posix_fallocate(3) allows us to make the test
easily runnable even for filesystems not supporting that (such as ext2).

Signed-off-by: Jan Kara <jack@suse.cz>
Acked-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
src/holetest.c
tests/generic/340
tests/generic/340.out

index c0a2c67798a3c7a5972a8fd9e3ffbfefc9ca0bfe..c5a4fd5c043a6049983ab3b05a33cae16695e6fe 100644 (file)
@@ -191,8 +191,7 @@ int main(int argc, char **argv)
         *
         * 1. explictly zero-filled
         * 2. posix_fallocated
-        * 3. fallocated
-        * 4. ftruncated
+        * 3. ftruncated
         */
 
 
@@ -271,39 +270,6 @@ int main(int argc, char **argv)
                exit(10);
        }
 
-       /*
-        * fallocated
-        */
-       printf("\nINFO: fallocate test...\n");
-
-#ifdef HAVE_FALLOCATE
-       /* create the file */
-       fd = open(path, O_RDWR | O_EXCL | O_CREAT, 0644);
-       if (fd < 0) {
-               perror(path);
-               exit(11);
-       }
-
-       /* fill it to size */
-       if (fallocate(fd, 0, 0, sz)) {
-               perror("fallocate()");
-               exit(12);
-       }
-
-       /* test it */
-       errcnt = test_this(fd, sz);
-       toterr += errcnt;
-       close(fd);
-       if (stoponerror && errcnt > 0)
-               exit(13);
-
-       /* cleanup */
-       if (unlink(path)) {
-               perror("unlink()");
-               exit(14);
-       }
-#endif
-
        /*
         * ftruncated
         */
index 69794ae417a400f02fdd995c9f1ac33c471f8f22..2ba34eb597247dcad12b4fb4eb47d2702ef528be 100644 (file)
@@ -44,7 +44,6 @@ _supported_fs generic
 _supported_os Linux
 _require_scratch
 _require_test_program "holetest"
-_require_xfs_io_command "falloc"
 
 rm -f $seqres.full
 
index 2bfc722edbe4b6c37e5edde2529f5cbd9bc9fe44..0eac9ed654dcef27856c458ff2dc9b21df0b7697 100644 (file)
@@ -12,12 +12,6 @@ INFO: thread 0 created
 INFO: thread 1 created
 INFO: 0 error(s) detected
 
-INFO: fallocate test...
-INFO: sz = 1048576
-INFO: thread 0 created
-INFO: thread 1 created
-INFO: 0 error(s) detected
-
 INFO: ftruncate test...
 INFO: sz = 1048576
 INFO: thread 0 created
@@ -36,12 +30,6 @@ INFO: thread 0 created
 INFO: thread 1 created
 INFO: 0 error(s) detected
 
-INFO: fallocate test...
-INFO: sz = 16777216
-INFO: thread 0 created
-INFO: thread 1 created
-INFO: 0 error(s) detected
-
 INFO: ftruncate test...
 INFO: sz = 16777216
 INFO: thread 0 created
@@ -60,12 +48,6 @@ INFO: thread 0 created
 INFO: thread 1 created
 INFO: 0 error(s) detected
 
-INFO: fallocate test...
-INFO: sz = 268435456
-INFO: thread 0 created
-INFO: thread 1 created
-INFO: 0 error(s) detected
-
 INFO: ftruncate test...
 INFO: sz = 268435456
 INFO: thread 0 created