From: André Almeida Date: Tue, 22 Oct 2019 14:26:15 +0000 (-0300) Subject: block/013: Fix check for blockdev output X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=e86852d221f38536fbb1ee595f2276d8a13d4be3;p=users%2Fsagi%2Fblktests.git block/013: Fix check for blockdev output 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 --- diff --git a/tests/block/013 b/tests/block/013 index ed0885c..84e2ebb 100755 --- a/tests/block/013 +++ b/tests/block/013 @@ -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