Patchwork [1/5] fs-tests: integck: introduce a helper for checking

login
register
mail settings
Submitter Artem Bityutskiy
Date April 24, 2011, 4:16 p.m.
Message ID <1303661778-13214-2-git-send-email-dedekind1@gmail.com>
Download mbox | patch
Permalink /patch/92665/
State Accepted
Commit 1fdadd77de15ca3c7fccf576aea9e371d36f4d31
Headers show

Comments

Artem Bityutskiy - April 24, 2011, 4:16 p.m.
From: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>

Introduce a 'check_tested_fs()' helper function.

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

Patch

diff --git a/tests/fs-tests/integrity/integck.c b/tests/fs-tests/integrity/integck.c
index 63f6956..52433ba 100644
--- a/tests/fs-tests/integrity/integck.c
+++ b/tests/fs-tests/integrity/integck.c
@@ -2505,6 +2505,13 @@  static int remount_tested_fs(void)
 	return 0;
 }
 
+static void check_tested_fs(void)
+{
+	check_run_no += 1;
+	dir_check(top_dir);
+	check_deleted_files();
+}
+
 /*
  * Perform the test. Returns zero on success and -1 on failure.
  */
@@ -2543,9 +2550,7 @@  static int integck(void)
 		assert(!args.power_cut_mode);
 
 	/* Check everything */
-	check_run_no += 1;
-	dir_check(top_dir);
-	check_deleted_files();
+	check_tested_fs();
 
 	for (rpt = 0; args.repeat_cnt == 0 || rpt < args.repeat_cnt; ++rpt) {
 		ret = update_test_data();
@@ -2560,9 +2565,7 @@  static int integck(void)
 		}
 
 		/* Check everything */
-		check_run_no += 1;
-		dir_check(top_dir);
-		check_deleted_files();
+		check_tested_fs();
 	}
 
 	/* Tidy up by removing everything */