diff --git a/gdb-6.8.50.20090302-upstream.patch b/gdb-6.8.50.20090302-upstream.patch index 9265dce..513690d 100644 --- a/gdb-6.8.50.20090302-upstream.patch +++ b/gdb-6.8.50.20090302-upstream.patch @@ -614,3 +614,134 @@ gdb/testsuite/ + +gdb_breakpoint "fn_return" +gdb_continue_to_breakpoint "fn_return" ".*at-fn_return.*" + + + +[patch] testsuite: Fix multiple runs in parallel on a single host + +http://sourceware.org/ml/gdb-patches/2009-07/msg00008.html +http://sourceware.org/ml/gdb-cvs/2009-07/msg00051.html + +2009-07-06 Jan Kratochvil + + * lib/gdbserver-support.exp (gdbserver_start): Loop spawning + gdbserver increasing $portnum if "Can't bind address" has been seen. + +--- src/gdb/testsuite/lib/gdbserver-support.exp 2009/01/03 05:58:08 1.14 ++++ src/gdb/testsuite/lib/gdbserver-support.exp 2009/07/06 18:51:10 1.15 +@@ -209,26 +209,39 @@ + + set gdbserver [find_gdbserver] + +- # Export the host:port pair. +- set gdbport $debughost$portnum +- +- # Fire off the debug agent. +- set gdbserver_command "$gdbserver" +- if { $options != "" } { +- append gdbserver_command " $options" +- } +- append gdbserver_command " :$portnum" +- if { $arguments != "" } { +- append gdbserver_command " $arguments" +- } ++ # Loop till we find a free port. ++ while 1 { ++ # Export the host:port pair. ++ set gdbport $debughost$portnum ++ ++ # Fire off the debug agent. ++ set gdbserver_command "$gdbserver" ++ if { $options != "" } { ++ append gdbserver_command " $options" ++ } ++ append gdbserver_command " :$portnum" ++ if { $arguments != "" } { ++ append gdbserver_command " $arguments" ++ } + +- set server_spawn_id [remote_spawn target $gdbserver_command] ++ set server_spawn_id [remote_spawn target $gdbserver_command] + +- # Wait for the server to open its TCP socket, so that GDB can connect. +- expect { +- -i $server_spawn_id +- -notransfer +- -re "Listening on" { } ++ # Wait for the server to open its TCP socket, so that GDB can connect. ++ expect { ++ -i $server_spawn_id ++ -notransfer ++ -re "Listening on" { } ++ -re "Can't bind address: Address already in use\\.\r\n" { ++ verbose -log "Port $portnum is already in use." ++ if ![target_info exists gdb,socketport] { ++ # Bump the port number to avoid the conflict. ++ wait -i $expect_out(spawn_id) ++ incr portnum ++ continue ++ } ++ } ++ } ++ break + } + + # We can't just call close, because if gdbserver is local then that means + + + +http://sourceware.org/ml/gdb-cvs/2009-06/msg00203.html + +2009-06-30 Jan Kratochvil + + Remove racy FAILs relying just on the timeouts. + * gdb.base/setshow.exp (set annotate 2, show annotate (2)) + (annotation_level 2): Remove racy FAILs. + +--- src/gdb/testsuite/gdb.base/setshow.exp 2009/01/03 05:58:03 1.10 ++++ src/gdb/testsuite/gdb.base/setshow.exp 2009/06/30 18:28:12 1.11 +@@ -60,7 +60,6 @@ + gdb_expect { + -re ".*\032\032pre-prompt.*$gdb_prompt .*\032\032prompt.*$" \ + { pass "set annotate 2" } +- -re ".*$gdb_prompt $" { fail "set annotate 2" } + timeout { fail "(timeout) set annotate 2" } + } + +@@ -68,7 +67,6 @@ + gdb_expect { + -re ".*\032\032post-prompt.*Annotation_level is 2..*\032\032pre-prompt.*$gdb_prompt .*\032\032prompt.*$" \ + { pass "show annotate (2)" } +- -re ".*$gdb_prompt $" { fail "show annotate (2)" } + timeout { fail "(timeout) show annotate (2)" } + } + +@@ -77,7 +75,6 @@ + gdb_expect { + -re ".*\032\032post-prompt.*Line 1 of .* is at address .* but contains no code.*:1:0:beg:0x.*\032\032pre-prompt.*$gdb_prompt .*\032\032prompt.*$" \ + { pass "annotation_level 2" } +- -re ".*$gdb_prompt $" { fail "annotation_level 2" } + timeout { fail "(timeout) annotation_level 2" } + } + + + + +http://sourceware.org/ml/gdb-cvs/2009-06/msg00204.html + +2009-06-30 Jan Kratochvil + + * lib/mi-support.exp (mi_check_thread_states): Permit any output before + the expected result record. + +--- src/gdb/testsuite/lib/mi-support.exp 2009/05/28 01:09:20 1.84 ++++ src/gdb/testsuite/lib/mi-support.exp 2009/06/30 20:23:05 1.85 +@@ -1808,7 +1808,7 @@ + proc mi_check_thread_states { xstates test } { + global expect_out + set states [mi_reverse_list $xstates] +- set pattern "\\^done,threads=\\\[" ++ set pattern ".*\\^done,threads=\\\[" + foreach s $states { + set pattern "${pattern}(.*)state=\"$s\"" + } diff --git a/gdb.spec b/gdb.spec index edb24de..5332b36 100644 --- a/gdb.spec +++ b/gdb.spec @@ -1,6 +1,5 @@ # rpmbuild parameters: # --with testsuite: Run the testsuite (biarch if possible). Default is without. -# --with parallel: Run the testsuite in maximum parallel mode. # --with debug: Build without optimizations and without splitting the debuginfo. # --with upstream: No Fedora specific patches get applied. # --without python: No python support. @@ -15,7 +14,7 @@ Version: 6.8.50.20090302 # 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: 38%{?_with_upstream:.upstream}%{?dist} +Release: 39%{?_with_upstream:.upstream}%{?dist} License: GPLv3+ Group: Development/Debuggers @@ -756,20 +755,7 @@ gcc -o ./orphanripper %{SOURCE2} -Wall -lutil CHECK="$(echo $CHECK|sed 's#check//unix/[^ ]*#& &/-fPIE/-pie#g')" %endif # 0%{!?_with_upstream:1} -%if 0%{?_with_parallel:1} - for CURRENT in $CHECK - do - ./orphanripper make -k $CURRENT & - done - echo >&2 "Waiting for parallel testsuite runs to finish..." - wait - echo >&2 "Parallel testsuite runs finished." -%else # 0%{?_with_parallel:1} - for CURRENT in $CHECK - do - ./orphanripper make -k $CURRENT || : - done -%endif # 0%{?_with_parallel:1} + ./orphanripper make %{?_smp_mflags} -k $CHECK || : ) for t in sum log do @@ -895,6 +881,11 @@ fi %endif %changelog +* Mon Jul 6 2009 Jan Kratochvil - 6.8.50.20090302-39 +- testsuite: Fix multiple runs in parallel on a single host. +- testsuite: Remove the rpmbuild option: --with parallel +- testsuite: Run the testsuite with default rpm _smp_mflags. + * Mon Jul 6 2009 Jan Kratochvil - 6.8.50.20090302-38 - Archer update to the snapshot: 17bfc0488f54aeeb7a9e20ef3caa7e31e8e985fb - Archer backport: de9c5190034b84b0a5fb4b98b05b304cda187700