This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb] Fix test for Python 3
- From: Simon Marchi <simark at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 7 Jul 2015 15:40:27 -0000
- Subject: [binutils-gdb] Fix test for Python 3
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=3e221d361f5647b56b7cc3ebf5ff487f417ceed0
commit 3e221d361f5647b56b7cc3ebf5ff487f417ceed0
Author: Simon Marchi <simon.marchi@ericsson.com>
Date: Tue Jul 7 11:39:06 2015 -0400
Fix test for Python 3
gdb/testsuite/ChangeLog:
* gdb.python/py-lazy-string.exp: Add missing parentheses to
print.
Diff:
---
gdb/testsuite/ChangeLog | 5 +++++
gdb/testsuite/gdb.python/py-lazy-string.exp | 4 ++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 2a63301..5222118 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2015-07-07 Simon Marchi <simon.marchi@ericsson.com>
+
+ * gdb.python/py-lazy-string.exp: Add missing parentheses to
+ print.
+
2015-07-07 Yao Qi <yao.qi@linaro.org>
* gdb.arch/thumb-singlestep.exp: Do one more single step.
diff --git a/gdb/testsuite/gdb.python/py-lazy-string.exp b/gdb/testsuite/gdb.python/py-lazy-string.exp
index 55e903e..4b98b08 100644
--- a/gdb/testsuite/gdb.python/py-lazy-string.exp
+++ b/gdb/testsuite/gdb.python/py-lazy-string.exp
@@ -36,7 +36,7 @@ gdb_continue_to_breakpoint "break here"
gdb_test_no_output "python null = gdb.parse_and_eval(\"null\")"
-gdb_test "python print null.lazy_string(length=0).value()" \
+gdb_test "python print(null.lazy_string(length=0).value())" \
"gdb.MemoryError: Cannot create a value from NULL.*Error while executing Python code."
-gdb_test "python print null.lazy_string(length=3).value()" \
+gdb_test "python print(null.lazy_string(length=3).value())" \
"gdb.MemoryError: Cannot create a lazy string with address 0x0, and a non-zero length.*Error while executing Python code."