summaryrefslogtreecommitdiffstats
path: root/tests/zfs-tests
diff options
context:
space:
mode:
authorRyan Moeller <[email protected]>2020-02-20 11:14:25 -0500
committerGitHub <[email protected]>2020-02-20 08:14:24 -0800
commitca7ea23f8a173b554fa89f46de298fa038f9c6e2 (patch)
tree56ff418705621239d8c139d61ef9700781c20bb8 /tests/zfs-tests
parentb11375d74a18945d247f0f98e2d599628bd26e2a (diff)
ZTS: Fix userquota_006_pos on FreeBSD
FreeBSD uses `pw` for account management. `userquota_006_pos` erroneously invokes the non-existent `groupdel` command on FreeBSD. Use `pw groupdel -n` instead of `groupdel` on FreeBSD. 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 #10032
Diffstat (limited to 'tests/zfs-tests')
-rwxr-xr-xtests/zfs-tests/tests/functional/userquota/userquota_006_pos.ksh6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/zfs-tests/tests/functional/userquota/userquota_006_pos.ksh b/tests/zfs-tests/tests/functional/userquota/userquota_006_pos.ksh
index c53cb5f1e..7848a924b 100755
--- a/tests/zfs-tests/tests/functional/userquota/userquota_006_pos.ksh
+++ b/tests/zfs-tests/tests/functional/userquota/userquota_006_pos.ksh
@@ -67,7 +67,11 @@ done
set -A no_groups "aidsf@dfsd@" "123223-dsfds#sdfsd" "mss_#ss" "1234"
for group in "${no_groups[@]}"; do
- log_mustnot eval "groupdel $group > /dev/null 2>&1"
+ if is_freebsd; then
+ log_mustnot eval "pw groupdel -n $group >/dev/null 2>&1"
+ else
+ log_mustnot eval "groupdel $group >/dev/null 2>&1"
+ fi
log_must eval "zfs get groupquota@$group $QFS >/dev/null 2>&1"
log_must eval "zfs get groupquota@$group $snap_fs >/dev/null 2>&1"
done