diff options
Diffstat (limited to 'tests/zfs-tests/include/libtest.shlib')
-rw-r--r-- | tests/zfs-tests/include/libtest.shlib | 14 |
1 files changed, 14 insertions, 0 deletions
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: |