Consider this: foo() { echo bar >&2 ; } set -x foobar=$(foo 2>&1) [[ $foobar == "bar" ]] The above test will fail since $foobar will also include tracing strings as stderr is where set -x redirects the output. Since in some cases this may troublesome, replace stderr with a dedicated fd allocated dynamically. Signed-off-by: Michal Berger <michalx.berger@intel.com> Change-Id: Ia6609e4463b371c07fab42d2bd291c9e43742df5 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8158 Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> |
||
---|---|---|
.. | ||
config | ||
lib | ||
applications.sh | ||
autotest_common.sh | ||
skipped_build_files.txt | ||
skipped_tests.txt |