summaryrefslogtreecommitdiff
path: root/tests/fs-tests/integrity
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2011-04-24 09:52:07 +0300
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2011-04-25 20:04:30 +0300
commit1fdadd77de15ca3c7fccf576aea9e371d36f4d31 (patch)
tree55ec324ec7e220e9c5c6808900311528376d3949 /tests/fs-tests/integrity
parent495880672a8aef1d217b841d204f9d6723e7171f (diff)
fs-tests: integck: introduce a helper for checking
Introduce a 'check_tested_fs()' helper function. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'tests/fs-tests/integrity')
-rw-r--r--tests/fs-tests/integrity/integck.c15
1 files changed, 9 insertions, 6 deletions
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 */