diff options
author | Petr Vorel <pvorel@suse.cz> | 2018-06-28 14:16:53 +0200 |
---|---|---|
committer | Petr Vorel <pvorel@suse.cz> | 2018-06-29 16:52:00 +0200 |
commit | cc7d06ce374e7430876ca0b1e48cb88eb712093f (patch) | |
tree | 6a0f8c8248ccd8a72e9cba7bf43584065e140ab4 /testcases/lib | |
parent | e11b7c03609e9ca4f442f3fb1753f358bcb792c2 (diff) |
tst_test.sh: Fix check for $TST_DEVICE
When tst_device acquire call fails, it outputs into stdout,
therefore the content is actually help message.
=> Check for file presence or error exit code rather than variable not
being empty.
Fixes: c5ac5d712 tst_test.sh: Make use of tst_device helper
Signed-off-by: Petr Vorel <pvorel@suse.cz>
Acked-by: Jan Stancek <jstancek@redhat.com>
Diffstat (limited to 'testcases/lib')
-rw-r--r-- | testcases/lib/tst_test.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/testcases/lib/tst_test.sh b/testcases/lib/tst_test.sh index d27b4afd6..73c238ab4 100644 --- a/testcases/lib/tst_test.sh +++ b/testcases/lib/tst_test.sh @@ -364,7 +364,7 @@ tst_run() TST_DEVICE=$(tst_device acquire) - if [ -z "$TST_DEVICE" ]; then + if [ ! -b "$TST_DEVICE" -o $? -ne 0 ]; then tst_brk TBROK "Failed to acquire device" fi |