public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: fstests@vger.kernel.org
Cc: Jan Kara <jack@suse.cz>
Subject: [PATCH 1/5] generic/340: Remove second fallocate test
Date: Mon, 18 Apr 2016 21:32:31 +0200	[thread overview]
Message-ID: <1461007955-7921-2-git-send-email-jack@suse.cz> (raw)
In-Reply-To: <1461007955-7921-1-git-send-email-jack@suse.cz>

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>
---
 src/holetest.c        | 36 +-----------------------------------
 tests/generic/340     |  1 -
 tests/generic/340.out | 18 ------------------
 3 files changed, 1 insertion(+), 54 deletions(-)

diff --git a/src/holetest.c b/src/holetest.c
index c0a2c67798a3..c5a4fd5c043a 100644
--- a/src/holetest.c
+++ b/src/holetest.c
@@ -191,8 +191,7 @@ int main(int argc, char **argv)
 	 *
 	 * 1. explictly zero-filled
 	 * 2. posix_fallocated
-	 * 3. fallocated
-	 * 4. ftruncated
+	 * 3. ftruncated
 	 */
 
 
@@ -272,39 +271,6 @@ int main(int argc, char **argv)
 	}
 
 	/*
-	 * 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
 	 */
 	printf("\nINFO: ftruncate test...\n");
diff --git a/tests/generic/340 b/tests/generic/340
index 69794ae417a4..2ba34eb59724 100644
--- a/tests/generic/340
+++ b/tests/generic/340
@@ -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
 
diff --git a/tests/generic/340.out b/tests/generic/340.out
index 2bfc722edbe4..0eac9ed654dc 100644
--- a/tests/generic/340.out
+++ b/tests/generic/340.out
@@ -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
-- 
2.6.6


  reply	other threads:[~2016-04-18 19:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-18 19:32 [PATCH 1/5] More page fault stress tests and generic/038 fix Jan Kara
2016-04-18 19:32 ` Jan Kara [this message]
2016-04-18 19:32 ` [PATCH 2/5] generic/343: Test races between mmap and normal writes Jan Kara
2016-04-27 15:04   ` Brian Foster
2016-04-27 16:16     ` Jan Kara
2016-04-27 16:19       ` Jan Kara
2016-04-18 19:32 ` [PATCH 3/5] generic/344: Test races between mmap and normal write for prefaulted ranges Jan Kara
2016-04-18 19:32 ` [PATCH 4/5] generic/345: Test races between processes doing mmap writes Jan Kara
2016-04-18 19:32 ` [PATCH 5/5] generic/038: Avoid EBUSY errors on umount Jan Kara

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1461007955-7921-2-git-send-email-jack@suse.cz \
    --to=jack@suse.cz \
    --cc=fstests@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox