From patchwork Sat Feb 2 15:40:18 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Lance Taylor X-Patchwork-Id: 217678 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 F29DA2C0086 for ; Sun, 3 Feb 2013 02:41:20 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1360424481; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: From:To:Subject:Date:Message-ID:User-Agent:MIME-Version: Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=xXUOAF+ Mjc2rq25lkGVJvKv+0HY=; b=KuIbwtFk8gMROolsMVB5F/DxAajlcmaCOFBu9gf 4TS92aV+6goBX5EngQuDRwKoNXStRsCk+qu2CaH5rjWVkhfwPt0muRfw3EWoOezf SXqgxt60U+srlJYceEzsZgbdupIWZ7xJ5LMeYmHvCJLj/oj23rKFVg7WBBljIV+K fdxw= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:X-Google-DKIM-Signature:X-Received:Received:From:To:Subject:Date:Message-ID:User-Agent:MIME-Version:Content-Type:X-Gm-Message-State:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=gjVyE+rFI4uHJffBShauxD28vuaWt2VovgcZdzMhfSGa40yEWL2+b7QKd57dXh TH4TORGA+eW7aRG/gq49XCHoozvmCGO/0gVEj0CiJ8EmtROGwbGc5QusiVzSRLih GmEwO8gKWXTEL+UijMfH1tSIQcXNBBHVREIssIWUMxRvo=; Received: (qmail 9766 invoked by alias); 2 Feb 2013 15:41:11 -0000 Received: (qmail 9666 invoked by uid 22791); 2 Feb 2013 15:41:09 -0000 X-SWARE-Spam-Status: No, hits=-5.4 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, KHOP_RCVD_TRUST, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE, RP_MATCHES_RCVD, T_TVD_MIME_NO_HEADERS X-Spam-Check-By: sourceware.org Received: from mail-pa0-f52.google.com (HELO mail-pa0-f52.google.com) (209.85.220.52) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 02 Feb 2013 15:40:21 +0000 Received: by mail-pa0-f52.google.com with SMTP id fb1so1272164pad.25 for ; Sat, 02 Feb 2013 07:40:21 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:subject:date:message-id:user-agent:mime-version :content-type:x-gm-message-state; bh=EpcD36Hm5Ia/RBPKHvWVDaq/Xhcdna1R7SWVe6U/qiM=; b=Tcv6cPdF/6baNdDkqy8yVzYeaosj6MbyD8T0H1OX2BIhej7sM3drljR/83p1NA+TPb jmPUBgwGAHjhkwKa4L/uq3P0KubG4in39m6rJPn94tGDLAfuAhuNWus5ZO8Edyzb5YGJ sHQM5M9Es4eYN8RC1CqoJZZW7biqSwCq17MvoaCX6KUqqYBHdhe8si4LPOKGctUAzEnQ IsQS9lgzuutu80eZ5rFcxmR+2ZVuiD/rARO9+2NXWCLOkmk8QHi5YONszZghIu7Tk+h2 2Boma5iIhAr847X3UqPf16cmqchAgewVZsm27vAdXnAoiButKKJ+v/+yTVLoTtRtYKm5 /WvA== X-Received: by 10.68.125.195 with SMTP id ms3mr41224865pbb.149.1359819621050; Sat, 02 Feb 2013 07:40:21 -0800 (PST) Received: from iant-glaptop.google.com ([172.19.252.162]) by mx.google.com with ESMTPS id rv8sm12005794pbc.27.2013.02.02.07.40.19 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sat, 02 Feb 2013 07:40:20 -0800 (PST) From: Ian Lance Taylor To: gcc-patches@gcc.gnu.org, gofrontend-dev@googlegroups.com Subject: libgo patch committed: Only run syscall creds_test on GNU/Linux Date: Sat, 02 Feb 2013 07:40:18 -0800 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 X-Gm-Message-State: ALoCoQmHxcc/jHTjuc9C5x+ZSVBSXgrSwrDwS27Vfs50Era/v7Z+6byF3QoogelJsLfYPoikR9ZyWnNBAxDtxdzkPKT+uCEUewmcT7fBrtGRr3+9PUi5/koTmyPu3leOibtc0Bg6TqBVcOSC2DtxjA3wmbubH22QjhYJiNVKhhTRoce05dfhyDtCM2hfam+mFEc3uVjCK1OB 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 PR 56171 points out that the syscall/creds_test.go test fails on Solaris. In fact that test is only intended to be run on GNU/Linux anyhow. Solaris supports a similar mechanism, but it works differently. This patch changes the libgo Makefile to let packages specify the list of tests to run, and corrects the existing support in the gotest shell script to use that list correctly. Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu. Committed to mainline. Ian diff -r a20ef2465f30 libgo/Makefile.am --- a/libgo/Makefile.am Sat Feb 02 07:10:22 2013 -0800 +++ b/libgo/Makefile.am Sat Feb 02 07:29:12 2013 -0800 @@ -1696,6 +1696,13 @@ syscall_utimesnano_file = go/syscall/libcall_posix_utimesnano.go endif +# Test files. +if LIBGO_IS_LINUX +syscall_creds_test_file = go/syscall/creds_test.go +else +syscall_creds_test_file = +endif + go_base_syscall_files = \ go/syscall/env_unix.go \ go/syscall/syscall_errno.go \ @@ -1734,6 +1741,10 @@ go/syscall/signame.c \ $(syscall_wait_c_file) +go_syscall_test_files = \ + $(syscall_creds_test_file) \ + go/syscall/passfd_test.go + libcalls.go: s-libcalls; @true s-libcalls: Makefile go/syscall/mksyscall.awk $(go_base_syscall_files) rm -f libcalls.go.tmp @@ -2005,9 +2016,9 @@ $(MKDIR_P) $(@D); \ rm -f $@-testsum $@-testlog; \ if test "$(use_dejagnu)" = "yes"; then \ - $(SHELL) $(srcdir)/testsuite/gotest --dejagnu=yes --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --pkgpath="$(@D)" --pkgfiles="$(go_$(subst /,_,$(@D))_files)" --testname="$(@D)" --goarch="$(GOARCH)" $(GOTESTFLAGS); \ + $(SHELL) $(srcdir)/testsuite/gotest --dejagnu=yes --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --pkgpath="$(@D)" --pkgfiles="$(go_$(subst /,_,$(@D))_files)" --testname="$(@D)" --goarch="$(GOARCH)" $(GOTESTFLAGS) $(go_$(subst /,_,$(@D))_test_files); \ else \ - if $(SHELL) $(srcdir)/testsuite/gotest --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --pkgpath="$(@D)" --pkgfiles="$(go_$(subst /,_,$(@D))_files)" --goarch="$(GOARCH)" $(GOTESTFLAGS) >>$@-testlog 2>&1; then \ + if $(SHELL) $(srcdir)/testsuite/gotest --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --pkgpath="$(@D)" --pkgfiles="$(go_$(subst /,_,$(@D))_files)" --goarch="$(GOARCH)" $(GOTESTFLAGS) $(go_$(subst /,_,$(@D))_test_files) >>$@-testlog 2>&1; then \ echo "PASS: $(@D)" >> $@-testlog; \ echo "PASS: $(@D)"; \ echo "PASS: $(@D)" > $@-testsum; \ diff -r a20ef2465f30 libgo/testsuite/gotest --- a/libgo/testsuite/gotest Sat Feb 02 07:10:22 2013 -0800 +++ b/libgo/testsuite/gotest Sat Feb 02 07:29:12 2013 -0800 @@ -259,12 +259,20 @@ case "x$gofiles" in x) gofiles=`ls *_test.go 2>/dev/null` + ;; +*) + xgofiles=$gofiles + gofiles= + for f in $xgofiles; do + gofiles="$gofiles `basename $f`" + done esac case "x$gofiles" in x) echo 'no test files found' 1>&2 exit 1 + ;; esac # Run any commands given in sources, like @@ -295,6 +303,7 @@ # Split $gofiles into external gofiles (those in *_test packages) # and internal ones (those in the main package). +xgofiles= for f in $gofiles; do package=`grep '^package[ ]' $f | sed 1q` case "$package" in