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]

Re: [patch] [testsuite] Fix running in-src-dir in the same directory twice


Jan Kratochvil writes:
 > Hi,
 > 
 > ./configure; make; cd gdb; make check; make check
 > ->
 > Running ./gdb.base/argv0-symlink-dirlink/a2-run.exp ...
 > Running ./gdb.base/argv0-symlink-dirlink/advance.exp ...
 > Running ./gdb.base/argv0-symlink-dirlink/argv0-symlink-dirlink/a2-run.exp ...
 > Running ./gdb.base/argv0-symlink-dirlink/argv0-symlink-dirlink/advance.exp ...
 > Running ./gdb.base/argv0-symlink-dirlink/argv0-symlink-dirlink/argv0-symlink-dirlink/argv0-symlink-dirlink/argv0-symlink-dirlink/argv0-symlink-dirlink/argv0-symlink-dirlink/argv0-symlink-dirlink/argv0-symlink-dirlink/argv0-symlink-dirlink/argv0-symlink-dirlink/argv0-symlink-dirlink/argv0-symlink-dirlink/argv0-symlink-dirlink/argv0-symlink-dirlink/argv0-symlink-dirlink/argv0-symlink-dirlink/argv0-symlink-dirlink/argv0-symlink-dirlink/argv0-symlink-dirlink/argv0-symlink-dirlink/argv0-symlink-dirlink/argv0-symlink-dirlink/argv0-symlink-dirlink/argv0-symlink-dirlink/argv0-symlink-dirlink/argv0-symlink-dirlink/argv0-symlink-dirlink/argv0-symlink-dirlink/argv0-symlink-dirlink/argv0-symlink-dirlink/argv0-symlink-dirlink/argv0-symlink-dirlink/argv0-symlink-dirlink/argv0-symlink-dirlink/argv0-symlink-dirlink/argv0-symlink-dirlink/argv0-symlink-dirlink/argv0-symlink-dirlink/argv0-symlink-dirlink/double-prompt-target-event-error.exp ...
 > 
 > particularly I was testing it with:
 > cp -a testsuite/ testsuite-clean;make -C testsuite/ -k -j1 check;cp -a testsuite/ testsuite-pass1;make -C testsuite/ -k -j1 check;cp -a testsuite/ testsuite-pass2
 > 
 > (The second run still has many FAILs due to deleted source files but that is
 > a different patch going to be posted.)
 > 
 > 
 > Thanks,
 > Jan
 > gdb/testsuite/
 > 2014-08-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
 > 
 > 	Fix running in-src-dir testsuite in the same directory twice.
 > 	* gdb.base/argv0-symlink.exp: Delete $dirlink.
 > 
 > diff --git a/gdb/testsuite/gdb.base/argv0-symlink.exp b/gdb/testsuite/gdb.base/argv0-symlink.exp
 > index d849b4c..39aab9c 100644
 > --- a/gdb/testsuite/gdb.base/argv0-symlink.exp
 > +++ b/gdb/testsuite/gdb.base/argv0-symlink.exp
 > @@ -59,6 +59,7 @@ set dirlink "${testfile}-dirlink"
 >  remote_exec host "rm -f [standard_output_file $dirlink]"
 >  set status [remote_exec host "ln -sf . [standard_output_file $dirlink]"]
 >  if {[lindex $status 0] != 0} {
 > +    remote_exec host "rm -f [standard_output_file $dirlink]"
 >      unsupported "$test (host does not support symbolic links)"
 >      return 0
 >  }
 > @@ -66,6 +67,7 @@ if {[lindex $status 0] != 0} {
 >  clean_restart "$dirlink/$filelink"
 >  
 >  if ![runto_main] {
 > +    remote_exec host "rm -f [standard_output_file $dirlink]"
 >      untested "could not run to main"
 >      return -1
 >  }
 > @@ -79,3 +81,8 @@ if ![is_remote target] {
 >  }
 >  gdb_test {print argv[0]} "/$dirlink/$filelink\"" $test
 >  gdb_test "info inferiors" "/$lastdir/$filelink *" "$test for info inferiors"
 > +
 > +# Stale directory symlink would deadlock runtest:
 > +# Running ./gdb.base/argv0-symlink-dirlink/a2-run.exp ...
 > +# Running ./gdb.base/argv0-symlink-dirlink/argv0-symlink-dirlink/a2-run.exp ...
 > +remote_exec host "rm -f [standard_output_file $dirlink]"

Tests can prematurely terminate for various unanticipatable reasons.
Can this be solved by making sure any possibly hazardous left
over files are cleaned up at start?


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