From ca7ea23f8a173b554fa89f46de298fa038f9c6e2 Mon Sep 17 00:00:00 2001 From: Ryan Moeller Date: Thu, 20 Feb 2020 11:14:25 -0500 Subject: [PATCH] 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 Reviewed-by: George Melikov Reviewed-by: Brian Behlendorf Signed-off-by: Ryan Moeller Closes #10032 --- .../tests/functional/userquota/userquota_006_pos.ksh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 c53cb5f1e72b..7848a924bde8 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