diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2023-02-16 16:50:07 +0100 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2023-02-17 00:08:50 +0100 |
commit | 1788b4b3aa129b9bfbb977be263455680b6dc128 (patch) | |
tree | 36cd1371e1389714d1647ceebb50618625b1564c | |
parent | 06c5c29443fdd48730a282a5db16e46c793db27b (diff) | |
download | lvm2-1788b4b3aa129b9bfbb977be263455680b6dc128.tar.gz |
tests: lvmdbus testing use --debug optinally now
To shorten down logging output of lvmdbus - use for now lvmdbus
with --debug option only when LVM_DEBUG_LVMDBUS=1 is set.
-rw-r--r-- | test/Makefile.in | 3 | ||||
-rw-r--r-- | test/lib/aux.sh | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/test/Makefile.in b/test/Makefile.in index 1cad634b8..1ea797d85 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -111,12 +111,13 @@ help: @echo " LVM_TEST_CACHE_REPAIR_CMD Command for cache_repair [$(LVM_TEST_CACHE_REPAIR_CMD)]." @echo " LVM_TEST_CACHE_RESTORE_CMD Command for cache_restore [$(LVM_TEST_CACHE_RESTORE_CMD)]." @echo " LVM_TEST_UNLIMITED Set to get unlimited test log (>32MB)" - @echo " LVM_TEST_DEVICE_LIST File path listing real devs that tests can use." + @echo " LVM_TEST_DEVICE_LIST File path listing real devs that tests can use." @echo " LVM_VALGRIND Enable valgrind testing, execs $$"VALGRIND. @echo " LVM_VALGRIND_DMEVENTD Enable valgrind testing of dmeventd (1)." @echo " LVM_VALGRIND_LVMPOLLD Enable valgrind testing of lvmpolld (1)." @echo " LVM_STRACE Enable strace logging." @echo " LVM_DEBUG_LEVEL Sets debuging level for valgrind/strace (use > 0)." + @echo " LVM_DEBUG_LVMDBUS Run lvmdbus with --debug option." @echo " LVM_VERIFY_UDEV Default verify state for lvm.conf." @echo " LVM_LOG_FILE_MAX_LINES Maximum number of logged lines for lvm2 command [1000000]." @echo " S Skip given test(s) (regex)." diff --git a/test/lib/aux.sh b/test/lib/aux.sh index ccc787eca..c15fd5baa 100644 --- a/test/lib/aux.sh +++ b/test/lib/aux.sh @@ -281,6 +281,7 @@ lvmpolld_dump() { } prepare_lvmdbusd() { + local lvmdbusdebug= local daemon rm -f debug.log_LVMDBUSD_out @@ -324,7 +325,8 @@ prepare_lvmdbusd() { echo "## preparing lvmdbusd..." lvmconf "global/notify_dbus = 1" - "$daemon" --debug > debug.log_LVMDBUSD_out 2>&1 & + test "${LVM_DEBUG_LVMDBUS:-0}" != "0" && lvmdbusdebug="--debug" + "$daemon" $lvmdbusdebug > debug.log_LVMDBUSD_out 2>&1 & local pid=$! sleep 1 |