From 818d4a87fd59ddbacc8ae0c8b67eb1577ca9b069 Mon Sep 17 00:00:00 2001 From: Igor K Date: Fri, 7 Feb 2020 23:32:52 +0300 Subject: [PATCH] ZTS: Add an is_dilos function for future ZTS updates Reviewed-by: Brian Behlendorf Reviewed-by: Ryan Moeller Signed-off-by: Igor Kozhukhov Closes #9960 --- tests/zfs-tests/include/libtest.shlib | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/zfs-tests/include/libtest.shlib b/tests/zfs-tests/include/libtest.shlib index ac9ff61836..bddca368d1 100644 --- a/tests/zfs-tests/include/libtest.shlib +++ b/tests/zfs-tests/include/libtest.shlib @@ -119,6 +119,21 @@ function is_freebsd fi } +# Determine if this is a DilOS test system +# +# Return 0 if platform DilOS, 1 if otherwise + +function is_dilos +{ + typeset ID="" + [[ -f /etc/os-release ]] && . /etc/os-release + if [[ $ID == "dilos" ]]; then + return 0 + else + return 1 + fi +} + # Determine if this is a 32-bit system # # Return 0 if platform is 32-bit, 1 if otherwise