Patchwork [13/13] fs-tests: integck: print a bit less if in power cut mode

login
register
mail settings
Submitter Artem Bityutskiy
Date April 22, 2011, 5:25 p.m.
Message ID <1303493124-7619-14-git-send-email-dedekind1@gmail.com>
Download mbox | patch
Permalink /patch/92561/
State Accepted
Commit 495880672a8aef1d217b841d204f9d6723e7171f
Headers show

Comments

Artem Bityutskiy - April 22, 2011, 5:25 p.m.
From: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>

Do not print extra messages when unable to re-mount - they are
already printed by the recover function.

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

Patch

diff --git a/tests/fs-tests/integrity/integck.c b/tests/fs-tests/integrity/integck.c
index 55fe8be..63f6956 100644
--- a/tests/fs-tests/integrity/integck.c
+++ b/tests/fs-tests/integrity/integck.c
@@ -3014,6 +3014,18 @@  int main(int argc, char *argv[])
 
 		free_test_data();
 
+		do {
+			ret = recover_tested_fs();
+			if (ret) {
+				CHECK(errno == EROFS);
+				rpt += 1;
+			}
+			/*
+			 * Mount may also fail due to an emulated power cut
+			 * while mounting - keep re-starting.
+			 */
+		} while (ret);
+
 		/*
 		 * The file-system became read-only and we are in power cut
 		 * testing mode. Re-mount the file-system and re-start the
@@ -3022,19 +3034,6 @@  int main(int argc, char *argv[])
 		if (args.verbose)
 			normsg("re-mount the FS and re-start - count %ld", rpt);
 
-		do {
-			ret = recover_tested_fs();
-			if (ret) {
-				CHECK(errno == EROFS);
-				/*
-				 * Mount may also fail due to an emulated power
-				 * cut while mounting - keep re-starting.
-				 */
-				if (args.verbose)
-					normsg("could not mount, try again - count %ld",
-					       ++rpt);
-			}
-		} while (ret);
 	}
 
 	free_test_data();