]> www.infradead.org Git - mtd-utils.git/commitdiff
fs-tests: allow for ENOSPC in test fwrite00
authorAdrian Hunter <ext-adrian.hunter@nokia.com>
Mon, 8 Oct 2007 14:43:16 +0000 (17:43 +0300)
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Mon, 16 Jun 2008 15:02:31 +0000 (18:02 +0300)
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
tests/fs-tests/stress/atoms/fwrite00.c

index 2f40b3db24303d2dc243bc4160b5018dcfed58af..fd691befc275548fda9745d1e4d562aaec87d061 100644 (file)
@@ -56,6 +56,14 @@ void filestress00(void)
                if (fd == -1) {
                        fd = open(file_name, O_CREAT | O_WRONLY,
                          S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH);
+                       if (fd == -1 && errno == ENOSPC) {
+                               /* Break if repeat count exceeded */
+                               if (tests_repeat_parameter > 0 && --repeat <= 0)
+                                       break;
+                               /* Sleep 2 secs and try again */
+                               sleep(2);
+                               continue;
+                       }
                        CHECK(fd != -1);
                        deleted = 0;
                        if (tests_unlink_flag) {