aboutsummaryrefslogtreecommitdiffstats
path: root/tests/zfs-tests/include
diff options
context:
space:
mode:
authorToomas Soome <[email protected]>2016-12-02 23:13:44 -0800
committerBrian Behlendorf <[email protected]>2017-04-07 14:18:19 -0700
commit8aab12182184802afb3937f1fa35be4368a45f0d (patch)
treef321a025a0d8438544065dbc3b4d29dade765ed2 /tests/zfs-tests/include
parent10f251191f16d53d8a64a934e83c3bfe6cd9195f (diff)
OpenZFS 7404 - rootpool_007_neg, bootfs_006_pos and bootfs_008_neg tests fail with the loader project bits
Authored by: Toomas Soome <[email protected]> Reviewed by: Igor Kozhukhov <[email protected]> Reviewed by: Marcel Telka <[email protected]> Reviewed by: Matthew Ahrens <[email protected]> Approved by: Richard Lowe <[email protected]> Reviewed-by: George Melikov <[email protected]> Ported-by: Brian Behlendorf <[email protected]> Porting Notes: - Removed gzip and zle compression restriction on bootfs datasets. Grub added support for these long ago. Ay version of grub which understands lz4 also supports this. - Enabled rootpool tests in runfile but skipped by default in setup on Linux since they modify the rootpool. - bootfs_006_pos.ksh, striped pools are allowed as bootfs. OpenZFS-issue: https://www.illumos.org/issues/7404 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/55a424c Closes #5982
Diffstat (limited to 'tests/zfs-tests/include')
-rw-r--r--tests/zfs-tests/include/libtest.shlib14
1 files changed, 10 insertions, 4 deletions
diff --git a/tests/zfs-tests/include/libtest.shlib b/tests/zfs-tests/include/libtest.shlib
index d9d23d52d..8984071c8 100644
--- a/tests/zfs-tests/include/libtest.shlib
+++ b/tests/zfs-tests/include/libtest.shlib
@@ -2702,8 +2702,11 @@ function is_zfsroot
function get_rootfs
{
typeset rootfs=""
- rootfs=$(awk '{if ($2 == "/" && $3 == "zfs") print $1}' \
- /etc/mnttab)
+
+ if ! is_linux; then
+ rootfs=$(awk '{if ($2 == "/" && $3 == "zfs") print $1}' \
+ /etc/mnttab)
+ fi
if [[ -z "$rootfs" ]]; then
log_fail "Can not get rootfs"
fi
@@ -2724,8 +2727,11 @@ function get_rootpool
{
typeset rootfs=""
typeset rootpool=""
- rootfs=$(awk '{if ($2 == "/" && $3 =="zfs") print $1}' \
- /etc/mnttab)
+
+ if ! is_linux; then
+ rootfs=$(awk '{if ($2 == "/" && $3 =="zfs") print $1}' \
+ /etc/mnttab)
+ fi
if [[ -z "$rootfs" ]]; then
log_fail "Can not get rootpool"
fi