diff options
author | bunder2015 <[email protected]> | 2017-06-27 13:06:07 -0400 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2017-06-27 10:06:07 -0700 |
commit | 47770d30f205b81ece1f60760f3edb5c04574e6e (patch) | |
tree | 5d8a740dc9c81a485162f0dab4a41ceb4e1f8315 /tests/zfs-tests | |
parent | 58404a73db9e245778aa7fd7028fbf742f8b815b (diff) |
Fix zpool_add_005_pos
Under Linux the existence of a block device in /etc/fstab is
not sufficient to prevent the use of the force flag. Without
the force flag a warning will be printed that the device has
a filesystem of a given type. Providing the force option
will overwrite that filesystem as long as it is not actively
mounted.
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: George Melikov <[email protected]>
Reviewed-by: Giuseppe Di Natale <[email protected]>
Tested-by: bunder2015 <[email protected]>
Signed-off-by: bunder2015 <[email protected]>
Closes #6267
Closes #6272
Diffstat (limited to 'tests/zfs-tests')
-rwxr-xr-x | tests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add_005_pos.ksh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add_005_pos.ksh b/tests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add_005_pos.ksh index a7c7bc04b..1516cb20a 100755 --- a/tests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add_005_pos.ksh +++ b/tests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add_005_pos.ksh @@ -80,7 +80,11 @@ log_must poolexists "$TESTPOOL1" unset NOINUSE_CHECK log_mustnot zpool add -f "$TESTPOOL" ${disk}${SLICE_PREFIX}${SLICE1} log_mustnot zpool add -f "$TESTPOOL" $mnttab_dev -log_mustnot zpool add -f "$TESTPOOL" $vfstab_dev +if is_linux; then + log_mustnot zpool add "$TESTPOOL" $vfstab_dev +else + log_mustnot zpool add -f "$TESTPOOL" $vfstab_dev +fi if ! is_linux; then log_must echo "y" | newfs ${DEV_DSKDIR}/$dump_dev > /dev/null 2>&1 |