Fix access_to_packed_array.exp typos/errors [Re: [PATCH] [Ada] Fix the evaluation of access to packed array subscript]

Message ID 20151025110818.GA25554@host1.jankratochvil.net
State New, archived
Headers

Commit Message

Jan Kratochvil Oct. 25, 2015, 11:08 a.m. UTC
  On Mon, 14 Sep 2015 16:18:00 +0200, Joel Brobecker wrote:
> > 	* gdb.ada/access_to_packed_array.exp: New testcase.
> 
> Looks good to me. Please go ahead and push.

Running ./gdb.ada/access_to_packed_array.exp ...
ERROR: tcl error sourcing ./gdb.ada/access_to_packed_array.exp.
ERROR: extra characters after close-quote
    while executing
"gdb_test "print pack.a" "\\(0 => 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\\)")"
    (file "./gdb.ada/access_to_packed_array.exp" line 29)
    invoked from within
"source ./gdb.ada/access_to_packed_array.exp"
    ("uplevel" body line 1)
    invoked from within
"uplevel #0 source ./gdb.ada/access_to_packed_array.exp"
    invoked from within
"catch "uplevel #0 source $test_file_name""

Attaching a fix of the typos.

Unrelated to the typos I have changed the print expectations s/"x"/" = x"/
as for example expectation "3" should not match " = 43".

On Fedora 21 x86_64 it then:
# of expected passes	5

OK for check-in?


Jan
gdb/testsuite/ChangeLog
2015-10-25  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* gdb.ada/access_to_packed_array.exp: Fix typos erroring the testfile.
  

Comments

Joel Brobecker Oct. 26, 2015, 10:05 p.m. UTC | #1
> On Mon, 14 Sep 2015 16:18:00 +0200, Joel Brobecker wrote:
> > > 	* gdb.ada/access_to_packed_array.exp: New testcase.
> > 
> > Looks good to me. Please go ahead and push.
> 
> Running ./gdb.ada/access_to_packed_array.exp ...
> ERROR: tcl error sourcing ./gdb.ada/access_to_packed_array.exp.
> ERROR: extra characters after close-quote
>     while executing
> "gdb_test "print pack.a" "\\(0 => 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\\)")"
>     (file "./gdb.ada/access_to_packed_array.exp" line 29)
>     invoked from within
> "source ./gdb.ada/access_to_packed_array.exp"
>     ("uplevel" body line 1)
>     invoked from within
> "uplevel #0 source ./gdb.ada/access_to_packed_array.exp"
>     invoked from within
> "catch "uplevel #0 source $test_file_name""
> 
> Attaching a fix of the typos.

Embarrassing... PM must have sent for review a version of the script
that's different from the version he tested, and I failed to catch
this.

> Unrelated to the typos I have changed the print expectations s/"x"/" = x"/
> as for example expectation "3" should not match " = 43".

Another good improvement indeeed.

> On Fedora 21 x86_64 it then:
> # of expected passes	5
> 
> OK for check-in?
> 
> 
> Jan

> gdb/testsuite/ChangeLog
> 2015-10-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
> 
> 	* gdb.ada/access_to_packed_array.exp: Fix typos erroring the testfile.

Yes, please. And thank you for fixing!
  
Jan Kratochvil Oct. 27, 2015, 5:09 a.m. UTC | #2
On Mon, 26 Oct 2015 23:05:19 +0100, Joel Brobecker wrote:
> > gdb/testsuite/ChangeLog
> > 2015-10-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
> > 
> > 	* gdb.ada/access_to_packed_array.exp: Fix typos erroring the testfile.
> 
> Yes, please. And thank you for fixing!

Checked in:
	5e2e7507b4ef8410501452224d98071657ea2d53


Jan
  
Pierre-Marie de Rodat Oct. 27, 2015, 9:42 p.m. UTC | #3
On 10/26/2015 06:05 PM, Joel Brobecker wrote:
> Embarrassing... PM must have sent for review a version of the script
> that's different from the version he tested, and I failed to catch
> this.

Arg, indeed! That’s strange, I thought that with git-send-email, this 
kind of error would not happen to me…

Anyway, many thanks to Jan for spotting and fixing this!
  

Patch

diff --git a/gdb/testsuite/gdb.ada/access_to_packed_array.exp b/gdb/testsuite/gdb.ada/access_to_packed_array.exp
index 0dca780..1bf3e22 100644
--- a/gdb/testsuite/gdb.ada/access_to_packed_array.exp
+++ b/gdb/testsuite/gdb.ada/access_to_packed_array.exp
@@ -26,8 +26,8 @@  clean_restart ${testfile}
 set bp_location [gdb_get_line_number "BREAK" ${testdir}/foo.adb]
 runto "foo.adb:$bp_location"
 
-gdb_test "print pack.a" "\\(0 => 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\\)")
-gdb_test "pack.aa"      "\\(access pack\\.array_type\\) 0x.* <pack\\.a>")
+gdb_test "print pack.a" " = \\(0 => 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\\)"
+gdb_test "print pack.aa" " = \\(access pack\\.array_type\\) 0x.* <pack\\.a>"
 
-gdb_test "pack.a(2)"   "3"
-gdb_test "pack.aa(2)"  "3"
+gdb_test "print pack.a(2)" " = 3"
+gdb_test "print pack.aa(2)" " = 3"