This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix spurious FAILs with examine-backward.exp
- From: Pedro Alves <palves at redhat dot com>
- To: Andreas Arnez <arnez at linux dot vnet dot ibm dot com>, gdb-patches at sourceware dot org
- Date: Mon, 20 Mar 2017 17:34:06 +0000
- Subject: Re: [PATCH] Fix spurious FAILs with examine-backward.exp
- Authentication-results: sourceware.org; auth=none
- 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 at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 3208C8051B
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 3208C8051B
- References: <m3wpbjc1l5.fsf@oc1027705133.ibm.com>
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