On Mon, Oct 09, 2023 at 20:12:01 +0100, Maciej W. Rozycki wrote:
> Hi,
> 
>  I'm seeing these tracebacks for several cases across the G++ testsuite:
> 
> Executing on host: python3 -c "import sys; assert sys.version_info >= (3, 6)" 
>    (timeout = 300)
> spawn -ignore SIGHUP python3 -c import sys; assert sys.version_info >= (3, 6)
> rules/0/primary-output is ok: p1689-1.o
> rules/0/provides/0/logical-name is ok: foo
> rules/0/provides/0/is-interface is ok: True
> Traceback (most recent call last):
>   File ".../gcc/testsuite/g++.dg/modules/test-p1689.py", line 218, in <module>
>     is_ok = validate_p1689(actual, expect)
>   File ".../gcc/testsuite/g++.dg/modules/test-p1689.py", line 182, in 
> validate_p1689
>     return compare_json([], actual_json, expect_json)
>   File ".../gcc/testsuite/g++.dg/modules/test-p1689.py", line 145, in 
> compare_json
>     is_ok = _compare_object(path, actual, expect)
>   File ".../gcc/testsuite/g++.dg/modules/test-p1689.py", line 66, in 
> _compare_object
>     sub_error = compare_json(path + [key], actual[key], expect[key])
>   File ".../gcc/testsuite/g++.dg/modules/test-p1689.py", line 151, in 
> compare_json
>     is_ok = _compare_array(path, actual, expect)
>   File ".../gcc/testsuite/g++.dg/modules/test-p1689.py", line 87, in 
> _compare_array
>     sub_error = compare_json(path + [str(idx)], a, e)
>   File ".../gcc/testsuite/g++.dg/modules/test-p1689.py", line 145, in 
> compare_json
>     is_ok = _compare_object(path, actual, expect)
>   File ".../gcc/testsuite/g++.dg/modules/test-p1689.py", line 66, in 
> _compare_object
>     sub_error = compare_json(path + [key], actual[key], expect[key])
>   File ".../gcc/testsuite/g++.dg/modules/test-p1689.py", line 149, in 
> compare_json
>     actual = set(actual)
> TypeError: unhashable type: 'dict'

So looking at the sourceā€¦the 3.6 check is not from me. Not sure what's
up there; it's probably not immediately related to the backtrace.

But this backtrace means that we have a list of objects that do not
expect a given ordering that is of JSON objects. I'm not sure why this
never showed up before as all of the existing uses of it are indeed of
objects. Can you try removing `"__P1689_unordered__"` from the
`p1689-1.exp.ddi` file's `requires` array? The
`p1689-file-default.exp.ddi` and `p1689-target-default.exp.ddi` files
need the same treatment.

--Ben

Reply via email to