All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bartosz Golaszewski <brgl@bgdev.pl>
To: Kent Gibson <warthog618@gmail.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Viresh Kumar <viresh.kumar@linaro.org>
Cc: linux-gpio@vger.kernel.org,
	Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Subject: [libgpiod][PATCH] tools: tests: replace egrep with grep -E
Date: Thu,  1 Jun 2023 16:09:50 +0200	[thread overview]
Message-ID: <20230601140950.779453-1-brgl@bgdev.pl> (raw)

From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

Since version 3.11 egrep emits the following warning to stderr on startup:

  egrep: warning: egrep is obsolescent; using grep -E

This makes the tests fail (though that seems to depend on BATS version)
so replace egrep with grep -E as suggested.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
 tools/gpio-tools-test      | 2 +-
 tools/gpio-tools-test.bats | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/gpio-tools-test b/tools/gpio-tools-test
index 5b6c72e..ed39ed5 100755
--- a/tools/gpio-tools-test
+++ b/tools/gpio-tools-test
@@ -37,7 +37,7 @@ check_prog() {
 check_prog bats
 check_prog modprobe
 check_prog timeout
-check_prog egrep
+check_prog grep
 
 # Check if we're running a kernel at the required version or later
 check_kernel $MIN_KERNEL_VERSION
diff --git a/tools/gpio-tools-test.bats b/tools/gpio-tools-test.bats
index adbce94..c83ca7d 100755
--- a/tools/gpio-tools-test.bats
+++ b/tools/gpio-tools-test.bats
@@ -154,7 +154,7 @@ gpiosim_cleanup() {
 		ls $BANKPATH/line* > /dev/null 2>&1
 		if [ "$?" = "0" ]
 		then
-			for LINE in $(find $BANKPATH/ | egrep "line[0-9]+$")
+			for LINE in $(find $BANKPATH/ | grep -E "line[0-9]+$")
 			do
 				test -e $LINE/hog && rmdir $LINE/hog
 				rmdir $LINE
-- 
2.39.2


             reply	other threads:[~2023-06-01 14:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-01 14:09 Bartosz Golaszewski [this message]
2023-06-01 14:28 ` [libgpiod][PATCH] tools: tests: replace egrep with grep -E Kent Gibson
2023-06-01 16:58   ` Andy Shevchenko
2023-06-02  2:13     ` Kent Gibson
2023-06-02 10:34       ` Kent Gibson
2023-06-02 13:10         ` Bartosz Golaszewski
2023-06-02 13:26           ` Kent Gibson
2023-06-02 15:33             ` Bartosz Golaszewski
2023-06-02 16:07               ` Kent Gibson
2023-06-03  1:53                 ` Kent Gibson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230601140950.779453-1-brgl@bgdev.pl \
    --to=brgl@bgdev.pl \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=bartosz.golaszewski@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=viresh.kumar@linaro.org \
    --cc=warthog618@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.