From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31177 invoked by alias); 25 Oct 2013 20:21:20 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 31119 invoked by uid 89); 25 Oct 2013 20:21:20 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.5 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 25 Oct 2013 20:21:19 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r9PKLIkn019074 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 25 Oct 2013 16:21:18 -0400 Received: from barimba.redhat.com (ovpn-113-54.phx2.redhat.com [10.3.113.54]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r9PKLAJd000870; Fri, 25 Oct 2013 16:21:17 -0400 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH v3 14/17] fix argv0-symlink.exp for parallel mode Date: Fri, 25 Oct 2013 20:21:00 -0000 Message-Id: <1382732464-28121-15-git-send-email-tromey@redhat.com> In-Reply-To: <1382732464-28121-1-git-send-email-tromey@redhat.com> References: <1382732464-28121-1-git-send-email-tromey@redhat.com> X-SW-Source: 2013-10/txt/msg00822.txt.bz2 argv0-symlink.exp doesn't work properly if standard_output_file puts files into a per-test subdirectory. That's because it assumes that files appear in $subdir, which is no longer true. This patch fixes the problem by computing the correct directory at runtime. Tested both with and without GDB_PARALLEL on x86-64 Fedora 18. ~ChangeLog~ 2013-10-24 Tom Tromey * gdb.base/argv0-symlink.exp: Compute executable's directory dynamically. --- gdb/testsuite/ChangeLog | 5 +++++ gdb/testsuite/gdb.base/argv0-symlink.exp | 11 +++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/gdb.base/argv0-symlink.exp b/gdb/testsuite/gdb.base/argv0-symlink.exp index cf5785c..e4efe19 100644 --- a/gdb/testsuite/gdb.base/argv0-symlink.exp +++ b/gdb/testsuite/gdb.base/argv0-symlink.exp @@ -37,7 +37,14 @@ if ![runto_main] { } gdb_test {print argv[0]} "/$filelink\"" $test -gdb_test "info inferiors" "/$subdir/$filelink *" "$test for info inferiors" + +# For a link named /PATH/TO/DIR/LINK, we want to check the output +# against "/DIR/LINK", but computed in a way that doesn't make +# assumptions about the test directory layout. +set full_filelink [standard_output_file $filelink] +set lastdir [file tail [file dirname $full_filelink]] + +gdb_test "info inferiors" "/$lastdir/$filelink *" "$test for info inferiors" set test "kept directory symbolic link name" @@ -65,4 +72,4 @@ if ![is_remote target] { setup_kfail "*-*-*" gdb/15934 } gdb_test {print argv[0]} "/$dirlink/$filelink\"" $test -gdb_test "info inferiors" "/$subdir/$filelink *" "$test for info inferiors" +gdb_test "info inferiors" "/$lastdir/$filelink *" "$test for info inferiors" -- 1.8.1.4