aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/fs-tests/stress/atoms/fwrite00.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/fs-tests/stress/atoms/fwrite00.c b/tests/fs-tests/stress/atoms/fwrite00.c
index 3406bba..877c63c 100644
--- a/tests/fs-tests/stress/atoms/fwrite00.c
+++ b/tests/fs-tests/stress/atoms/fwrite00.c
@@ -138,7 +138,9 @@ static void filestress00(void)
deleted = 1;
}
}
- CHECK(close(fd) != -1);
+ if (fd > 0) {
+ CHECK(close(fd) != -1);
+ }
/* Sleep */
if (tests_sleep_parameter > 0) {
unsigned us = tests_sleep_parameter * 1000;