sharness: `fusermount -u` is the documented way to unmount FUSE on Linux
License: MIT Signed-off-by: Jeromy <jeromyj@gmail.com>
Tommi Virtanen committed
May 11, 2015 at 09:20 UTC
5b96d4d6b8e1041eed0193921e1cb6e3fa562af8
1 file changed
+10
-2
test/sharness/lib/test-lib.sh
+10
-2
@@ -215,12 +215,20 @@ test_launch_ipfs_daemon() {
215
fi
216
}
217
218
+do_umount() {
219
+ if [ "$(uname -s)" = "Linux" ]; then
220
+ fusermount -u "$1"
221
+ else
222
+ umount "$1"
223
+ fi
224
+}
225
+
226
test_mount_ipfs() {
227
228
# make sure stuff is unmounted first.
229
test_expect_success FUSE "'ipfs mount' succeeds" '
222
- umount "$(pwd)/ipfs" || true &&
223
- umount "$(pwd)/ipns" || true &&
230
+ do_umount "$(pwd)/ipfs" || true &&
231
+ do_umount "$(pwd)/ipns" || true &&
232
ipfs mount >actual
233
'
234