From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 107098 invoked by alias); 20 Mar 2017 17:34:10 -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 107083 invoked by uid 89); 20 Mar 2017 17:34:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:862 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, 20 Mar 2017 17:34:08 +0000 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3208C8051B; Mon, 20 Mar 2017 17:34:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 3208C8051B Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=palves@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 3208C8051B Received: from [127.0.0.1] (ovpn04.gateway.prod.ext.phx2.redhat.com [10.5.9.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6760860461; Mon, 20 Mar 2017 17:34:08 +0000 (UTC) Subject: Re: [PATCH] Fix spurious FAILs with examine-backward.exp To: Andreas Arnez , gdb-patches@sourceware.org References: From: Pedro Alves Message-ID: Date: Mon, 20 Mar 2017 17:34:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2017-03/txt/msg00342.txt.bz2 On 03/20/2017 05:14 PM, Andreas Arnez wrote: > The test case examine-backward.exp issues the command "x/-s" after the end > of the first string in TestStrings, but without making sure that this > string is preceded by a string terminator. Thus GDB may spuriously print > some random characters from before that string, and then the test fails. > > This patch assures that TestStrings is preceded by a string terminator. > Agreed. Looks like I forgot to follow through with: https://sourceware.org/ml/gdb-patches/2016-08/msg00127.html > > +const char Barrier[] = { > + 0x00, > +}; > + OK with a comment. Feel free to steal mine from that url. > const char TestStrings[] = { > 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, > 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, > Thanks, Pedro Alves