public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: binutils@sourceware.org
Subject: [PATCH] ld: fix ld-elf/linux-x86.exp for r/o source tree
Date: Tue, 2 Jun 2020 09:12:45 +0200	[thread overview]
Message-ID: <388e9087-6ff8-0e63-b476-52e6bd55989d@suse.com> (raw)

Since the copying ofthe individual files gets done more than once, make
sure the destinations can be copied to on subsequent copying attempts.

ld/
2020-06-XX  Jan Beulich  <jbeulich@suse.com>

	* testsuite/ld-elf/linux-x86.exp: Make copied source files
	writeable.

---
An alternative would be to "rm -f" the destinations up front; there are
surely further alternatives. Not sure which one's the most portable one.
---
I'd like to point out that, with the issue here fixed and on an oldish
system, several of the subcases of this test fail for me with
"compilation failed", and four subcases actually fail their run tests.
I didn't have the time to look into those, yet.

--- a/ld/testsuite/ld-elf/linux-x86.exp
+++ b/ld/testsuite/ld-elf/linux-x86.exp
@@ -134,6 +134,7 @@ proc check_pr25749a {testname srcfilea s
     }
 
     exec cp $srcdir/$subdir/$srcfilea $srcfilea
+    exec chmod +w $srcfilea
     set pr25749_bin "$objcopy -B $output_arch -I binary -O $output_target $srcfilea tmpdir/pr25749-bin.o"
     send_log "$pr25749_bin\n"
     set got [remote_exec host "$pr25749_bin"]
@@ -237,6 +238,7 @@ proc check_pr25749b {testname srcfilea s
     }
 
     exec cp $srcdir/$subdir/$srcfilea $srcfilea
+    exec chmod +w $srcfilea
     set pr25749_bin "$objcopy -B $output_arch -I binary -O $output_target $srcfilea tmpdir/pr25749-bin.o"
     send_log "$pr25749_bin\n"
     set got [remote_exec host "$pr25749_bin"]

             reply	other threads:[~2020-06-02  7:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-02  7:12 Jan Beulich [this message]
2020-06-02 11:14 ` H.J. Lu

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=388e9087-6ff8-0e63-b476-52e6bd55989d@suse.com \
    --to=jbeulich@suse.com \
    --cc=binutils@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).