public inbox for gdb-testers@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] [gdb/testsuite] Fix tcl error in cached_file
@ 2020-03-18 20:59 gdb-buildbot
  2020-03-18 20:59 ` Failures on Fedora-x86_64-cc-with-index, branch master gdb-buildbot
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: gdb-buildbot @ 2020-03-18 20:59 UTC (permalink / raw)
  To: gdb-testers

*** TEST RESULTS FOR COMMIT 0ba678c9ae62c20bb7f2370f51a4e9f1c8f2f409 ***

commit 0ba678c9ae62c20bb7f2370f51a4e9f1c8f2f409
Author:     Tom de Vries <tdevries@suse.de>
AuthorDate: Mon Mar 9 15:32:54 2020 +0100
Commit:     Tom de Vries <tdevries@suse.de>
CommitDate: Mon Mar 9 15:32:54 2020 +0100

    [gdb/testsuite] Fix tcl error in cached_file
    
    When trying to run tests using target board cc-with-dwz after a clean build, I
    run into:
    ...
    ERROR: tcl error sourcing board description file for target cc-with-tweaks.exp.
    couldn't open "build/gdb/testsuite/cache/gdb.sh.17028": \
      no such file or directory
    couldn't open "build/gdb/testsuite/cache/gdb.sh.17028": \
      no such file or directory
        while executing
    "open $tmp_filename w"
        (procedure "cached_file" line 9)
        invoked from within
    "cached_file gdb.sh "$GDB $INTERNAL_GDBFLAGS $GDBFLAGS \"\$@\"" 1"
    ...
    
    The problem is that cached_file is trying to create a file
    build/gdb/testsuite/cache/gdb.sh.17028 in a non-existing directory.
    
    Fix this by creating the cache dir in cached_file.
    
    Tested on x86_64-linux, with target board cc-with-tweaks, and native.
    
    gdb/testsuite/ChangeLog:
    
    2020-03-09  Tom de Vries  <tdevries@suse.de>
    
            * lib/gdb.exp (cached_file): Create cache dir.

diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index c3dda74cc8..f9e0c201c1 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2020-03-09  Tom de Vries  <tdevries@suse.de>
+
+	* lib/gdb.exp (cached_file): Create cache dir.
+
 2020-03-07  Tom de Vries  <tdevries@suse.de>
 
 	* gdb.cp/ref-params.exp: Compare build_executable result with -1.
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 55e58584c8..9614e8dc87 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -4958,6 +4958,9 @@ proc cached_file { filename txt {executable 0}} {
 	return $filename
     }
 
+    set dir [file dirname $filename]
+    file mkdir $dir
+
     set tmp_filename $filename.[pid]
     set fd [open $tmp_filename w]
     puts $fd $txt


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-03-22  2:08 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-18 20:59 [binutils-gdb] [gdb/testsuite] Fix tcl error in cached_file gdb-buildbot
2020-03-18 20:59 ` Failures on Fedora-x86_64-cc-with-index, branch master gdb-buildbot
2020-03-18 21:06 ` Failures on Fedora-i686, " gdb-buildbot
2020-03-18 21:54 ` Failures on Fedora-x86_64-m64, " gdb-buildbot
2020-03-18 22:09 ` Failures on Fedora-x86_64-native-extended-gdbserver-m32, " gdb-buildbot
2020-03-18 22:52 ` Failures on Fedora-x86_64-native-extended-gdbserver-m64, " gdb-buildbot
2020-03-21  7:55 ` Failures on Fedora-x86_64-native-gdbserver-m64, " gdb-buildbot
2020-03-21 15:06 ` Failures on Ubuntu-Aarch64-native-extended-gdbserver-m64, " gdb-buildbot
2020-03-22  2:08 ` Failures on Fedora-x86_64-native-gdbserver-m32, " gdb-buildbot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).