From patchwork Mon May 23 10:11:15 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rainer Orth X-Patchwork-Id: 96930 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 5949DB6EDF for ; Mon, 23 May 2011 20:11:35 +1000 (EST) Received: (qmail 17056 invoked by alias); 23 May 2011 10:11:33 -0000 Received: (qmail 17048 invoked by uid 22791); 23 May 2011 10:11:32 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from snape.CeBiTec.Uni-Bielefeld.DE (HELO smtp-relay.CeBiTec.Uni-Bielefeld.DE) (129.70.160.84) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 23 May 2011 10:11:19 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 604323DC; Mon, 23 May 2011 12:11:18 +0200 (CEST) Received: from smtp-relay.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (malfoy.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) (amavisd-new, port 10024) with LMTP id fIVnfdgiZW7B; Mon, 23 May 2011 12:11:17 +0200 (CEST) Received: from manam.CeBiTec.Uni-Bielefeld.DE (manam.CeBiTec.Uni-Bielefeld.DE [129.70.161.120]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPS id CFABC3DB; Mon, 23 May 2011 12:11:16 +0200 (CEST) Received: (from ro@localhost) by manam.CeBiTec.Uni-Bielefeld.DE (8.14.4+Sun/8.14.4/Submit) id p4NABFRI015417; Mon, 23 May 2011 12:11:15 +0200 (MEST) From: Rainer Orth To: gcc-patches@gcc.gnu.org Cc: Ian Lance Taylor Subject: [libgo] Use /usr/bin/pwd in os_test.TestStartProcess on Solaris (PR go/48502) Date: Mon, 23 May 2011 12:11:15 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (usg-unix-v) MIME-Version: 1.0 X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org 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. With that patch, libgo test results on i386-pc-solaris2.11 are clean. Rainer 2011-05-20 Rainer Orth PR go/48502 * go/os/os_test.go (TestStartProcess): Use /usr/bin/pwd on Solaris. diff --git a/libgo/go/os/os_test.go b/libgo/go/os/os_test.go --- a/libgo/go/os/os_test.go +++ b/libgo/go/os/os_test.go @@ -440,7 +440,12 @@ func TestStartProcess(t *testing.T) { args = []string{"/c", "cd"} } else { le = "\n" - cmd = "/bin/pwd" + // /bin is a symlink to /usr/bin on Solaris. + if syscall.OS == "solaris" { + cmd = "/usr/bin/pwd" + } else { + cmd = "/bin/pwd" + } dir = "/" args = []string{} }