Print this page
7290 ZFS test suite needs to control what utilities it can run
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
@@ -24,11 +24,11 @@
# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
#
-# Copyright (c) 2013 by Delphix. All rights reserved.
+# Copyright (c) 2013, 2016 by Delphix. All rights reserved.
#
. $STF_SUITE/include/libtest.shlib
. $STF_SUITE/tests/functional/userquota/userquota_common.kshlib
@@ -43,11 +43,11 @@
#
function cleanup
{
if datasetexists $snap_fs; then
- log_must $ZFS destroy $snap_fs
+ log_must zfs destroy $snap_fs
fi
log_must cleanup_quota
}
@@ -54,41 +54,41 @@
log_onexit cleanup
log_assert "Check the invalid parameter of zfs set user|group quota"
typeset snap_fs=$QFS@snap
-log_must $ZFS snapshot $snap_fs
+log_must zfs snapshot $snap_fs
set -A no_users "mms1234" "ss@#" "root-122"
for user in "${no_users[@]}"; do
- log_mustnot $ID $user
- log_mustnot $ZFS set userquota@$user=100m $QFS
+ log_mustnot id $user
+ log_mustnot zfs set userquota@$user=100m $QFS
done
log_note "can set all numberic id even that id is not existed"
-log_must $ZFS set userquota@12345678=100m $QFS
-log_mustnot $ZFS set userquota@12345678=100m $snap_fs
+log_must zfs set userquota@12345678=100m $QFS
+log_mustnot zfs set userquota@12345678=100m $snap_fs
set -A sizes "100mfsd" "m0.12m" "GGM" "-1234-m" "123m-m"
for size in "${sizes[@]}"; do
log_note "can not set user quota with invalid size parameter"
- log_mustnot $ZFS set userquota@root=$size $QFS
+ log_mustnot zfs set userquota@root=$size $QFS
done
log_note "can not set user quota to snapshot $snap_fs"
-log_mustnot $ZFS set userquota@root=100m $snap_fs
+log_mustnot zfs set userquota@root=100m $snap_fs
set -A no_groups "aidsf@dfsd@" "123223-dsfds#sdfsd" "mss_#ss" "@@@@"
for group in "${no_groups[@]}"; do
- log_mustnot eval "$GREP $group /etc/group"
- log_mustnot $ZFS set groupquota@$group=100m $QFS
+ log_mustnot eval "grep $group /etc/group"
+ log_mustnot zfs set groupquota@$group=100m $QFS
done
log_note "can not set group quota with invalid size parameter"
-log_mustnot $ZFS set groupquota@root=100msfsd $QFS
+log_mustnot zfs set groupquota@root=100msfsd $QFS
log_note "can not set group quota to snapshot $snap_fs"
-log_mustnot $ZFS set groupquota@root=100m $snap_fs
+log_mustnot zfs set groupquota@root=100m $snap_fs
log_pass "Check the invalid parameter of zfs set user|group quota pas as expect"