diff options
author | Simon Marchi <simon.marchi@ericsson.com> | 2017-03-13 18:02:08 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@ericsson.com> | 2017-03-13 18:02:08 -0400 |
commit | 7978d7c385b072a344d969f71cdc68e1a1171ec2 (patch) | |
tree | 19eaf070a035c53c51b47363a7b76a065783b902 | |
parent | 896c0c1edee117ea333c66b1adac8c6f4def3f2b (diff) | |
download | gdb-7978d7c385b072a344d969f71cdc68e1a1171ec2.zip gdb-7978d7c385b072a344d969f71cdc68e1a1171ec2.tar.gz gdb-7978d7c385b072a344d969f71cdc68e1a1171ec2.tar.bz2 |
testsuite: Disable backslash_in_multi_line_command_test for old DejaGnus
I noticed that backslash_in_multi_line_command_test in
gdb.base/commands.exp failed on our RHEL6 servers. I traced it to the
old version of DejaGnu (1.4.4). I have found that instead of receiving
the expected:
"print \\\nargc\n"
gdb received:
"print argc\n"
thus breaking the test and its purpose. Versionof DejaGnu < 1.5 mess
up sending "\\\n", it somehow gets replaced with a space. I found that
the following commit in DejaGnu fixed the issue:
http://git.savannah.gnu.org/cgit/dejagnu.git/commit/lib/remote.exp?id=3f39294f5cd6802858838d3bcc0ccce847ae17f2
Even though the commit is almost 10 years old, the following release of
DejaGnu was only in 2013, which is why we still have systems with the
old code.
If the DejaGnu version is < 1.5, we just skip the test.
gdb/testsuite/ChangeLog:
* gdb.base/commands.exp (backslash_in_multi_line_command_test):
Skip for versions of DejaGnu < 1.5.
-rw-r--r-- | gdb/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/commands.exp | 11 |
2 files changed, 16 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 5f2624d..22aaafc 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2017-03-13 Simon Marchi <simon.marchi@ericsson.com> + * gdb.base/commands.exp (backslash_in_multi_line_command_test): + Skip for versions of DejaGnu < 1.5. + +2017-03-13 Simon Marchi <simon.marchi@ericsson.com> + * lib/gdb.exp (dejagnu_version): New proc. * gdb.threads/attach-many-short-lived-threads.exp (bad_dejagnu): Use dejagnu_version. diff --git a/gdb/testsuite/gdb.base/commands.exp b/gdb/testsuite/gdb.base/commands.exp index 6d3c398..4963743 100644 --- a/gdb/testsuite/gdb.base/commands.exp +++ b/gdb/testsuite/gdb.base/commands.exp @@ -1007,6 +1007,17 @@ proc_with_prefix redefine_backtrace_test {} { # while entering a multi-line command (in a secondary prompt). proc_with_prefix backslash_in_multi_line_command_test {} { + set dg_ver [dejagnu_version] + set dg_major [lindex $dg_ver 0] + set dg_minor [lindex $dg_ver 1] + + # With older versions of DejaGnu, the "\\\n" we send gets replaced with a + # space, thus breaking the test. Just skip it in that case. + if { $dg_major == 1 && $dg_minor < 5 } { + untested "dejagnu version is too old" + return + } + gdb_breakpoint "main" gdb_test_multiple "commands" "commands" { |