aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorfelixdoerre <[email protected]>2020-05-21 04:02:41 +0300
committerGitHub <[email protected]>2020-05-20 18:02:41 -0700
commit501a1511aeaaf8f7b50410ef7e64e06647aa8dfb (patch)
tree605dbad078ed66f976f1799831093bc08a67cd9c /tests
parent57434abae6af23cf0b0b360882762dfae7fee555 (diff)
mount: use the mount syscall directly
Allow zfs datasets to be mounted on Linux without relying on the invocation of an external processes. This is the same behavior which is implemented for FreeBSD. Use of the libmount library was originally considered because it provides functionality to properly lock and update the /etc/mtab file. However, these days /etc/mtab is typically a symlink to /proc/self/mounts so there's nothing to updated. Therefore, we call mount(2) directly and avoid any additional dependencies. If required the legacy behavior can be enabled by setting the ZFS_MOUNT_HELPER environment variable. This may be needed in environments where SELinux in enabled and the zfs binary does not have mount permission. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Felix Dörre <[email protected]> #10294
Diffstat (limited to 'tests')
-rw-r--r--tests/zfs-tests/tests/functional/rsend/rsend.kshlib2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/zfs-tests/tests/functional/rsend/rsend.kshlib b/tests/zfs-tests/tests/functional/rsend/rsend.kshlib
index 779e2447d..b4819245e 100644
--- a/tests/zfs-tests/tests/functional/rsend/rsend.kshlib
+++ b/tests/zfs-tests/tests/functional/rsend/rsend.kshlib
@@ -675,7 +675,7 @@ function test_fs_setup
datasetexists $recvfs && log_must_busy zfs destroy -r $recvpool
datasetexists $streamfs && log_must_busy zfs destroy -r $streamfs
- if $(datasetexists $sendfs || zfs create -o compress=lz4 $sendfs); then
+ if datasetexists $sendfs || zfs create -o compress=lz4 $sendfs; then
mk_files 1000 256 0 $sendfs &
mk_files 1000 131072 0 $sendfs &
mk_files 100 1048576 0 $sendfs &