Fix false argv0-symlink.exp FAIL running under a very long directory name

Starting program: /home/jkratoch/redhat/gdb-test-fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff/gdb/testsuite/gdb.base/argv0-symlink-filelink ^M
[...]
(gdb) print argv[0]^M
$1 = 0x7fffffffda39 "/home/jkratoch/redhat/gdb-test-", 'f' <repeats 169 times>...^M
(gdb) FAIL: gdb.base/argv0-symlink.exp: kept file symbolic link name

after "set print repeats 10000":

print argv[0]^M
$1 = 0x7fffffffda39 "/home/jkratoch/redhat/gdb-test-fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"...^M
(gdb) FAIL: gdb.base/argv0-symlink.exp: kept file symbolic link name

after "set print elements 10000":

print argv[0]^M
$1 = 0x7fffffffda39 "/home/jkratoch/redhat/gdb-test-fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff/gdb/testsuite/gdb.base/argv0-symlink-filelink"^M
(gdb) PASS: gdb.base/argv0-symlink.exp: kept file symbolic link name

gdb/testsuite/
2014-07-11  Jan Kratochvil  <jan.kratochvil@redhat.com>

	Fix false FAIL running under a very long directory name.
	* gdb.base/argv0-symlink.exp: Add "set print repeats 10000"
	and "set print elements 10000".  Twice.
This commit is contained in:
Jan Kratochvil 2014-07-11 17:26:42 +02:00
parent 17ca87fc69
commit 218c265560
2 changed files with 12 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2014-07-11 Jan Kratochvil <jan.kratochvil@redhat.com>
Fix false FAIL running under a very long directory name.
* gdb.base/argv0-symlink.exp: Add "set print repeats 10000"
and "set print elements 10000". Twice.
2014-07-11 Yao Qi <yao@codesourcery.com>
* gdb.base/exprs.exp: "set print symbol off".

View File

@ -36,6 +36,9 @@ if ![runto_main] {
return -1
}
gdb_test_no_output "set print repeats 10000"
gdb_test_no_output "set print elements 10000"
gdb_test {print argv[0]} "/$filelink\"" $test
# For a link named /PATH/TO/DIR/LINK, we want to check the output
@ -67,6 +70,9 @@ if ![runto_main] {
return -1
}
gdb_test_no_output "set print repeats 10000"
gdb_test_no_output "set print elements 10000"
# gdbserver does not have this issue.
if ![is_remote target] {
setup_kfail "*-*-*" gdb/15934