[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211213162625.18081-1-brgl@bgdev.pl>
Date: Mon, 13 Dec 2021 17:26:25 +0100
From: Bartosz Golaszewski <brgl@...ev.pl>
To: Kent Gibson <warthog618@...il.com>,
Linus Walleij <linus.walleij@...aro.org>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Shuah Khan <shuah@...nel.org>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
Viresh Kumar <viresh.kumar@...aro.org>
Cc: linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-kselftest@...r.kernel.org,
Bartosz Golaszewski <brgl@...ev.pl>
Subject: [PATCH -next] selftests: gpio: gpio-sim: remove bashisms
'==' is a bashisms and not understood by POSIX shell. Drop it from
gpio-sim selftests.
Signed-off-by: Bartosz Golaszewski <brgl@...ev.pl>
---
I ran the newly applied patches on a different system and noticed the
tests now fail. I missed '==' operators for string comparison I used in
some places.
tools/testing/selftests/gpio/gpio-sim.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/gpio/gpio-sim.sh b/tools/testing/selftests/gpio/gpio-sim.sh
index d335a975890c..c913d5aec768 100755
--- a/tools/testing/selftests/gpio/gpio-sim.sh
+++ b/tools/testing/selftests/gpio/gpio-sim.sh
@@ -23,12 +23,12 @@ remove_chip() {
for FILE in $CONFIGFS_DIR/$CHIP/*; do
BANK=`basename $FILE`
- if [ "$BANK" == "live" ] || [ "$BANK" == "dev_name" ]; then
+ if [ "$BANK" = "live" ] || [ "$BANK" = "dev_name" ]; then
continue
fi
LINES=`ls $CONFIGFS_DIR/$CHIP/$BANK/ | egrep ^line`
- if [ "$?" == 0 ]; then
+ if [ "$?" = 0 ]; then
for LINE in $LINES; do
if [ -e $CONFIGFS_DIR/$CHIP/$BANK/$LINE/hog ]; then
rmdir $CONFIGFS_DIR/$CHIP/$BANK/$LINE/hog || \
--
2.30.1
Powered by blists - more mailing lists