From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 78056 invoked by alias); 12 Jan 2017 17:03:33 -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 77849 invoked by uid 89); 12 Jan 2017 17:03:32 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: =?ISO-8859-1?Q?No, score=-1.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy==e5=b0=a7, H*r:AES128-SHA, H*i:sk:7d906c4, H*f:sk:7d906c4?= X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-lf0-f67.google.com Received: from mail-lf0-f67.google.com (HELO mail-lf0-f67.google.com) (209.85.215.67) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 12 Jan 2017 17:03:22 +0000 Received: by mail-lf0-f67.google.com with SMTP id q89so2747984lfi.1; Thu, 12 Jan 2017 09:03:21 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=bfIE1tD5+O6V6vthaGLotmJma6FQqi2S3aoGjaynCns=; b=GoqSC7MeMcjSwSeBKu0l0fHh22ix9qAyTiT45zliP1biCVqUT47NqvRHD9EOwkeqYV zNS8YbA6lZ+997bpYg6jd5yfDw9RnVvq7OQDUGV0dBTa10+XnBLZij2mPPuQ73vOSPSv 5by6KWEF8ppnqnaoO8AmN0QwEjKpkVipqXHmCovDsWfklnvXcCaXAdfWrP1tljCnXURT LGIH2sna3UjtvUnKyATC88KLGFlncrZfdQmCLPaiG3kfDQIRomyIabOb2PkqrO9f8y7H EBiY6DHwohn8X8kfeMAat3ru+HBeChHAAk+QHOo0ef0GPGq8th48yfs/ESmpGlBzZJ3k YRHQ== X-Gm-Message-State: AIkVDXKQ8oy30n6WUFZuzvwORwvE9b5Z4IYAtKeh9z85pN0ier7fmEt2boquxEvm9fetYQ== X-Received: by 10.46.80.66 with SMTP id v2mr946725ljd.6.1484240599847; Thu, 12 Jan 2017 09:03:19 -0800 (PST) Received: from E107787-LIN (gcc1-power7.osuosl.org. [140.211.15.137]) by smtp.gmail.com with ESMTPSA id 14sm2562948lju.16.2017.01.12.09.03.16 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Thu, 12 Jan 2017 09:03:19 -0800 (PST) Date: Thu, 12 Jan 2017 17:03:00 -0000 From: Yao Qi To: Pedro Alves Cc: binutils@sourceware.org, gdb-patches@sourceware.org Subject: Re: [PATCH 3/8] Disassembly unit test: disassemble one instruction Message-ID: <20170112170307.GG31406@E107787-LIN> References: <1484051178-16013-1-git-send-email-yao.qi@linaro.org> <1484051178-16013-4-git-send-email-yao.qi@linaro.org> <7d906c42-2c58-bc64-376d-0e43d5176ec3@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <7d906c42-2c58-bc64-376d-0e43d5176ec3@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes X-SW-Source: 2017-01/txt/msg00246.txt.bz2 On 17-01-12 13:06:26, Pedro Alves wrote: > I'd much prefer if the core of the unit testing framework doesn't learn > about different random subsystems. Consider what we'd do if we > wanted to reuse selftest.c in gdbserver. I think we will at some point. Can we consider using some general c++ unit test frameworks rather than selftest.c? I don't see any issues if we can merge the unit test results into dejagnu test result gdb.sum. It should be straightforward to convert some c++ unit test result to the dejagnu style, and use dg-extract-results.sh to merge them into a single gdb.sum. David proposed using gtest in gcc unit test, and the major objection /concern is we may have two different format of test results. https://gcc.gnu.org/ml/gcc-patches/2015-06/msg00765.html but the concern can be addressed as I stated above. > > How about we move all this gdbarch stuff elsewhere, like > gdb/arch-utils.c or a new gdb/arch-selftests.c? > OK, I'd like to name it as gdb/selftests-arch.c, because arch-selftests.c looks like "a unit test case of arch". However, I want this file serves as "a runner to run one test case for every gdbarch". -- Yao (齐尧)