[RFA] Handle var_zuinteger and var_zuinteger_unlimited from Python

Message ID 87k1sl6a2e.fsf@tromey.com
State New, archived
Headers

Commit Message

Tom Tromey May 2, 2018, 9:07 p.m. UTC
  >>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:

Pedro> On 04/26/2018 11:20 PM, Tom Tromey wrote:
>> +    if {$kind == "PARAM_ZUINTEGER"} {
>> +	gdb_test "python test_param_$kind.value = -1" "RuntimeError: Range exceeded.*"
>> +    } else {
>> +	gdb_test_no_output "python test_param_$kind.value = -1" ""

Pedro> Passing "" to gdb_test_no_output case suppresses the test
Pedro> name/message in gdb.sum.  I suspect that was not intended.

How's this?

Tom
  

Comments

Pedro Alves May 2, 2018, 9:37 p.m. UTC | #1
On 05/02/2018 10:07 PM, Tom Tromey wrote:
>>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:
> 
> Pedro> On 04/26/2018 11:20 PM, Tom Tromey wrote:
>>> +    if {$kind == "PARAM_ZUINTEGER"} {
>>> +	gdb_test "python test_param_$kind.value = -1" "RuntimeError: Range exceeded.*"
>>> +    } else {
>>> +	gdb_test_no_output "python test_param_$kind.value = -1" ""
> 
> Pedro> Passing "" to gdb_test_no_output case suppresses the test
> Pedro> name/message in gdb.sum.  I suspect that was not intended.
> 
> How's this?

OK.

Thanks,
Pedro Alves
  

Patch

diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 5bbcb2f420..9addcbb9e9 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,9 @@ 
 2018-05-02  Tom Tromey  <tom@tromey.com>
 
+	* gdb.python/py-parameter.exp: Set test message.
+
+2018-05-02  Tom Tromey  <tom@tromey.com>
+
 	PR python/20084:
 	* gdb.python/py-parameter.exp: Add PARAM_ZUINTEGER and
 	PARAM_ZUINTEGER_UNLIMITED tests.
diff --git a/gdb/testsuite/gdb.python/py-parameter.exp b/gdb/testsuite/gdb.python/py-parameter.exp
index b9ff9f1ec0..1ea79b8946 100644
--- a/gdb/testsuite/gdb.python/py-parameter.exp
+++ b/gdb/testsuite/gdb.python/py-parameter.exp
@@ -197,7 +197,8 @@  foreach kind {PARAM_ZUINTEGER PARAM_ZUINTEGER_UNLIMITED} {
     if {$kind == "PARAM_ZUINTEGER"} {
 	gdb_test "python test_param_$kind.value = -1" "RuntimeError: Range exceeded.*"
     } else {
-	gdb_test_no_output "python test_param_$kind.value = -1" ""
+	gdb_test_no_output "python test_param_$kind.value = -1" \
+	    "check that PARAM_ZUINTEGER value can be set to -1"
 	gdb_test "python print(gdb.parameter('test-$kind'))" "-1" \
 	    "check that PARAM_ZUINTEGER value is -1 after setting"
     }