diff options
author | David Teigland <teigland@redhat.com> | 2019-05-21 14:23:01 -0500 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2019-05-21 14:24:57 -0500 |
commit | 99ca06ca4662ac43c09fb423bb26451ae5171d86 (patch) | |
tree | 87ec059e899a0bb2af0846415ea05eb88d71d09e | |
parent | dc1e12dcd423cf912489e1ed380fa6eb1a049f2e (diff) | |
download | lvm2-99ca06ca4662ac43c09fb423bb26451ae5171d86.tar.gz |
tests: hints check if strace exists
avoid test failure if test system does not
have strace
-rw-r--r-- | test/shell/hints.sh | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/shell/hints.sh b/test/shell/hints.sh index 31628b0e8..019912e33 100644 --- a/test/shell/hints.sh +++ b/test/shell/hints.sh @@ -53,12 +53,15 @@ grep -v -E "$dev1|$dev2" $HINTS > tmptest not grep scan: tmptest # test that 'pvs' submits only two reads, one for each PV in hints + +if [ -e "/usr/bin/strace" ]; then strace -e io_submit pvs 2>&1|tee tmptest test "$(grep io_submit tmptest | wc -l)" -eq 2 # test that 'pvs -a' submits six reads, one for each device strace -e io_submit pvs -a 2>&1|tee tmptest test "$(grep io_submit tmptest | wc -l)" -eq 6 +fi # # vg2 uses dev3,dev4 |