diff mbox series

[blktests,1/4] new: don't mandate double square brackets

Message ID 20230728110720.1280124-2-shinichiro.kawasaki@wdc.com (mailing list archive)
State New, archived
Headers show
Series clarify confusions in blktests contributions | expand

Commit Message

Shinichiro Kawasaki July 28, 2023, 11:07 a.m. UTC
It was guided for test statements in blktests scripts to use double
square brackets [[ ]] form instead of single square brackets [ ] form.
However, a number of patch contributors use [ ]. It is not productive to
replace them with [[ ]] and discouraging contributions. To avoid those
drawbacks, allow both forms and still keep [[ ]] as the preferred form.
While at it, fix a typo.

Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
---
 new | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/new b/new
index e8ee5a0..574d8b4 100755
--- a/new
+++ b/new
@@ -232,7 +232,7 @@  test() {
 	echo "Test complete"
 }
 
-# Finally, some coding style guidlines:
+# Finally, some coding style guidelines:
 # - Indent with tabs.
 # - Don't add a space before the parentheses or a newline before the curly brace
 #   in function definitions.
@@ -242,7 +242,7 @@  test() {
 # - Functions defined by the testing framework or group scripts, including
 #   helpers, have a leading underscore. E.g., _have_scsi_debug. Functions local
 #   to the test should not have a leading underscore.
-# - Use the bash [[ ]] form of tests instead of [ ].
+# - Both [[ ]] form and [ ] form are fine for tests. [[ ]] is preferred.
 # - Always quote variable expansions unless the variable is a number or inside of
 #   a [[ ]] test.
 # - Use the \$() form of command substitution instead of backticks.