Commit 4506c0c3 authored by Michal Berger's avatar Michal Berger Committed by Jim Harris
Browse files

test/common: Enable inherit_errexit



Do this to detect and trap failures inside subshell environments.
Without it, we simply fall through expecting the "upper" layer
of the test to handle the failure. If such handling is not
implemented we may miss some broken pieces along the test
suites, potentially creating false positives. Consider example:

  # [[ $(this_command_does_not_exist) -eq 0 ]]

Test should fail since clearly we cannot rely on calling something
that doesn't exist. In current setup, this would fall through;
inherit_errexit test would immediately abort it.

Change-Id: I7210138cf15bb90eb6b6519d3aa25fd25f54d6f2
Signed-off-by: default avatarMichal Berger <michal.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/23079


Reviewed-by: default avatarJim Harris <jim.harris@samsung.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarBen Walker <ben@nvidia.com>
parent b24df7cf
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@ function xtrace_fd() {
set -e
shopt -s nullglob
shopt -s extglob
shopt -s inherit_errexit

if [ -z "${output_dir:-}" ]; then
	mkdir -p "$rootdir/../output"