diff options
author | Ryan Moeller <[email protected]> | 2020-01-28 11:36:33 -0500 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2020-01-28 08:36:33 -0800 |
commit | 7a298ae97589d758d2b9aadf78b91a2af450d37a (patch) | |
tree | 4f08c03af352c9fe826c2bdc0c1069138cc46c40 /tests/zfs-tests/include/libtest.shlib | |
parent | 25df8fb42ffa62e4ad3855a8cd4660eeedc80e1f (diff) |
ZTS: Eliminate random and shuf, consolidate code
Both GNU and FreeBSD sort have -R to randomize input.
Reviewed-by: John Kennedy <[email protected]>
Reviewed-by: George Melikov <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ryan Moeller <[email protected]>
Closes #9900
Diffstat (limited to 'tests/zfs-tests/include/libtest.shlib')
-rw-r--r-- | tests/zfs-tests/include/libtest.shlib | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/tests/zfs-tests/include/libtest.shlib b/tests/zfs-tests/include/libtest.shlib index d9ba374f2..9c089990b 100644 --- a/tests/zfs-tests/include/libtest.shlib +++ b/tests/zfs-tests/include/libtest.shlib @@ -3966,11 +3966,7 @@ function range_shuffle # begin end typeset -i begin=$1 typeset -i end=$2 - if is_freebsd; then - seq ${begin} ${end} | random -f - - else - shuf -i ${begin}-${end} - fi + seq ${begin} ${end} | sort -R } # |