From: Marian Csontos <mcsontos@sourceware.org>
To: lvm-devel@redhat.com
Subject: master - test: grep -q may fail and it does
Date: Thu, 1 Oct 2020 09:36:20 +0000 (GMT) [thread overview]
Message-ID: <20201001093620.66C783850416@sourceware.org> (raw)
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=46e5908759a803173c2d8964d8ca832195993f3b
Commit: 46e5908759a803173c2d8964d8ca832195993f3b
Parent: 2272a32e6f9b99f98514e58de82f8a3baa8b46da
Author: Marian Csontos <mcsontos@redhat.com>
AuthorDate: Thu Oct 1 11:33:57 2020 +0200
Committer: Marian Csontos <mcsontos@redhat.com>
CommitterDate: Thu Oct 1 11:33:57 2020 +0200
test: grep -q may fail and it does
The script runs with pipefail, grep -q exits immediately sending SIGPIPE
to lvm segtype which fails whole pipe.
---
test/lib/aux.sh | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/test/lib/aux.sh b/test/lib/aux.sh
index 77942009b..02989c5cb 100644
--- a/test/lib/aux.sh
+++ b/test/lib/aux.sh
@@ -1595,7 +1595,7 @@ have_thin() {
}
have_vdo() {
- lvm segtypes 2>/dev/null | grep vdo$ >/dev/null || {
+ lvm segtypes 2>/dev/null | grep 'vdo$' >/dev/null || {
echo "VDO is not built-in." >&2
return 1
}
@@ -1603,7 +1603,7 @@ have_vdo() {
}
have_writecache() {
- lvm segtypes 2>/dev/null | grep -q writecache$ || {
+ lvm segtypes 2>/dev/null | grep 'writecache$' >/dev/null || {
echo "writecache is not built-in." >&2
return 1
}
@@ -1611,7 +1611,7 @@ have_writecache() {
}
have_integrity() {
- lvm segtypes 2>/dev/null | grep -q integrity$ || {
+ lvm segtypes 2>/dev/null | grep 'integrity$' >/dev/null || {
echo "integrity is not built-in." >&2
return 1
}
reply other threads:[~2020-10-01 9:36 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20201001093620.66C783850416@sourceware.org \
--to=mcsontos@sourceware.org \
--cc=lvm-devel@redhat.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.