]> git.hungrycats.org Git - btrfs-progs/commitdiff
btrfs-progs: tests: update bash style guide
authorDavid Sterba <dsterba@suse.com>
Mon, 3 Aug 2026 11:04:11 +0000 (13:04 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 3 Aug 2026 11:04:11 +0000 (13:04 +0200)
[ ci skip ]

Signed-off-by: David Sterba <dsterba@suse.com>
tests/README.md

index 1bd0e7c3f9b9ee654b927e9a4693967110259d2f..419f7863008f3e857870223a8345c3ef6d4fb030 100644 (file)
@@ -327,6 +327,9 @@ directory.
 * cleanup files an intermediate state (mount, loop devices, device mapper
   devices) a after successful test
 * use common helpers and variables where possible
+* in functions declare local variables, initialize by simple expressions
+* use `[[ ... ]]` instead of `[ .. ]`
+* use `$*` inside strings and `$@` for arrays (iterations)
 
 ## do not