aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorslashdd <[email protected]>2016-09-20 13:07:58 -0400
committerBrian Behlendorf <[email protected]>2016-09-20 10:07:58 -0700
commit792517389fad5c495a2738b61c2e9c65dedaaa9a (patch)
tree5eef2ac0ecc1db47b3f11ec4ba12a97b6427e1b7 /tests
parent25e2ab16be74cb37934e6736a1dc10fd50a00c56 (diff)
Change /etc/mtab to /proc/self/mounts
Fix misleading error message: "The /dev/zfs device is missing and must be created.", if /etc/mtab is missing. Reviewed-by: Richard Laager <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Eric Desrochers <[email protected]> Closes #4680 Closes #5029
Diffstat (limited to 'tests')
-rwxr-xr-xtests/zfs-tests/tests/functional/cli_root/zfs/zfs_003_neg.ksh9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/zfs-tests/tests/functional/cli_root/zfs/zfs_003_neg.ksh b/tests/zfs-tests/tests/functional/cli_root/zfs/zfs_003_neg.ksh
index d094d1a7d..63c735f31 100755
--- a/tests/zfs-tests/tests/functional/cli_root/zfs/zfs_003_neg.ksh
+++ b/tests/zfs-tests/tests/functional/cli_root/zfs/zfs_003_neg.ksh
@@ -40,11 +40,16 @@
verify_runnable "global"
-log_assert "zfs fails with unexpected scenarios."
+log_assert "zfs fails with unexpected scenario."
#verify zfs failed if ZFS_DEV cannot be opened
ZFS_DEV=/dev/zfs
+if is_linux; then
+ # On Linux, we use /proc/self/mounts, which cannot be moved.
+ MNTTAB=
+fi
+
for file in $ZFS_DEV $MNTTAB; do
if [[ -e $file ]]; then
$MV $file ${file}.bak
@@ -55,4 +60,4 @@ for file in $ZFS_DEV $MNTTAB; do
$MV ${file}.bak $file
done
-log_pass "zfs fails with unexpected scenarios as expected."
+log_pass "zfs fails with unexpected scenario as expected."