From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: gdb-patches@sourceware.org
Subject: [patch] [testsuite] Fix running in-src-dir in the same directory twice
Date: Thu, 28 Aug 2014 21:10:00 -0000 [thread overview]
Message-ID: <20140828211010.GA4960@host2.jankratochvil.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 1599 bytes --]
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
[-- Attachment #2: dirlink.patch --]
[-- Type: text/plain, Size: 1420 bytes --]
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]"
next reply other threads:[~2014-08-28 21:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-28 21:10 Jan Kratochvil [this message]
2014-08-29 12:38 ` Doug Evans
2014-08-29 12:49 ` Jan Kratochvil
2014-08-29 13:13 ` Jan Kratochvil
2014-08-29 21:10 ` [patchv2] " Jan Kratochvil
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140828211010.GA4960@host2.jankratochvil.net \
--to=jan.kratochvil@redhat.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox