summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2018-02-24 10:07:12 -0800
committerGitHub <[email protected]>2018-02-24 10:07:12 -0800
commit2a0428f16b93b7d5160c277dd678e65ad27d996f (patch)
tree17141fb6e43e0d51af70011df44b8eb517cf26c8
parent41532e5a29a85de180f1bc6b6c605cedb44b0806 (diff)
ZTS: Fix zfs_share_* test case failures
Prevent false positives when running the zfs_share_* test cases due to leftover stale /var/lib/nfs/etab entries. When starting the test group re-synchronize the /var/lib/nfs/etab file with /etc/exports. At this point in the testing there will be no additional `zfs share` entries to add. Reviewed by: George Melikov <[email protected]> Reviewed-by: loli10K <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #7226
-rw-r--r--tests/zfs-tests/include/libtest.shlib8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/zfs-tests/include/libtest.shlib b/tests/zfs-tests/include/libtest.shlib
index da5456b6f..7d29760d8 100644
--- a/tests/zfs-tests/include/libtest.shlib
+++ b/tests/zfs-tests/include/libtest.shlib
@@ -1420,7 +1420,13 @@ function setup_nfs_server
fi
if is_linux; then
- log_note "NFS server must started prior to running test framework."
+ #
+ # Re-synchronize /var/lib/nfs/etab with /etc/exports and
+ # /etc/exports.d./* to provide a clean test environment.
+ #
+ log_must share -r
+
+ log_note "NFS server must be started prior to running ZTS."
return
fi