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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>
---
 new | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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.
-- 
2.40.1




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux