From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23032 invoked by alias); 10 Oct 2018 20:31:12 -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 22857 invoked by uid 89); 10 Oct 2018 20:31:08 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=0.4 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS,TRACKER_ID autolearn=no version=3.3.2 spammy=Share, junior, retained, 20180917 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; Wed, 10 Oct 2018 20:31:06 +0000 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3ADFC369C9; Wed, 10 Oct 2018 20:31:05 +0000 (UTC) Received: from localhost (unused-10-15-17-196.yyz.redhat.com [10.15.17.196]) by smtp.corp.redhat.com (Postfix) with ESMTP id 098C651DFE; Wed, 10 Oct 2018 20:31:04 +0000 (UTC) From: Sergio Durigan Junior To: Simon Marchi Cc: GDB Patches , Pedro Alves Subject: Re: [PATCH] Add parameter to allow enabling/disabling selftests via configure References: <20180814054221.13061-1-sergiodj@redhat.com> <20180917202242.28583-1-sergiodj@redhat.com> Date: Wed, 10 Oct 2018 20:31:00 -0000 In-Reply-To: (Simon Marchi's message of "Fri, 5 Oct 2018 21:19:35 -0400") Message-ID: <87murl7ddj.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2018-10/txt/msg00266.txt.bz2 On Friday, October 05 2018, Simon Marchi wrote: > On 2018-09-17 4:22 p.m., Sergio Durigan Junior wrote: >> This is a follow-up of: >> >> https://sourceware.org/ml/gdb-patches/2018-08/msg00347.html >> >> Instead of going throttle and always enabling our selftests (even in >> non-development builds), this patch is a bit more conservative and >> introduces a configure option ("--enable-unit-tests") that allows the >> user to choose whether she wants unit tests in the build or not. Note >> that the current behaviour is retained: if no option is provided, GDB >> will have selftests included in a development build, and will *not* >> have selftests included in a non-development build. >> >> The rationale for having this option is still the same: due to the >> many racy testcases and random failures we see when running the GDB >> testsuite, it is unfortunately not possible to perform a full test >> when one is building a downstream package. As the Fedora GDB >> maintainer and one of the Debian GDB uploaders, I feel like this >> situation could be improved by, at least, executing our selftests >> after the package has been built. >> >> This patch introduces no regressions to our build. > > Hi Sergio, Hi Simon, Thanks for the review. > I think having an configure switch with that default value makes sense. > > I have two suggestions: > > - Mention the switch explicitly in the error message (--{enable,disable}-unit-tests) > so the user knows exactly what you are talking about. > - Share the code between gdb's and gdbserver's configure script > >> +`--enable-unit-tests[=yes|no]' >> + Enable (i.e., include) support for unit tests when compiling GDB >> + and GDBServer. Note that if this option is not passed, GDB will >> + have selftests if it is a development build, and will *not* have >> + selftests if it a non-development build. > > Missing a word: "if it is a". > > Here's a patch that goes on top of yours that does what I suggest (I had to try it > before suggesting it to make sure I don't ask for the impossible, so I might as well > share it). With this (especially the code-sharing part), the patch LGTM (the > ChangeLog entry would need to be updated to account for the new changes). Fair enough. I applied your patch, updated the ChangeLog, and pushed it. 8ecfd7bd4acd69213c06fac6de9af38299123547 Thanks, -- Sergio GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36 Please send encrypted e-mail if possible http://sergiodj.net/