This is the mail archive of the
mailing list for the GDB project.
[binutils-gdb/gdb-8.3-branch] Testsuite: Ensure changing directory does not break the log file
- From: sergiodj+buildbot at sergiodj dot net
- To: gdb-testers at sourceware dot org
- Date: Wed, 06 Mar 2019 05:29:53 -0500
- Subject: [binutils-gdb/gdb-8.3-branch] Testsuite: Ensure changing directory does not break the log file
*** TEST RESULTS FOR COMMIT 9b068afad22bfa9386b21762c91eaddd8ef691b4 ***
Author: Alan Hayward <email@example.com>
Testsuite: Ensure changing directory does not break the log file
get_compiler_info switches to a new log file before checking the compiler
to ensure the checks are not logged. Afterwards it restores back to using
the original log file. However, the logfile uses a relative path name -
if the current test has changed the current directory then all further
output for the test will be lost. This can confuse the code that collates
the main gdb.log file at the end of a FORCE_PARALLEL run.
fullpath-expand.exp calls gdb_compile after changing the current directory.
The "Ensure stack protection is off for GCC" patch added a call to
get_compiler_info from inside of gdb_compile, causing log file collection
to break for FORCE_PARALLEL runs.
The ideal solution would be to ensure the log file is always created using
an absolute path name. However, this is set at multiple points in
Makefile.in and in some instances just relies on dejagnu common code to set
the log file directory to "."
The simpler and safer solution is to override the builtin cd function. The
new function checks the current log file and if the path is relative, then
it resets the logging using an absolute path. Finally it calls the builtin
cd. This ensures get_compiler_info (and any other code) can correctly
backup and restore the current log file.
* lib/gdb.exp (builtin_cd): rename of cd.
(cd): Override builtin.
- Failures on RHEL-s390x-m64, branch gdb-8.3-branch
- Failures on Debian-s390x-native-extended-gdbserver-m64, branch gdb-8.3-branch
- Failures on Debian-s390x-native-gdbserver-m64, branch gdb-8.3-branch
- Failures on Debian-s390x-m64, branch gdb-8.3-branch
- Failures on Fedora-x86_64-cc-with-index, branch gdb-8.3-branch
- Failures on Fedora-x86_64-native-extended-gdbserver-m32, branch gdb-8.3-branch
- Failures on Fedora-x86_64-native-extended-gdbserver-m64, branch gdb-8.3-branch
- Failures on Fedora-x86_64-native-gdbserver-m64, branch gdb-8.3-branch
- Failures on Fedora-x86_64-m32, branch gdb-8.3-branch
- Failures on Fedora-x86_64-native-gdbserver-m32, branch gdb-8.3-branch