From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 98259 invoked by alias); 19 May 2017 15:47:42 -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 98191 invoked by uid 89); 19 May 2017 15:47:41 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=H*RU:sk:static., Hx-spam-relays-external:sk:static., H*r:sk:clients, H*r:sk:static. X-HELO: mail-yw0-f182.google.com Received: from mail-yw0-f182.google.com (HELO mail-yw0-f182.google.com) (209.85.161.182) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 19 May 2017 15:47:40 +0000 Received: by mail-yw0-f182.google.com with SMTP id b68so36606275ywe.3 for ; Fri, 19 May 2017 08:47:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=5qB+BqkKukUwnph60JabZUKv2Qn3VS2Sgl/OUYt01qw=; b=CqZSl/pwC7i4cn/H7Ukw5RMMtoHjwN8q/j/rNtnbduSlqnI88eI272z4IT6L9eShpP EIe5DXe5dXizNSf/Xf1rOP4J840ZPgTPfMovd8q/4onH4QgtNNYOPdH3OWUB5DdMO05j 01faYxP6Ou8eeWWcwcyhFZOvees+a+53XHzLFmMpaezsL/Ro3pdNUvTYL+GL9EAM+DZ+ bULp2Fr0xipJulYm9zskSsUTMfFiclJ1yPtHQbgMPbtmszAWKHeH+7DRR9MwFP4iH/0M NsdpdzttcbJ38HRazoARyCjk/8OKw26PXqMlTwclvEBO9ppOLs1nBQDirtk/LNStysm6 fYgQ== X-Gm-Message-State: AODbwcA7C1VxeeXX6ZuEct+ptcknjByBX/Au/kiMN5yUqIIXy980NlX4 LfYhwjdTDc1Kmw== X-Received: by 10.129.115.212 with SMTP id o203mr9185921ywc.137.1495208862067; Fri, 19 May 2017 08:47:42 -0700 (PDT) Received: from E107787-LIN (static.42.136.251.148.clients.your-server.de. [148.251.136.42]) by smtp.gmail.com with ESMTPSA id k133sm3681479ywe.64.2017.05.19.08.47.40 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Fri, 19 May 2017 08:47:41 -0700 (PDT) From: Yao Qi To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: [RFC 2/7] Add unit test to builtin tdesc generated by xml References: <1494518105-15412-1-git-send-email-yao.qi@linaro.org> <1494518105-15412-3-git-send-email-yao.qi@linaro.org> <692db623-3694-b809-4075-293c0d70cf5e@redhat.com> <86bmqq8p8h.fsf@gmail.com> <2590c996-7d14-07d5-9b0a-21ebaf9dc10b@redhat.com> Date: Fri, 19 May 2017 15:47:00 -0000 In-Reply-To: <2590c996-7d14-07d5-9b0a-21ebaf9dc10b@redhat.com> (Pedro Alves's message of "Thu, 18 May 2017 12:34:03 +0100") Message-ID: <864lwgzw4k.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2017-05/txt/msg00455.txt.bz2 Pedro Alves writes: > Not sure -- does it work in remote host testing scenarios? It doesn't work in remote host. > Recall that unit testing is invoked by the normal testsuite, from > gdb.gdb/unittest.exp. > > An alternative would be to add a specific command to run these tests, > which would take the path as argument, like > "maint check xml-descriptions /path/to/features/", and then run that > from gdb.gdb/unittest.exp. It is difficult to get it working for remote host either, because we need to copy all features/*.xml to the remote host. Can we just skip this unit test if it can't find "features" directory? std::string feature_dir (ldirname (__FILE__)); struct stat st; /* Look for the features directory. If the directory of __FILE__ can't be found, __FILE__ is a file name with relative path. Guess that GDB is executed in testsuite directory like ../gdb, because I don't expect that GDB is invoked somewhere else and run self tests. */ if (stat (feature_dir.data (), &st) < 0) { feature_dir.insert (0, SLASH_STRING); feature_dir.insert (0, ".."); /* If still can't find the path, skip it. */ return; } --=20 Yao (=E9=BD=90=E5=B0=A7)