From 1fdadd77de15ca3c7fccf576aea9e371d36f4d31 Mon Sep 17 00:00:00 2001 From: Artem Bityutskiy Date: Sun, 24 Apr 2011 09:52:07 +0300 Subject: fs-tests: integck: introduce a helper for checking Introduce a 'check_tested_fs()' helper function. Signed-off-by: Artem Bityutskiy --- tests/fs-tests/integrity/integck.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'tests/fs-tests') 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 */ -- cgit v1.2.3