Fix false FAILs on too long base directory.
This commit is contained in:
parent
2116e53327
commit
4800a9bd4b
130
gdb-testsuite-longdirname.patch
Normal file
130
gdb-testsuite-longdirname.patch
Normal file
@ -0,0 +1,130 @@
|
||||
http://sourceware.org/ml/gdb-patches/2016-01/msg00146.html
|
||||
Subject: [testsuite patch] Fix false FAILs on too long base directory
|
||||
|
||||
|
||||
--r5Pyd7+fXNt84Ff3
|
||||
Content-Type: text/plain; charset=us-ascii
|
||||
Content-Disposition: inline
|
||||
|
||||
Hi,
|
||||
|
||||
I was getting
|
||||
|
||||
gu (print arg0)^M
|
||||
= 0x7fffffffdafb
|
||||
"/unsafebuild-x86_64-redhat-linux-gnu/gdb/testsuite.unix.-m64/outputs/gdb.guile/scm-value/scm-"...^M
|
||||
(gdb) FAIL: gdb.guile/scm-value.exp: verify dereferenced value
|
||||
python print (arg0)^M
|
||||
0x7fffffffdafd
|
||||
"/unsafebuild-x86_64-redhat-linux-gnu/gdb/testsuite.unix.-m64/outputs/gdb.python/py-value/py-v"...^M
|
||||
(gdb) FAIL: gdb.python/py-value.exp: verify dereferenced value
|
||||
|
||||
and also:
|
||||
|
||||
(gdb) p argv[0]^M
|
||||
$2 = 0x7fffffffd832 "/home/jkratoch/redhat/gdb-test-", 'x' <repeats 169
|
||||
times>...^M
|
||||
(gdb) FAIL: gdb.guile/scm-value.exp: argv[0] should be available on this
|
||||
target
|
||||
|
||||
OK for check-in?
|
||||
|
||||
|
||||
Thanks,
|
||||
Jan
|
||||
|
||||
--r5Pyd7+fXNt84Ff3
|
||||
Content-Type: text/plain; charset=us-ascii
|
||||
Content-Disposition: inline; filename="longdirname.patch"
|
||||
|
||||
gdb/testsuite/ChangeLog
|
||||
2016-01-08 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* gdb.guile/scm-value.exp (test_value_in_inferior): Set print elements
|
||||
and repeats to unlimited.
|
||||
* gdb.python/py-value.exp: Likewise.
|
||||
* lib/gdb.exp (gdb_has_argv0): Save and temporarily set print elements
|
||||
and repeats to unlimited.
|
||||
|
||||
diff --git a/gdb/testsuite/gdb.guile/scm-value.exp b/gdb/testsuite/gdb.guile/scm-value.exp
|
||||
index 8c858d5..1d07c9f 100644
|
||||
--- a/gdb/testsuite/gdb.guile/scm-value.exp
|
||||
+++ b/gdb/testsuite/gdb.guile/scm-value.exp
|
||||
@@ -91,6 +91,8 @@ proc test_value_in_inferior {} {
|
||||
global has_argv0
|
||||
set test "verify dereferenced value"
|
||||
if { $has_argv0 } {
|
||||
+ gdb_test_no_output "set print elements unlimited" ""
|
||||
+ gdb_test_no_output "set print repeats unlimited" ""
|
||||
gdb_test "gu (print arg0)" "0x.*$testfile\"" $test
|
||||
} else {
|
||||
unsupported $test
|
||||
diff --git a/gdb/testsuite/gdb.python/py-value.exp b/gdb/testsuite/gdb.python/py-value.exp
|
||||
index e60bd9e..a9dbe97 100644
|
||||
--- a/gdb/testsuite/gdb.python/py-value.exp
|
||||
+++ b/gdb/testsuite/gdb.python/py-value.exp
|
||||
@@ -226,6 +226,8 @@ proc test_value_in_inferior {} {
|
||||
global has_argv0
|
||||
set test "verify dereferenced value"
|
||||
if { $has_argv0 } {
|
||||
+ gdb_test_no_output "set print elements unlimited" ""
|
||||
+ gdb_test_no_output "set print repeats unlimited" ""
|
||||
gdb_test "python print (arg0)" "0x.*$testfile\"" $test
|
||||
} else {
|
||||
unsupported $test
|
||||
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
|
||||
index 015e202..52220d0 100644
|
||||
--- a/gdb/testsuite/lib/gdb.exp
|
||||
+++ b/gdb/testsuite/lib/gdb.exp
|
||||
@@ -4896,24 +4896,44 @@ gdb_caching_proc gdb_has_argv0 {
|
||||
}
|
||||
}
|
||||
|
||||
+ set old_elements "200"
|
||||
+ set test "show print elements"
|
||||
+ gdb_test_multiple $test $test {
|
||||
+ -re "Limit on string chars or array elements to print is (\[^\r\n\]+)\\.\r\n$gdb_prompt $" {
|
||||
+ set old_elements $expect_out(1,string)
|
||||
+ }
|
||||
+ }
|
||||
+ set old_repeats "200"
|
||||
+ set test "show print repeats"
|
||||
+ gdb_test_multiple $test $test {
|
||||
+ -re "Threshold for repeated print elements is (\[^\r\n\]+)\\.\r\n$gdb_prompt $" {
|
||||
+ set old_repeats $expect_out(1,string)
|
||||
+ }
|
||||
+ }
|
||||
+ gdb_test_no_output "set print elements unlimited" ""
|
||||
+ gdb_test_no_output "set print repeats unlimited" ""
|
||||
+
|
||||
+ set retval 0
|
||||
# Check whether argc is 1.
|
||||
gdb_test_multiple "p argc" "p argc" {
|
||||
-re " = 1\r\n${gdb_prompt} $" {
|
||||
|
||||
gdb_test_multiple "p argv\[0\]" "p argv\[0\]" {
|
||||
-re " = $hex \".*[file tail $exe]\"\r\n${gdb_prompt} $" {
|
||||
- return 1
|
||||
+ set retval 1
|
||||
}
|
||||
-re "${gdb_prompt} $" {
|
||||
- return 0
|
||||
}
|
||||
}
|
||||
}
|
||||
-re "${gdb_prompt} $" {
|
||||
- return 0
|
||||
}
|
||||
}
|
||||
- return 0
|
||||
+
|
||||
+ gdb_test_no_output "set print elements $old_elements" ""
|
||||
+ gdb_test_no_output "set print repeats $old_repeats" ""
|
||||
+
|
||||
+ return $retval
|
||||
}
|
||||
|
||||
set result [gdb_has_argv0_1 $exe]
|
||||
|
||||
--r5Pyd7+fXNt84Ff3--
|
||||
|
9
gdb.spec
9
gdb.spec
@ -27,7 +27,7 @@ Version: 7.10.50.%{snapsrc}
|
||||
|
||||
# The release always contains a leading reserved number, start it at 1.
|
||||
# `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing.
|
||||
Release: 34%{?dist}
|
||||
Release: 35%{?dist}
|
||||
|
||||
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and BSD and Public Domain and GFDL
|
||||
Group: Development/Debuggers
|
||||
@ -556,6 +556,9 @@ Patch1066: gdb-testsuite-foll-vfork.patch
|
||||
# Regression for gdb.threads/fork-plus-threads.exp - revert.
|
||||
Patch1067: gdb-fork-plus-threads-ascending-revert.patch
|
||||
|
||||
# Fix false FAILs on too long base directory.
|
||||
Patch1070: gdb-testsuite-longdirname.patch
|
||||
|
||||
%if 0%{!?rhel:1} || 0%{?rhel} > 6
|
||||
# RL_STATE_FEDORA_GDB would not be found for:
|
||||
# Patch642: gdb-readline62-ask-more-rh.patch
|
||||
@ -858,6 +861,7 @@ find -name "*.info*"|xargs rm -f
|
||||
%patch1065 -p1
|
||||
%patch1066 -p1
|
||||
%patch1067 -p1
|
||||
%patch1070 -p1
|
||||
|
||||
%patch848 -p1
|
||||
%if 0%{!?el6:1}
|
||||
@ -1373,6 +1377,9 @@ then
|
||||
fi
|
||||
|
||||
%changelog
|
||||
* Fri Jan 8 2016 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.10.50.20160106-35.fc24
|
||||
- Fix false FAILs on too long base directory.
|
||||
|
||||
* Fri Jan 8 2016 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.10.50.20160106-34.fc24
|
||||
- Rebase to FSF GDB 7.10.50.20160106 (trunk snapshot).
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user