From: "Maciej W. Rozycki" <macro@embecosm.com>
To: Ben Boeckel <ben.boeckel@kitware.com>
Cc: gcc@gcc.gnu.org
Subject: Re: Odd Python errors in the G++ testsuite
Date: Fri, 2 Feb 2024 10:54:49 +0000 (GMT) [thread overview]
Message-ID: <alpine.DEB.2.20.2310101108040.5892@tpp.orcam.me.uk> (raw)
In-Reply-To: <ZSSP5k0VLD1RgpFG@farprobe>
Hi Ben,
This has fallen between the cracks.
On Mon, 9 Oct 2023, Ben Boeckel wrote:
> 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).
One system has:
$ python3 --version
Python 3.10.12
$
and the other has:
$ python3 --version
Python 3.9.2
$
-- are these correct versions?
> > rules/0/primary-output is ok: p1689-1.o
>
> I wrote these tests.
Ack.
> > 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?
I'll see if I can still reproduce the issue and add some diagnostics if
so.
> > 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?
None of them, as noted above.
Maciej
next prev parent reply other threads:[~2024-02-02 10:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-09 19:12 Maciej W. Rozycki
2023-10-09 23:42 ` Ben Boeckel
2023-10-09 23:46 ` Paul Koning
2023-10-10 0:00 ` Ben Boeckel
2024-02-02 10:54 ` Maciej W. Rozycki [this message]
2023-10-10 0:09 ` Ben Boeckel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.20.2310101108040.5892@tpp.orcam.me.uk \
--to=macro@embecosm.com \
--cc=ben.boeckel@kitware.com \
--cc=gcc@gcc.gnu.org \
--cc=macro@orcam.me.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).