[testsuite] Update gdb startup text in selftest.exp

Message ID 20180612140945.drjp7rent7mkeoam@localhost.localdomain
State New, archived
Headers

Commit Message

Tom de Vries June 12, 2018, 2:10 p.m. UTC
  Hi,

atm selftest.exp fails for me.

One of the reasons is that in c61b06a19a34baab66e3809c7b41b0c31009ed9f (Remove
some text from --version output) an eol was added after "There is NO
WARRANTY, to the extent permitted by law".

This patch updates the matching of the gdb startup message in selftest.exp
accordingly.

Tested selftest.exp (with two other selftest.exp related fixes applied).

OK for trunk?

Thanks,
- Tom

[gdb/testsuite] Update gdb startup text in selftest.exp

2018-06-12  Tom de Vries  <tdevries@suse.de>

	* gdb.gdb/selftest.exp (test_with_self): Update gdb startup text.

---
 gdb/testsuite/gdb.gdb/selftest.exp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Pedro Alves June 13, 2018, 11:49 a.m. UTC | #1
[Tromey's current address fixed]

Hi Tom,

On 06/12/2018 03:10 PM, Tom de Vries wrote:
> Hi,
> 
> atm selftest.exp fails for me.
> 
> One of the reasons is that in c61b06a19a34baab66e3809c7b41b0c31009ed9f (Remove
> some text from --version output) an eol was added after "There is NO
> WARRANTY, to the extent permitted by law".
> 
> This patch updates the matching of the gdb startup message in selftest.exp
> accordingly.
> 
> Tested selftest.exp (with two other selftest.exp related fixes applied).
> 
> OK for trunk?
> 
> Thanks,
> - Tom
> 
> [gdb/testsuite] Update gdb startup text in selftest.exp

You were probably already going to do it, but just in case,
since it's not practice in gcc, please include the rationale above
in the commit log (without the "Hi", "OK for trunk", etc.
bits of course.)  See "git log gdb/" for examples.

OK with that change.

That test could be made a lot more readable with use of multi_line.

Thanks,
Pedro Alves

> 
> 2018-06-12  Tom de Vries  <tdevries@suse.de>
> 
> 	* gdb.gdb/selftest.exp (test_with_self): Update gdb startup text.
> 
> ---
>  gdb/testsuite/gdb.gdb/selftest.exp | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/gdb/testsuite/gdb.gdb/selftest.exp b/gdb/testsuite/gdb.gdb/selftest.exp
> index 20f34983ef..314bddb8bf 100644
> --- a/gdb/testsuite/gdb.gdb/selftest.exp
> +++ b/gdb/testsuite/gdb.gdb/selftest.exp
> @@ -66,7 +66,7 @@ proc test_with_self { } {
>  	set test "xgdb is at prompt"
>  	gdb_test_multiple "continue" $test {
>  	    -i "$inferior_spawn_id"
> -	    -re "GNU gdb \[0-9\.\]*.*Copyright \\(C\\) \[0-9\]* Free Software Foundation, Inc.*License GPLv3\\+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.*This is free software: you are free to change and redistribute it.*There is NO WARRANTY, to the extent permitted by law.  Type \"show copying\".*and \"show warranty\" for details.*This GDB was configured as .*$gdb_prompt $" {
> +	    -re "GNU gdb \[0-9\.\]*.*Copyright \\(C\\) \[0-9\]* Free Software Foundation, Inc.*License GPLv3\\+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.*This is free software: you are free to change and redistribute it.*There is NO WARRANTY, to the extent permitted by law\..*Type \"show copying\".*and \"show warranty\" for details.*This GDB was configured as .*$gdb_prompt $" {
>  		pass $test
>  	    }
>  	}
>
  

Patch

diff --git a/gdb/testsuite/gdb.gdb/selftest.exp b/gdb/testsuite/gdb.gdb/selftest.exp
index 20f34983ef..314bddb8bf 100644
--- a/gdb/testsuite/gdb.gdb/selftest.exp
+++ b/gdb/testsuite/gdb.gdb/selftest.exp
@@ -66,7 +66,7 @@  proc test_with_self { } {
 	set test "xgdb is at prompt"
 	gdb_test_multiple "continue" $test {
 	    -i "$inferior_spawn_id"
-	    -re "GNU gdb \[0-9\.\]*.*Copyright \\(C\\) \[0-9\]* Free Software Foundation, Inc.*License GPLv3\\+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.*This is free software: you are free to change and redistribute it.*There is NO WARRANTY, to the extent permitted by law.  Type \"show copying\".*and \"show warranty\" for details.*This GDB was configured as .*$gdb_prompt $" {
+	    -re "GNU gdb \[0-9\.\]*.*Copyright \\(C\\) \[0-9\]* Free Software Foundation, Inc.*License GPLv3\\+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.*This is free software: you are free to change and redistribute it.*There is NO WARRANTY, to the extent permitted by law\..*Type \"show copying\".*and \"show warranty\" for details.*This GDB was configured as .*$gdb_prompt $" {
 		pass $test
 	    }
 	}