In case IFS was modified in the environment where print_backtrace() was called, it could impact the cmd substitution used for seq'ing the main FUNCNAME loop. Example: ========== Backtrace start: ========== /home/vagrant/spdk_repo/spdk/test/common/autotest_common.sh: line 980: 1 2 3 4: syntax error in expression (error token is "2 3 4") Avoid that by resetting the IFS to its default value, but also, replace said $() with arithmetic evaluation to avoid it altogether. Signed-off-by: Michal Berger <michalx.berger@intel.com> Change-Id: I4ab098319dfae3a5356eb4fe0dbf9f4af2d2eea6 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8013 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Karol Latecki <karol.latecki@intel.com> |
||
---|---|---|
.. | ||
config | ||
lib | ||
applications.sh | ||
autotest_common.sh | ||
skipped_build_files.txt | ||
skipped_tests.txt |