Skip to content

Commit

Permalink
test/common: Add xtrace_disable_per_cmd()
Browse files Browse the repository at this point in the history
This function is an alternative to xtrace_disable() which works
within a smaller scope, i.e., per cmd. Useful to quickly hide
verbose output without disabling entire tracing.

Signed-off-by: Michal Berger <[email protected]>
Change-Id: I284eafaf0e74764f329a7a6897a7d7fa85176de7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16363
Reviewed-by: Tomasz Zawadzki <[email protected]>
Reviewed-by: John Kariuki <[email protected]>
Reviewed-by: Jim Harris <[email protected]>
Tested-by: SPDK CI Jenkins <[email protected]>
  • Loading branch information
mikeBashStuff authored and tomzawadzki committed Jan 31, 2023
1 parent 15e3101 commit 929ac21
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/common/autotest_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ function xtrace_disable() {
fi
}

function xtrace_disable_per_cmd() { eval "$* ${BASH_XTRACEFD}> /dev/null"; }

xtrace_disable
set -e
shopt -s expand_aliases
Expand Down

0 comments on commit 929ac21

Please sign in to comment.