diff options
author | Anton Babushkin <anton.babushkin@me.com> | 2014-01-14 15:45:49 +0100 |
---|---|---|
committer | Anton Babushkin <anton.babushkin@me.com> | 2014-01-14 15:45:49 +0100 |
commit | 97e4522c76c7859f893c7159f7a86f586fd0789b (patch) | |
tree | 32a06f61c67bad4e4b574c0f6bb5d03cc58100bb /src/systemcmds/tests | |
parent | 7bcddd192fba723d165957043163762b2e08d802 (diff) | |
parent | b529e112b8ffaa92274f9dc5d94a1fce581a358e (diff) | |
download | px4-firmware-97e4522c76c7859f893c7159f7a86f586fd0789b.tar.gz px4-firmware-97e4522c76c7859f893c7159f7a86f586fd0789b.tar.bz2 px4-firmware-97e4522c76c7859f893c7159f7a86f586fd0789b.zip |
Merge branch 'master' into navigator_new_vector
Diffstat (limited to 'src/systemcmds/tests')
-rw-r--r-- | src/systemcmds/tests/test_file.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/systemcmds/tests/test_file.c b/src/systemcmds/tests/test_file.c index 7206b87d6..83d09dd5e 100644 --- a/src/systemcmds/tests/test_file.c +++ b/src/systemcmds/tests/test_file.c @@ -54,9 +54,9 @@ #include "tests.h" -int check_user_abort(); +int check_user_abort(int fd); -int check_user_abort() { +int check_user_abort(int fd) { /* check if user wants to abort */ char c; @@ -77,6 +77,8 @@ int check_user_abort() { case 'q': { warnx("Test aborted."); + fsync(fd); + close(fd); return OK; /* not reached */ } @@ -141,7 +143,7 @@ test_file(int argc, char *argv[]) fsync(fd); - if (!check_user_abort()) + if (!check_user_abort(fd)) return OK; } @@ -175,7 +177,7 @@ test_file(int argc, char *argv[]) return 1; } - if (!check_user_abort()) + if (!check_user_abort(fd)) return OK; } @@ -199,7 +201,7 @@ test_file(int argc, char *argv[]) return 1; } - if (!check_user_abort()) + if (!check_user_abort(fd)) return OK; } @@ -232,7 +234,7 @@ test_file(int argc, char *argv[]) break; } - if (!check_user_abort()) + if (!check_user_abort(fd)) return OK; } @@ -275,7 +277,7 @@ test_file(int argc, char *argv[]) break; } - if (!check_user_abort()) + if (!check_user_abort(fd)) return OK; } |