summaryrefslogtreecommitdiff
path: root/tests/fs-tests/stress/atoms
diff options
context:
space:
mode:
authorAdrian Hunter <ext-adrian.hunter@nokia.com>2007-10-08 17:43:16 +0300
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2008-06-16 18:02:31 +0300
commita6ed599706664a0343e0b754213ade4b63665a4d (patch)
treec9bf056f14469a86f691853dce711ad4979d673a /tests/fs-tests/stress/atoms
parenta3b8a2f068bfc13391c6e1d06471f97d4743d398 (diff)
fs-tests: allow for ENOSPC in test fwrite00
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Diffstat (limited to 'tests/fs-tests/stress/atoms')
-rw-r--r--tests/fs-tests/stress/atoms/fwrite00.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/fs-tests/stress/atoms/fwrite00.c b/tests/fs-tests/stress/atoms/fwrite00.c
index 2f40b3d..fd691be 100644
--- a/tests/fs-tests/stress/atoms/fwrite00.c
+++ b/tests/fs-tests/stress/atoms/fwrite00.c
@@ -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) {