aboutsummaryrefslogtreecommitdiffstats
path: root/tests/zfs-tests/include
diff options
context:
space:
mode:
Diffstat (limited to 'tests/zfs-tests/include')
-rw-r--r--tests/zfs-tests/include/commands.cfg1
-rw-r--r--tests/zfs-tests/include/libtest.shlib14
2 files changed, 15 insertions, 0 deletions
diff --git a/tests/zfs-tests/include/commands.cfg b/tests/zfs-tests/include/commands.cfg
index 4497a6248..e479f2c01 100644
--- a/tests/zfs-tests/include/commands.cfg
+++ b/tests/zfs-tests/include/commands.cfg
@@ -201,6 +201,7 @@ export ZFSTEST_FILES='badsend
file_trunc
file_write
get_diff
+ getversion
largest_file
libzfs_input_check
mkbusy
diff --git a/tests/zfs-tests/include/libtest.shlib b/tests/zfs-tests/include/libtest.shlib
index 2e6ec7601..66aec104c 100644
--- a/tests/zfs-tests/include/libtest.shlib
+++ b/tests/zfs-tests/include/libtest.shlib
@@ -4051,6 +4051,20 @@ function stat_crtime #<path>
esac
}
+function stat_generation #<path>
+{
+ typeset path=$1
+
+ case $(uname) in
+ Linux)
+ getversion "${path}"
+ ;;
+ *)
+ stat -f %v "${path}"
+ ;;
+ esac
+}
+
# Run a command as if it was being run in a TTY.
#
# Usage: