From patchwork Thu Jul 23 11:20:40 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pedro Alves X-Patchwork-Id: 7812 Received: (qmail 76465 invoked by alias); 23 Jul 2015 11:20:47 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 76453 invoked by uid 89); 23 Jul 2015 11:20:46 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD, SPF_HELO_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 (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 23 Jul 2015 11:20:44 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 9ED8B37C80E; Thu, 23 Jul 2015 11:20:43 +0000 (UTC) Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t6NBKflI002034; Thu, 23 Jul 2015 07:20:42 -0400 Message-ID: <55B0CE08.6000502@redhat.com> Date: Thu, 23 Jul 2015 12:20:40 +0100 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Simon Marchi , Brendan Kirby , Sergio Durigan Junior CC: Simon Marchi , gdb-patches@sourceware.org Subject: Re: MIPS build slave References: <55A9E3F5.3090902@imgtec.com> <87fv4kswuh.fsf@redhat.com> <55AD543B.5010301@imgtec.com> <87fv4iczgm.fsf@redhat.com> <55AD8A7F.3080009@imgtec.com> <877fpu9xjh.fsf@redhat.com> <55ADA56A.5090301@imgtec.com> <87380i9li6.fsf@redhat.com> <55AE5DD9.90504@ericsson.com> <55AE7581.9070507@imgtec.com> <55AE7674.20406@ericsson.com> <55AE7F96.4000107@imgtec.com> <55AE84AB.6080807@ericsson.com> In-Reply-To: <55AE84AB.6080807@ericsson.com> On 07/21/2015 06:43 PM, Simon Marchi wrote: > On 15-07-21 01:21 PM, Brendan Kirby wrote: >> I overrode the SHELL variable in the Buildbot systemd service I wrote to >> start it. >> >> Brendan > > Ok thanks, I added a little warning in the wiki: > > > /!\ It has been reported that the tests won't run properly if the SHELL variable is not > set to a valid shell (e.g. /sbin/nologin instead of /bin/bash). Make sure that the > user running the buildslave has a valid shell or override the SHELL environment > variable somehow. You always need a valid SHELL set. Not just for the testsuite, but for gdb itself: gdb starts programs with the shell for argument globbing, variable expansion ("run *", "run $foo", etc), and redirection ("run 1>foo.txt", etc.), unless you disable all that with "set startup-with-shell off". $ SHELL=/foo gdb /usr/bin/sleep ... (gdb) r Starting program: /usr/bin/sleep Cannot exec /usr/bin/sleep -c exec /usr/bin/sleep . Error: No such file or directory During startup program exited with code 127. (gdb) As you found, that's a bogus error message. It should have been: (gdb) r Starting program: /usr/bin/sleep Cannot exec /foo -c exec /usr/bin/sleep . Error: No such file or directory During startup program exited with code 127. (gdb) This patchlet fixes that: From 767ecf74811b010c47a0721306beae1979141c61 Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Thu, 23 Jul 2015 12:10:18 +0100 Subject: [PATCH] fix exec error message --- gdb/fork-child.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/fork-child.c b/gdb/fork-child.c index 66c07fb..4ba62b0 100644 --- a/gdb/fork-child.c +++ b/gdb/fork-child.c @@ -365,7 +365,7 @@ fork_inferior (char *exec_file_arg, char *allargs, char **env, /* If we get here, it's an error. */ save_errno = errno; - fprintf_unfiltered (gdb_stderr, "Cannot exec %s", exec_file); + fprintf_unfiltered (gdb_stderr, "Cannot exec %s", argv[0]); for (i = 1; argv[i] != NULL; i++) fprintf_unfiltered (gdb_stderr, " %s", argv[i]); fprintf_unfiltered (gdb_stderr, ".\n");