diff options
author | Tom de Vries <tdevries@suse.de> | 2025-01-30 13:21:56 +0100 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2025-01-30 13:21:56 +0100 |
commit | 83fafbe970614f89e7e106542bdb9181b0568f0f (patch) | |
tree | 635dd0ed54552a001c1b7b9bb20ebca5e20ad116 /sim/pru/ChangeLog | |
parent | 625cadfb85ae46901ee8cbed08638ed3be8d96f5 (diff) | |
download | gdb-83fafbe970614f89e7e106542bdb9181b0568f0f.zip gdb-83fafbe970614f89e7e106542bdb9181b0568f0f.tar.gz gdb-83fafbe970614f89e7e106542bdb9181b0568f0f.tar.bz2 |
[gdb/testsuite] Handle unordered dict in gdb.python/py-mi-notify.exp
With test-case gdb.python/py-mi-notify.exp and python 3.4, I occasionally run
into:
...
python gdb.notify_mi('-test-notification', { 'data1' : 1 , 'data2' : 2 })
&"python gdb.notify_mi('-test-notification', { 'data1' : 1 , 'data2' : 2 })\n"
=-test-notification,data2="2",data1="1"
^done
(gdb)
FAIL: $exp: python notification, with additional data (unexpected output)
...
In contrast, a passing version looks like:
...
python gdb.notify_mi('-test-notification', { 'data1' : 1 , 'data2' : 2 })
&"python gdb.notify_mi('-test-notification', { 'data1' : 1 , 'data2' : 2 })\n"
=-test-notification,data1="1",data2="2"
^done
(gdb)
PASS: gdb.python/py-mi-notify.exp: python notification, with additional data
...
The python method "gdb.notify_mi(name, data)" has parameter data which is a
dictionary, and it iterates over that dictionary.
The problem is that dictionaries are only guaranteed to be iterating in
insertion order starting python 3.7 (though cpython does this starting python
3.6).
Fix this in the same way as in commit 362a867f2ac ("[gdb/testsuite] Handle
unordered dict in gdb.python/py-mi-cmd.exp"): by allowing the alternative
order.
Tested on x86_64-linux.
Diffstat (limited to 'sim/pru/ChangeLog')
0 files changed, 0 insertions, 0 deletions