From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15972 invoked by alias); 21 Oct 2013 11:23:27 -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 15953 invoked by uid 89); 21 Oct 2013 11:23:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_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 ESMTP; Mon, 21 Oct 2013 11:23:25 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r9LBNM2P000997 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 21 Oct 2013 07:23:23 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r9LBNIvu016198; Mon, 21 Oct 2013 07:23:19 -0400 Message-ID: <52650EA6.6030903@redhat.com> Date: Mon, 21 Oct 2013 11:23:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: Anton Kolesov CC: gdb-patches@sourceware.org, Jeremy Bennett Subject: Re: [PATCH v2] testsuite: Treat an empty string in needs_status_wrapper as false References: <39A54937CC95F24AA2F794E2D2B66B1356BD8887@de02wembxa.internal.synopsys.com> <1382354229-10006-1-git-send-email-Anton.Kolesov@synopsys.com> In-Reply-To: <1382354229-10006-1-git-send-email-Anton.Kolesov@synopsys.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-10/txt/msg00617.txt.bz2 On 10/21/2013 12:17 PM, Anton Kolesov wrote: > GDB test suite considers [target_info needs_status_wrapper] to be false if > it unset or have a zero value. The former is achieved by using [target_info > exists needs_status_wrapper]. GCC test suite on the other hand do not use > "exists" but compares to an empty string. This doesn't make difference if > value is unset, as unset value is treated as an empty string, but makes a > difference if value was set to and empty string. In that case if > needs_status_wrapper was set to an empty string, then GCC test suite will > not use status wrapper, but GDB test suite will use it. Dejagnu's own > remote.exp uses a comparison with an empty string. Though for some reason > Dejagnu unlike GCC and GDB test suite doesn't treat a zero as a false. There's another reference to needs_status_wrapper in java.exp. I think it'd be good to add a new procedure all these 3 places call instead of inlining all these not-set/""/"0" checks. It'd also be great if the info quoted above was put in the code itself (in the new procedure's documentation). -- Pedro Alves