public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Ian Lance Taylor <iant@google.com>
To: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [libgo] Use /usr/bin/pwd in os_test.TestStartProcess on Solaris (PR go/48502)
Date: Wed, 25 May 2011 08:48:00 -0000	[thread overview]
Message-ID: <mcripsze2zf.fsf@coign.corp.google.com> (raw)
In-Reply-To: <yddpqn9wwu4.fsf@manam.CeBiTec.Uni-Bielefeld.DE> (Rainer Orth's	message of "Mon, 23 May 2011 12:11:15 +0200")

[-- Attachment #1: Type: text/plain, Size: 446 bytes --]

Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> writes:

> As described in the PR, the go libgo test fails on Solaris since /bin is
> a symlink to /usr/bin.  Since there is other OS-specific code in
> os_test.go, I'm using the follwing patch to fix this.

I committed this patch instead, to the upstream library and to gccgo.
Let me know if it doesn't work.  Bootstrapped and ran Go testsuite on
x86_64-unknown-linux-gnu.  Committed to mainline.

Ian


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch --]
[-- Type: text/x-diff, Size: 511 bytes --]

diff -r f58704837aa1 libgo/go/os/os_test.go
--- a/libgo/go/os/os_test.go	Tue May 24 15:02:48 2011 -0700
+++ b/libgo/go/os/os_test.go	Tue May 24 22:54:38 2011 -0700
@@ -437,7 +437,8 @@
 	var b bytes.Buffer
 	io.Copy(&b, r)
 	output := b.String()
-	if output != expect {
+	// Accept /usr prefix because Solaris /bin is symlinked to /usr/bin.
+	if output != expect && output != "/usr"+expect {
 		t.Errorf("exec %q returned %q wanted %q",
 			strings.Join(append([]string{cmd}, args...), " "), output, expect)
 	}

      reply	other threads:[~2011-05-25  5:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-23 11:55 Rainer Orth
2011-05-25  8:48 ` Ian Lance Taylor [this message]

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=mcripsze2zf.fsf@coign.corp.google.com \
    --to=iant@google.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=ro@CeBiTec.Uni-Bielefeld.DE \
    /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).