From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ua1-x933.google.com (mail-ua1-x933.google.com [IPv6:2607:f8b0:4864:20::933]) by sourceware.org (Postfix) with ESMTPS id 87C433858D28 for ; Mon, 9 Oct 2023 23:42:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 87C433858D28 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=kitware.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=kitware.com Received: by mail-ua1-x933.google.com with SMTP id a1e0cc1a2514c-7b07548b084so1546954241.1 for ; Mon, 09 Oct 2023 16:42:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kitware.com; s=google; t=1696894952; x=1697499752; darn=gcc.gnu.org; h=user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=CjuxL7LZ9HrETUIUK0QJZXFhdjpN3CvxZRqDZxyLvAc=; b=sM7Tl+lZkyFyPcis0nE4Y+0xoKJSm3IRwmRsIdDBhR8D2Jeo4lvBfZXfJixSx4uHfA bD09y0GASe1L/B3sPDKGnV+kMdkaofubBfmX6+BRX5TKiL4fQPz9M76yywJxL5zSCW5e XF4y7lCcqi+5gkFXVtdOBNdYK5UQGlJBTqQbo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696894952; x=1697499752; h=user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=CjuxL7LZ9HrETUIUK0QJZXFhdjpN3CvxZRqDZxyLvAc=; b=wLZuk2woaW+3MH/u8HOhwms9ZWssDSJSKiO0m+x/9onw4bsM6OD/sTmqO25NKh0rfk UURkpWvwMYm38xprRPrKE7OS88iPbFAnjx59AzWBCCtrjVi0O38fxI8vH7VkA8GbYBJl kMjWIWhZUq2pMEI2XAaaBlvN3e9TkUmqDBjKs7Bo0lzSvizi9BZNkn/EB8jguK8eW5eI 02LIeeIYaqnE6aMrpX9GOmj6du634N0dZTNW8h2S92XGMIBfa8xeJYODUsmcc3vWKgQo zZEwsPUvPkMEmAef7OFbV4z2LJOWMFZaM19YjR7zMgQk3oppsfpw0YFK6Mg5RK52RHIH 8M/g== X-Gm-Message-State: AOJu0YzgZKyIPwfpPavpLvGJJrSaqp8w6Jo23KQpFGsbFWs/T8CWxc8g r9vWVZgk5rrYjy1gOP8sCXhhsA== X-Google-Smtp-Source: AGHT+IHoqf/0NFBFFkhThFNkzzDBzw3YVUHu8bnQgq0KmDm5l+V17IiLrr1OAyp4MiNizz+DcSxAXw== X-Received: by 2002:a67:ce81:0:b0:454:607d:196f with SMTP id c1-20020a67ce81000000b00454607d196fmr16325533vse.20.1696894951547; Mon, 09 Oct 2023 16:42:31 -0700 (PDT) Received: from localhost (cpe-142-105-146-128.nycap.res.rr.com. [142.105.146.128]) by smtp.gmail.com with ESMTPSA id a10-20020a0ce34a000000b006575372c845sm4220898qvm.119.2023.10.09.16.42.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 16:42:31 -0700 (PDT) Date: Mon, 9 Oct 2023 19:42:30 -0400 From: Ben Boeckel To: "Maciej W. Rozycki" Cc: gcc@gcc.gnu.org Subject: Re: Odd Python errors in the G++ testsuite Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/2.2.9 (2022-11-12) X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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 > 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