projects
/
qemu-gpiodev
/
libfuse.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a2a09e7
)
test_write_cache: Use fuse_session_exit() to stop filesystem thread
author
Rostislav Skudnov
<rostislav@tuxera.com>
Mon, 23 Jul 2018 07:31:00 +0000
(07:31 +0000)
committer
Nikolaus Rath
<Nikolaus@rath.org>
Mon, 23 Jul 2018 10:02:57 +0000
(11:02 +0100)
Using fuse_session_exit() followed by fuse_session_unmount() ensures
that a proper cleanup and shutdown is performed.
test/test_write_cache.c
patch
|
blob
|
history
diff --git
a/test/test_write_cache.c
b/test/test_write_cache.c
index 7a6d7e6899a171c4b7482c6efe736aaf0873c9f2..f91cbb6bfd7e4849f0db15da5677402aa08811be 100644
(file)
--- a/
test/test_write_cache.c
+++ b/
test/test_write_cache.c
@@
-205,9
+205,10
@@
int main(int argc, char *argv[]) {
free(fuse_opts.mountpoint);
/* Stop file system */
- assert(pthread_cancel(fs_thread) == 0);
-
+ fuse_session_exit(se);
fuse_session_unmount(se);
+ assert(pthread_join(fs_thread, NULL) == 0);
+
assert(got_write == 1);
fuse_remove_signal_handlers(se);
fuse_session_destroy(se);