From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 73930 invoked by alias); 30 Mar 2019 10:01:08 -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 73778 invoked by uid 89); 30 Mar 2019 10:00:54 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-3.4 required=5.0 tests=AWL,BAYES_00,SPF_PASS,URIBL_BLOCKED autolearn=ham version=3.3.1 spammy= X-HELO: eggs.gnu.org Received: from eggs.gnu.org (HELO eggs.gnu.org) (209.51.188.92) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 30 Mar 2019 10:00:50 +0000 Received: from fencepost.gnu.org ([2001:470:142:3::e]:36810) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hAAn0-0004qe-O7; Sat, 30 Mar 2019 06:00:38 -0400 Received: from [176.228.60.248] (port=1794 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hAAmz-0002HP-PF; Sat, 30 Mar 2019 06:00:38 -0400 Date: Sat, 30 Mar 2019 10:01:00 -0000 Message-Id: <83pnq8isvr.fsf@gnu.org> From: Eli Zaretskii To: Simon Marchi CC: gdb-patches@sourceware.org, brobecker@adacore.com In-reply-to: (message from Simon Marchi on Tue, 26 Mar 2019 10:46:56 -0400) Subject: Re: GDB version as convenience variable References: <20181128001435.12703-1-tom@tromey.com> <83k1kxfzwo.fsf@gnu.org> <8736rja4i8.fsf@tromey.com> <83r2brhw8k.fsf@gnu.org> <87h8cmh1wg.fsf@tromey.com> <83va12gz8j.fsf@gnu.org> <87mumeb935.fsf@tromey.com> <83d0n8eyzw.fsf@gnu.org> <87d0n6adk2.fsf@tromey.com> <83imwyee29.fsf@gnu.org> <87d0n67d29.fsf@tromey.com> <83imwwc7pj.fsf@gnu.org> <83k1gts5it.fsf@gnu.org> <83r2aun9mk.fsf@gnu.org> <9d445bd2-28dd-be84-5414-510e061e4db1@simark.ca> <83mulin7ui.fsf@gnu.org> <83k1gmn6b2.fsf@gnu.org> <83imw6n4ny.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-IsSubscribed: yes X-SW-Source: 2019-03/txt/msg00759.txt.bz2 > From: Simon Marchi > Cc: gdb-patches@sourceware.org, brobecker@adacore.com > Date: Tue, 26 Mar 2019 10:46:56 -0400 > > Apparently, the test default.exp needs to be changed in any case, because > it adds new convenience variables. Without modification, the > "show convenience" test fails because there is a new entry it doesn't know > about. > > So for now, I would suggest adding the modification below to your patch to keep > the test passing. It is not obvious to change the test to match the convenience > variable value against a variable or even against a regexp, because it uses > gdb_test_list_exact, which does straight string comparison. > > Also, I am not sure if reading the output of "show version" and testing against > that would be a really good test, because the implementation and the test would > work essentially work the same way. So if the version string erroneously becomes > 0.0.0 because of some bug in some script, the test would still pass, even though > the values are wrong. > > At least, the following is simple and robust. Thanks, I used that, and pushed the changes including this one.