In case cwd is changed during the execution of given BASH_SOURCE, i.e., when the dirstack is mangled by calls to cd, the actual executable may end up missing from the path when run directly from its directory in the ./ fashion. Example: [root@fedora31 fuzz]# ./autofuzz.sh --module=vhost --transport=all autofuzz.sh cds into the $rootdir hence the BASH_SOURCE[i] in form of ./autofuzz.sh won't be found there, thus during a failure, since run under a debug tracer, nl will fail with -ENOENT while trying to read it. To mitigate, check if $src is available for reading, if not, log that the backtrace is not available. Change-Id: I68988350ba36cca8464bdfac437f662ed4c30f67 Signed-off-by: Michal Berger <michallinuxstuff@gmail.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/482694 Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Karol Latecki <karol.latecki@intel.com> |
||
---|---|---|
.. | ||
config | ||
lib | ||
autotest_common.sh | ||
skipped_build_files.txt | ||
skipped_tests.txt |