Skip to contentSkip to conversation

selftests: gpio: gpio-sim: avoid forking test twice

PATCH In review Bartosz Golaszewski 2 participants 2 messages Dec 14, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 selftests: gpio: gpio-sim: avoid forking test twice

Use '-o' within [] in order to avoid spawning two processes for test.

---
 tools/testing/selftests/gpio/gpio-sim.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/gpio/gpio-sim.sh +1 -1
index c913d5aec768..341e3de00896 100755
@@ -23,7 +23,7 @@ remove_chip() {
 
 	for FILE in $CONFIGFS_DIR/$CHIP/*; do
 		BANK=`basename $FILE`
-		if [ "$BANK" = "live" ] || [ "$BANK" = "dev_name" ]; then
+		if [ "$BANK" = "live" -o "$BANK" = "dev_name" ]; then
 			continue
 		fi
 
Signature · 1 line
2.30.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 1 line · Bartosz Golaszewski

Use '-o' within [] in order to avoid spawning two processes for test.

Thanks!

Quoted 22 lines
---
 tools/testing/selftests/gpio/gpio-sim.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/gpio/gpio-sim.sh +1 -1
index c913d5aec768..341e3de00896 100755
@@ -23,7 +23,7 @@ remove_chip() {
 
 	for FILE in $CONFIGFS_DIR/$CHIP/*; do
 		BANK=`basename $FILE`
-		if [ "$BANK" = "live" ] || [ "$BANK" = "dev_name" ]; then
+		if [ "$BANK" = "live" -o "$BANK" = "dev_name" ]; then
 			continue
 		fi
 
Signature · 1 line
2.30.1
Signature · 2 lines
With Best Regards,
Andy Shevchenko