On Mon, Oct 09, 2023 at 20:12:01 +0100, Maciej W. Rozycki wrote:
>  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)

What version of Python3 do you have? The test suite might not actually
properly handle not having 3.7 (i.e., skip the tests that require it).

> rules/0/primary-output is ok: p1689-1.o

I wrote these tests.

> 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'

I'm not sure how this ends up with a dictionary in it… Can you
`print(actual)` before this?

> and also these intermittent failures for other cases:
> 
> 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-2.o
> rules/0/provides/0/logical-name is ok: foo:part1
> rules/0/provides/0/is-interface is ok: True
> ERROR: length mismatch at rules/0/requires: actual: "1" expect: "0"
> version is ok: 0
> revision is ok: 0
> FAIL: ERROR: length mismatch at rules/0/requires: actual: "1" expect: "0"
> 
> This does seem to me like something not working as intended.  As a Python 
> non-expert I have troubles concluding what is going on here and whether 
> these tracebacks are indeed supposed to be there, or whether it is a sign 
> of a problem.  And these failures I don't even know where they come from.  
> 
>  Does anyone know?  Is there a way to run the offending commands by hand?  
> The relevant invocation lines do not appear in the test log file for one 
> to copy and paste, which I think is not the right way of doing things in 
> our environment.
> 
>  These issues seem independent from the test host environment as I can see 
> them on both a `powerpc64le-linux-gnu' and an `x86_64-linux-gnu' machine 
> in `riscv64-linux-gnu' target testing.

Do they all have pre-3.7 Python3 versions?

--Ben

Reply via email to