]> www.infradead.org Git - users/hch/blktests.git/commitdiff
block/013: Fix check for blockdev output
authorAndré Almeida <andrealmeid@collabora.com>
Tue, 22 Oct 2019 14:26:15 +0000 (11:26 -0300)
committerOmar Sandoval <osandov@osandov.com>
Wed, 13 Nov 2019 20:27:59 +0000 (12:27 -0800)
In some systems the operator "<<<" may not behave as expected. Replace
this operator by a more canonical approach to grep content from a
variable.

Signed-off-by: André Almeida <andrealmeid@collabora.com>
tests/block/013

index ed0885c8c829a216dc1d66ace7be8b1906fb442b..84e2ebbf456171bd62bbe5a8c7275f9f9335be3b 100755 (executable)
@@ -27,7 +27,7 @@ test_device() {
 
        local out
        out="$(blockdev --rereadpt "$TEST_DEV" 2>&1)"
-       if ! grep -o "Device or resource busy" <<< "$out"; then
+       if ! echo "$out" | grep -o "Device or resource busy"; then
                echo "$out"
        fi