]> git.proxmox.com Git - mirror_zfs.git/blobdiff - tests/zfs-tests/include/libtest.shlib
Do not iterate through filesystems unnecessarily
[mirror_zfs.git] / tests / zfs-tests / include / libtest.shlib
index 045c122077729c02a082a8f03f78e7ce3070fa86..ea9448353b68fc0732b9542015ae70310fa63386 100644 (file)
 # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 # Copyright (c) 2012, 2017 by Delphix. All rights reserved.
-# Copyright 2016 Nexenta Systems, Inc.
+# Copyright (c) 2017 by Tim Chase. All rights reserved.
+# Copyright (c) 2017 by Nexenta Systems, Inc. All rights reserved.
 # Copyright (c) 2017 Lawrence Livermore National Security, LLC.
 # Copyright (c) 2017 Datto Inc.
 # Copyright (c) 2017 Open-E, Inc. All Rights Reserved.
+# Use is subject to license terms.
 #
 
 . ${STF_TOOLS}/include/logapi.shlib
@@ -1092,14 +1094,14 @@ function fill_fs # destdir dirnum filenum bytes num_writes data
        typeset -i filenum=${3:-50}
        typeset -i bytes=${4:-8192}
        typeset -i num_writes=${5:-10240}
-       typeset -i data=${6:-0}
+       typeset data=${6:-0}
 
        typeset -i odirnum=1
        typeset -i idirnum=0
        typeset -i fn=0
        typeset -i retval=0
 
-       log_must mkdir -p $destdir/$idirnum
+       mkdir -p $destdir/$idirnum
        while (($odirnum > 0)); do
                if ((dirnum >= 0 && idirnum >= dirnum)); then
                        odirnum=0
@@ -1115,7 +1117,7 @@ function fill_fs # destdir dirnum filenum bytes num_writes data
                if (($fn >= $filenum)); then
                        fn=0
                        ((idirnum = idirnum + 1))
-                       log_must mkdir -p $destdir/$idirnum
+                       mkdir -p $destdir/$idirnum
                else
                        ((fn = fn + 1))
                fi
@@ -2592,7 +2594,6 @@ function verify_opt_p_ops
                                        "when ops is $ops."
                        fi
                        log_must datasetexists $dataset
-                       log_mustnot snapexists $dataset
                        ;;
                *)
                        log_fail "$ops is not supported."