This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[commit] gdb.base/Makefile.in (EXECUTABLES): Add completion.


Hi.

I was seeing the following failures.

FAIL: gdb.base/completion.exp: complete target core ./gdb.base/completion
FAIL: gdb.base/completion.exp: complete target tfile ./gdb.base/completion
FAIL: gdb.base/completion.exp: complete target exec ./gdb.base/completion

A bit of head scratching and digging later, I found them due to
this bit of code in completion.exp:

foreach dir1 [ list "./gdb.base" "./outputs/gdb.base/completion" ] {
    if [remote_file host exists ${dir1}/completion] {
	foreach target_name ${targets} {
	    gdb_test "complete target ${target_name} ${dir1}/completion" \
		"target ${target_name} ${dir1}/completion.*${dir1}/completion0\\.o.*${dir1}/completion1\\.o.*"
	}
	break
    }
}

If you test completion.exp first in serial mode,
do a make clean in the testsuite directory,
and then run the test in parallel mode, that will trigger these
failures.

Either of these changes will fix the problem.
Applying both for completeness sake (heh).

Regression tested on amd64-linux and committed.

2014-05-16  Doug Evans  <dje@google.com>

	* gdb.base/Makefile.in (EXECUTABLES): Add completion.
	* gdb.base/completion.exp: Check that all expected files exist
	before doing file completion.

diff --git a/gdb/testsuite/gdb.base/Makefile.in b/gdb/testsuite/gdb.base/Makefile.in
index 828ec26..dda3169 100644
--- a/gdb/testsuite/gdb.base/Makefile.in
+++ b/gdb/testsuite/gdb.base/Makefile.in
@@ -8,7 +8,7 @@ EXECUTABLES = a2-run advance all-types annota1 annota1-watch_thread_num \
 	breakpoint-shadow break-on-linker-gcd-function \
 	call-ar-st call-rt-st call-sc-t* call-signals \
 	call-strs callexit callfuncs callfwmall charset checkpoint \
-	chng-syms code_elim1 code_elim2 commands compiler complex \
+	chng-syms code_elim1 code_elim2 commands compiler completion complex \
 	condbreak consecutive constvars coremaker cursal cvexpr \
 	dbx-test del disasm-end-cu display dprintf-pending dump dup-sect \
 	dup-sect.debug \
diff --git a/gdb/testsuite/gdb.base/completion.exp b/gdb/testsuite/gdb.base/completion.exp
index 1e152f6..2608309 100644
--- a/gdb/testsuite/gdb.base/completion.exp
+++ b/gdb/testsuite/gdb.base/completion.exp
@@ -110,7 +110,9 @@ gdb_test_multiple "target ctf" "" {
 # do the test on file completion.
 
 foreach dir1 [ list "./gdb.base" "./outputs/gdb.base/completion" ] {
-    if [remote_file host exists ${dir1}/completion] {
+    if { [remote_file host exists ${dir1}/completion]
+	 && [remote_file host exists ${dir1}/completion0.o]
+	 && [remote_file host exists ${dir1}/completion1.o] } {
 	foreach target_name ${targets} {
 	    gdb_test "complete target ${target_name} ${dir1}/completion" \
 		"target ${target_name} ${dir1}/completion.*${dir1}/completion0\\.o.*${dir1}/completion1\\.o.*"


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]