Patchwork [07/11] fs-tests: integck: fsync more often

login
register
mail settings
Submitter Artem Bityutskiy
Date May 17, 2011, 7:38 a.m.
Message ID <1305617896-23711-8-git-send-email-dedekind1@gmail.com>
Download mbox | patch
Permalink /patch/95881/
State Accepted
Commit d7c961cf40667b81973f75277ad5a386811c163c
Headers show

Comments

Artem Bityutskiy - May 17, 2011, 7:38 a.m.
From: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>

Currently integck calls 'fsync()' very rarely - with 0.1% probability. Make
this happen more often - with 1% probability.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
---
 tests/fs-tests/integrity/integck.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch

diff --git a/tests/fs-tests/integrity/integck.c b/tests/fs-tests/integrity/integck.c
index 221bd49..81d384f 100644
--- a/tests/fs-tests/integrity/integck.c
+++ b/tests/fs-tests/integrity/integck.c
@@ -1269,7 +1269,7 @@  static int file_write(struct file_info *file, int fd)
 	}
 
 	/* Sync sometimes */
-	if (random_no(1000) >= 999) {
+	if (random_no(100) >= 99) {
 		if (random_no(100) >= 50) {
 			ret = fsync(fd);
 			if (ret)