]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ctdb-tests: Reformat with "shfmt -w -p -i 0 -fn"
authorMartin Schwenke <mschwenke@ddn.com>
Sat, 28 Jun 2025 02:12:33 +0000 (12:12 +1000)
committerMartin Schwenke <martins@samba.org>
Tue, 22 Jul 2025 23:02:34 +0000 (23:02 +0000)
Best reviewed with "git show -w".

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/tests/UNIT/cunit/tunable_test_001.sh

index c68cd69c64a0b969a95fcb9b6a4e5985f0d8d869..12b970a08b87c1e84a597f1cb2cd2999cd661063 100755 (executable)
@@ -4,7 +4,7 @@
 
 tfile="${CTDB_TEST_TMP_DIR}/tunable.$$"
 
-remove_files ()
+remove_files()
 {
        rm -f "$tfile"
 }
@@ -62,14 +62,14 @@ IPAllocAlgorithm=2
 AllowMixedVersions=0
 "
 
-ok_tunable_defaults ()
+ok_tunable_defaults()
 {
        ok "$defaults"
 }
 
 # Set required output to a version of $defaults where values for
 # tunables specified in $tfile replace the default values
-ok_tunable ()
+ok_tunable()
 {
        # Construct a version of $defaults prepended with a lowercase
        # version of the tunable variable, to allow case-insensitive
@@ -78,17 +78,17 @@ ok_tunable ()
        # condition in awk causes empty lines to be skipped, in case
        # there are trailing empty lines in $defaults.
        _map=$(echo "$defaults" |
-              awk -F= '$0 { printf "%s:%s=%s\n", tolower($1), $1, $2 }')
+               awk -F= '$0 { printf "%s:%s=%s\n", tolower($1), $1, $2 }')
 
        # Replace values for tunables set in $tfile
-       while IFS='=    ' read -r _var _val ; do
+       while IFS='=    ' read -r _var _val; do
                case "$_var" in
                \#* | "") continue ;;
                esac
                _decval=$((_val))
                _vl=$(echo "$_var" | tr '[:upper:]' '[:lower:]')
                _map=$(echo "$_map" |
-                      sed -e "s|^\\(${_vl}:.*=\\).*\$|\\1${_decval}|")
+                       sed -e "s|^\\(${_vl}:.*=\\).*\$|\\1${_decval}|")
        done <"$tfile"
 
        # Set result, stripping off lowercase tunable prefix