From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) by sourceware.org (Postfix) with ESMTPS id 38E1B385841A for ; Thu, 5 Aug 2021 19:40:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 38E1B385841A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=serhei.io Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=serhei.io Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.west.internal (Postfix) with ESMTP id E15E43200915; Thu, 5 Aug 2021 15:40:07 -0400 (EDT) Received: from imap21 ([10.202.2.71]) by compute2.internal (MEProxy); Thu, 05 Aug 2021 15:40:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=serhei.io; h= mime-version:message-id:in-reply-to:references:date:from:to :subject:content-type; s=fm2; bh=vWYPUSmZa4vOyYtZ7oelb3J+ugncG61 LVCwc0RdTDTo=; b=YHARSZpKhAN11U9H+HBxxHf+4011fWlm7qma59iN9FIs1ad uAuoKSqhzx1tPmS8nIKsP0PJNa8BhgGWVhOQhdU4TdrsM9d4z7mdGaz1ibmyPzGz hKbOyS1Rndjr1oMWjr3IKPMM4Yj8xOHw2Ye5yGF5qYfRhBrA0k8jxKmJvX8Z1VSL aluw1qJLjeJDS3Je3rqp0PTFPuwSnn9Zm8e3EC0n7yX0tyCglq/utFD82/SdSWvM X27H8TFfOfpPp+ldOGVnrGWAvvOpPjBRC1KMU9Y46oFJrwPijK7LidimknHJkzTm csYV13w7wt3CpQNYRpCo6zOxLxHKnplC0ENpeGA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=vWYPUS mZa4vOyYtZ7oelb3J+ugncG61LVCwc0RdTDTo=; b=NHeD24Y/DOQDXuGwPt3E4H iIMcXinr2OMCWeDnUjQzIj0c0JZOYXhZC5pNZ9xm/OTEoZ1wCQLj/vf2cEvhxbd/ qsWUqgRazNzcl2ujlUK6DccRmDqmzEQzf22vC37ugoVQyfDy12spvi5kkryesTFS KCc8EycOOw2mryStaRiic9a9zjP3qYnw3AvRIwkAayRak7RwMP580TVvsXvpdgna pUbAvFNy0dSiWhWYp2Fb2MY81CkQc0zca9GRELCctlEk70kfJpoWENMolfi+Xnr7 u73tOvIRFJrodlaOoGdDmuHP0JsnW7rluLxvh7alpJwMVTtKWH0FN1ghxoZH0mNQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrieelgddufeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgesthdtredtreerjeenucfhrhhomhepfdfuvghr hhgvihcuofgrkhgrrhhovhdfuceomhgvsehsvghrhhgvihdrihhoqeenucggtffrrghtth gvrhhnpefghfeuueffvdekudetvdevffefudduiedtgfeigeekkedvkeetgfelfffgtdei veenucffohhmrghinhepshhouhhrtggvfigrrhgvrdhorhhgnecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmhgvsehsvghrhhgvihdrihho X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id BB4A251C04D7; Thu, 5 Aug 2021 15:40:06 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-552-g2afffd2709-fm-20210805.001-g2afffd27 Mime-Version: 1.0 Message-Id: <02e91f33-8277-4380-bac6-cae9c7749862@www.fastmail.com> In-Reply-To: <20210805190333.11594-1-keiths@redhat.com> References: <20210805190333.11594-1-keiths@redhat.com> Date: Thu, 05 Aug 2021 15:39:45 -0400 From: "Serhei Makarov" To: "Keith Seitz" , Bunsen Subject: =?UTF-8?Q?Re:_[PATCH]_When_importing_results_from_a_full_GDB_test_run, _b?= =?UTF-8?Q?unsen_will_throw_a_TypeError:?= Content-Type: text/plain X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, JMQ_SPF_NEUTRAL, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: bunsen@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Bunsen mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Aug 2021 19:40:10 -0000 On Thu, Aug 5, 2021, at 3:03 PM, Keith Seitz via Bunsen wrote: > $ ./bunsen-add.py > bunsen-upload received a payload: > * gdb.log.xz (1177912 bytes, file) > * gdb.sum.xz (287264 bytes, file) > * README.txt (96 bytes, file) > will decompress /tmp/tmp72zejz8o/gdb.log.xz > will decompress /tmp/tmp72zejz8o/gdb.sum.xz > Traceback (most recent call last): > File "/home/keiths/work/bunsen/virgin/bunsen/./bunsen-add.py", line > 80, in > commit_id = _commit_logs.commit_logs(b, wd, tar, tarfile=tar, > File > "/home/keiths/work/bunsen/virgin/bunsen/scripts-main/gdb/commit_logs.py", line 224, in commit_logs > testrun = annotate_dejagnu_log(testrun, gdb_log, all_cases, > verbose=False) > File > "/home/keiths/work/bunsen/virgin/bunsen/scripts-main/gdb/parse_dejagnu.py", line 221, in annotate_dejagnu_log > outcome, expname, subtest = get_expname_subtest(outcome_lines[j]) > TypeError: cannot unpack non-iterable NoneType object > > This happens in annotate_dejagnu_log, where the code attempts to map > outcome lines: > > for j in range(len(outcome_lines)): > outcome, expname, subtest = get_expname_subtest(outcome_lines[j]) > if expname not in testcase_line_start: > testcase_line_start[expname] = j > > The problem is that get_expname_subtest can return None whenever it > encounters a line that doesn't fit the "OUTCOME: TESTFILE: TESTNAME" > pattern. In log files, this happens all the time, e.g., "Running TESTFILE..." Hmm, I could have sworn I dealt with this before... If outcome_lines contains a malformed line, that's actually a bug. The previous parser function (parse_dejagnu_log) contains a variable called all_cases, which should accumulate lines of the form "OUTCOME: TESTFILE: TESTNAME" only. In the latest code it's populated like this https://sourceware.org/git/?p=bunsen.git;a=blob;f=scripts-main/gdb/parse_dejagnu.py;h=b56ed3c3e5cfbfb33e6fa38fa710e5a7096071b0;hb=HEAD#l143 all_cases is then passed as outcome_lines to annotate_dejagnu_log here https://sourceware.org/git/?p=bunsen.git;a=blob;f=scripts-main/gdb/commit_logs.py;h=a8edb14b7c28975e9b9a8ffa3141ccdbe547e18b;hb=HEAD#l223 Could I have a copy of the input data that was triggering the issue? It seems like the best way to solve this is with a bit of debugging on my part. All the best, Serhei