From patchwork Fri Nov 22 16:23:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Purdie X-Patchwork-Id: 53002 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 23610E69179 for ; Fri, 22 Nov 2024 16:23:47 +0000 (UTC) Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) by mx.groups.io with SMTP id smtpd.web11.28634.1732292623876438770 for ; Fri, 22 Nov 2024 08:23:44 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=bokEfusD; spf=pass (domain: linuxfoundation.org, ip: 209.85.128.50, mailfrom: richard.purdie@linuxfoundation.org) Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-431ac30d379so20593745e9.1 for ; Fri, 22 Nov 2024 08:23:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1732292622; x=1732897422; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=Dv6DR/1fH9TeLdoZnHDWcNSnSby2DbD8Lr+nWluwzIc=; b=bokEfusDUWXFTKornN4/PaeZIsQjlhPCNL2ZmBBmbjdZM38u8RGvA3C4xbhLc6prqP bpJbQdX/F9ezV0IePAsXA69HUXUaDBIGrVdeZgrmQZIrrKiad64rqebXNY4HGlaioG1t QtFyE99qwbqexyh0H0xUc6QgIAK3uhrd4xTbk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732292622; x=1732897422; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Dv6DR/1fH9TeLdoZnHDWcNSnSby2DbD8Lr+nWluwzIc=; b=pU/8lU6/js0asaQBFwlFrh+8KpgoYQv9SJvpzKcXnymVvXsbNKFzbRIiyIqeNYQzJQ x4QYMZr3cAun/yiayka9bzQL9q3X18bbqUMNGPRqvJi4VyWXywRls1gHZV5A6BebtfGi EcRK53Pd7PAZqv5Zs9T4tiwjCIIBzvgZn2cUlnH+WvJXsMcEodIE1NVJCfnGrT4OZVb/ 0RU+eAwDD4+4VjXUk146jjxCwapMXNaPpoGH3auJUkLIomqir0LKdepYJz9ZL7lx860V CcdWq857ThWyXvQaAZrh8vX3mghWp6rY0VBSSulJrka/2oJWipDfZu3JGTUeU7+wHsyR Cqpw== X-Gm-Message-State: AOJu0YxBlvsUsJZVcKTicJOAbf+iDDuc2/LLlgdMh9coCo/4DlkiSHxX HkhMi29/MCYc2eCpS0yCHsw+pWMMkume6fxcs3WS3WtQ878rqQY6vn1jbxofY0SzGmo+cj/xuiY 7 X-Gm-Gg: ASbGncuLrj+XwyOkUGGsYq9AOHH+ULqgZbvnpTLfiZ9LNA0ozrYhmzVxavqu0bHJlwK p6IsPrFJnR/JFkOSiwkgrIB7FTpNQ3PaCZQctgy9K0Ilh1xcDxBZhQfm+g1ULCRk+7ZpEZCqMbQ si5k1c4HAmBNt/uqVap7oh4kZCS36oWMJz6gdqEJItFNLi1C9zYBxFtqLf1uBe1MgyY126XdOTy ej/RV4DWIz5XM/I9oTyeQ0jTo7ww/ZrzQrgIE3L5UCdeUSvdoSCZIaIvlhnWA5xtrYa73R5Cwgw iCk= X-Google-Smtp-Source: AGHT+IGYQ8q+7B9OLPoAsxM9q0GZh1IYznTzQDBRUWFPyfeoKYsBmUOgjiPVI3/+85oQ2ElTUlF28w== X-Received: by 2002:a05:600c:1914:b0:42c:b995:2100 with SMTP id 5b1f17b1804b1-433ce413b3cmr28540555e9.6.1732292621647; Fri, 22 Nov 2024 08:23:41 -0800 (PST) Received: from max.int.rpsys.net ([2001:8b0:aba:5f3c:87e7:ee61:98f2:6cd2]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-433b45d4dd6sm100686595e9.24.2024.11.22.08.23.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Nov 2024 08:23:41 -0800 (PST) From: Richard Purdie To: openembedded-core@lists.openembedded.org Subject: [PATCH 1/8] resulttool: Use single space indentation in json output Date: Fri, 22 Nov 2024 16:23:33 +0000 Message-ID: <20241122162340.2770780-1-richard.purdie@linuxfoundation.org> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 22 Nov 2024 16:23:47 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/207629 Using 4 space indentation in resulted in hundreds of megabytes of extra file size in general use. Reduce this to make filesizes more managable and reduce the processing cost. Some level of indentation and spacing does make the files more readable and allows use of git diff so we need to retain some of it. Signed-off-by: Richard Purdie --- meta/lib/oeqa/core/runner.py | 2 +- scripts/lib/resulttool/manualexecution.py | 2 +- scripts/lib/resulttool/report.py | 2 +- scripts/lib/resulttool/resultutils.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/meta/lib/oeqa/core/runner.py b/meta/lib/oeqa/core/runner.py index a86a706bd96..b683d9b80a7 100644 --- a/meta/lib/oeqa/core/runner.py +++ b/meta/lib/oeqa/core/runner.py @@ -357,7 +357,7 @@ class OETestResultJSONHelper(object): os.makedirs(write_dir, exist_ok=True) test_results = self._get_existing_testresults_if_available(write_dir) test_results[result_id] = {'configuration': configuration, 'result': test_result} - json_testresults = json.dumps(test_results, sort_keys=True, indent=4) + json_testresults = json.dumps(test_results, sort_keys=True, indent=1) self._write_file(write_dir, self.testresult_filename, json_testresults) if has_bb: bb.utils.unlockfile(lf) diff --git a/scripts/lib/resulttool/manualexecution.py b/scripts/lib/resulttool/manualexecution.py index ecb27c59332..ae0861ac6b4 100755 --- a/scripts/lib/resulttool/manualexecution.py +++ b/scripts/lib/resulttool/manualexecution.py @@ -22,7 +22,7 @@ def load_json_file(f): def write_json_file(f, json_data): os.makedirs(os.path.dirname(f), exist_ok=True) with open(f, 'w') as filedata: - filedata.write(json.dumps(json_data, sort_keys=True, indent=4)) + filedata.write(json.dumps(json_data, sort_keys=True, indent=1)) class ManualTestRunner(object): diff --git a/scripts/lib/resulttool/report.py b/scripts/lib/resulttool/report.py index a349510ab85..1c100b00ab3 100644 --- a/scripts/lib/resulttool/report.py +++ b/scripts/lib/resulttool/report.py @@ -256,7 +256,7 @@ class ResultsTextReport(object): if selected_test_case_only: print_selected_testcase_result(raw_results, selected_test_case_only) else: - print(json.dumps(raw_results, sort_keys=True, indent=4)) + print(json.dumps(raw_results, sort_keys=True, indent=1)) else: print('Could not find raw test result for %s' % raw_test) return 0 diff --git a/scripts/lib/resulttool/resultutils.py b/scripts/lib/resulttool/resultutils.py index c5521d81bd1..8fd4e0a9cf0 100644 --- a/scripts/lib/resulttool/resultutils.py +++ b/scripts/lib/resulttool/resultutils.py @@ -169,7 +169,7 @@ def save_resultsdata(results, destdir, fn="testresults.json", ptestjson=False, p if not ptestjson: resultsout = strip_ptestresults(results[res]) with open(dst, 'w') as f: - f.write(json.dumps(resultsout, sort_keys=True, indent=4)) + f.write(json.dumps(resultsout, sort_keys=True, indent=1)) for res2 in results[res]: if ptestlogs and 'result' in results[res][res2]: seriesresults = results[res][res2]['result'] From patchwork Fri Nov 22 16:23:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Purdie X-Patchwork-Id: 53000 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1EC20E69178 for ; Fri, 22 Nov 2024 16:23:47 +0000 (UTC) Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) by mx.groups.io with SMTP id smtpd.web11.28635.1732292625154598340 for ; Fri, 22 Nov 2024 08:23:45 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=UuDZaD0G; spf=pass (domain: linuxfoundation.org, ip: 209.85.128.43, mailfrom: richard.purdie@linuxfoundation.org) Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-432d9bb168cso19736175e9.1 for ; Fri, 22 Nov 2024 08:23:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1732292623; x=1732897423; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=yK/hISS0ZMN9foPN32QFDy1sSyb37fAbtceHr+fCEVk=; b=UuDZaD0GHLrH+PsNqUsMGyl1b/NFFSa3K5eVTlXh76ykG1vj2frTjzzEao9sS7oqrk jMhLF7PiK7FjFFwqUZQ8n2yi3GLumnni5leU1zMOPCucw9MtEDYI5QUwo+hlNuNohpQJ pktocSBW/kjyw+1YHz6s3gVEq2dqd1YeSpQY8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732292623; x=1732897423; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yK/hISS0ZMN9foPN32QFDy1sSyb37fAbtceHr+fCEVk=; b=CTQTLkzAKvWaREluGKcPb2WwIgL4IXeY12ihYcwCb7NFSixwZwOhDiCfkuGAcIV4lH 2Rm/YDnk4ST2EKJLO0yMfHPSxscrwrGOSVy0k1OPKXrr0vCBIcem7LB0ASPtUIy5ALq4 v2yE44yzBPCmgzBccGvPX2K9htL9KB3zpaB+PvjZ0GIligR5xWHtS/vRti16i0f7FSDO z3nOKRnDU0Lvv2Ow/8fsOSV3/m/LcQX2j2Noy8hpe38WR+wpu4kuIYWjJdQOFCG+9GEE PmqJU472PLeiYaEA/wyfeW9Y8LUNg05FLhkofMi4UyHRj5yXDNg1Gr9d4OgcOuQJL6U6 2Ucw== X-Gm-Message-State: AOJu0YzmGnBt3nbgXsJG6ieNweBs1K4SjkxtgyZKghvHGeRoZwT5J2kx hQcBFcwdtXcOHL1xppovUSOGDLtG2k+IE0iRoiDvd2/L6RdQkqeSSMuRqw+vJBgDUOQ9n9pvT95 j X-Gm-Gg: ASbGncu07QfbG8Uk0eQVTtrlKQvYh1Fh1u5LIBEjSlxseY+uuVbHu7s0xwFNyG/Mqmd gjC00hu3HiZnB++W2K6atNsH4Xy3SodP7lNTbqzf5ZjkmYa8eAzFLLopPJh+oKg1LaAfJqgAAvj ZyFHwGOaavXoSEul/VUh+3u+ZSFS5wtg4OGTh8kFaK3ET4TPLbImDK8eqCtxQOpMp43siMfTrOD zXL81jd9aaB09WyKuCAoCtUqmuctDFHE2NqQtxqWAA891aAlxvI23GVyZcTgMjeQ4aDAvylCnbW YDU= X-Google-Smtp-Source: AGHT+IHDMBTBDF11IT+7eQvH2Tyt+zj3IBW005XTTRKoVF2gu3SibCGxFMcxejwFuCCaAALhq8iKWA== X-Received: by 2002:a05:600c:548d:b0:42c:b67b:816b with SMTP id 5b1f17b1804b1-433c5c889a4mr68768145e9.1.1732292622901; Fri, 22 Nov 2024 08:23:42 -0800 (PST) Received: from max.int.rpsys.net ([2001:8b0:aba:5f3c:87e7:ee61:98f2:6cd2]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-433b45d4dd6sm100686595e9.24.2024.11.22.08.23.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Nov 2024 08:23:42 -0800 (PST) From: Richard Purdie To: openembedded-core@lists.openembedded.org Subject: [PATCH 2/8] oeqa/utils/gitarchive: Return tag name and improve exclude handling Date: Fri, 22 Nov 2024 16:23:34 +0000 Message-ID: <20241122162340.2770780-2-richard.purdie@linuxfoundation.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241122162340.2770780-1-richard.purdie@linuxfoundation.org> References: <20241122162340.2770780-1-richard.purdie@linuxfoundation.org> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 22 Nov 2024 16:23:47 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/207630 Tweak the gitarchive exclude handling not to error if excluded files don't match. Also return the tagname created so that other code can then use it. Signed-off-by: Richard Purdie --- meta/lib/oeqa/utils/gitarchive.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/meta/lib/oeqa/utils/gitarchive.py b/meta/lib/oeqa/utils/gitarchive.py index 10cb267dfa9..a826646059a 100644 --- a/meta/lib/oeqa/utils/gitarchive.py +++ b/meta/lib/oeqa/utils/gitarchive.py @@ -67,7 +67,7 @@ def git_commit_data(repo, data_dir, branch, message, exclude, notes, log): # Remove files that are excluded if exclude: - repo.run_cmd(['rm', '--cached'] + [f for f in exclude], env_update) + repo.run_cmd(['rm', '--cached', '--ignore-unmatch'] + [f for f in exclude], env_update) tree = repo.run_cmd('write-tree', env_update) @@ -202,6 +202,8 @@ def gitarchive(data_dir, git_dir, no_create, bare, commit_msg_subject, commit_ms log.info("Pushing data to remote") data_repo.run_cmd(cmd) + return tag_name + # Container class for tester revisions TestedRev = namedtuple('TestedRev', 'commit commit_number tags') From patchwork Fri Nov 22 16:23:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Purdie X-Patchwork-Id: 53001 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1D526E69176 for ; Fri, 22 Nov 2024 16:23:47 +0000 (UTC) Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) by mx.groups.io with SMTP id smtpd.web10.28283.1732292626404119438 for ; Fri, 22 Nov 2024 08:23:46 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=eFogCTRI; spf=pass (domain: linuxfoundation.org, ip: 209.85.128.54, mailfrom: richard.purdie@linuxfoundation.org) Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-4316cce103dso26442435e9.3 for ; Fri, 22 Nov 2024 08:23:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1732292624; x=1732897424; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=Gb9c/NZMkYe7x+42eDnez22h/KGNzEveD5sUaTYml2M=; b=eFogCTRIsQUqTgPGjq9GG5P9/5Srf5GgVMH/NgSo7fVsq8VOJDDBVm5Zk4wkzQmJ7W cAKwgg2iseQQD7YgQDqQFDHJwHahc2x20OoGEWI+jGxXsXB/xJE7r0G6YGGNsFhRGJcS 73Hes7alR2EjIhf3MDB5tV8eB56snHOhc0Vxs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732292624; x=1732897424; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Gb9c/NZMkYe7x+42eDnez22h/KGNzEveD5sUaTYml2M=; b=STnaVTsvxtkP2YaQqDW7Cf5j3/8VoDc7q4LxhDTENTbKee15ma3Awvxj2jt4IbBCrL NwpGiqhvt5lTmwJlOw+8ic44XqqcORq2xAeJ7wjSupIe+iB06VGGp91kAFmspWmjtb6l d6JNcCliUnc4TqI7w3lrOTA12mKrCTSi1+AkiTt2s0JlDNI+I6qZca3FpzZTUUF23Bu0 gxyp3aewxqyNYj4RC4b2vK+VVDmg1ft6sguLitBsAWnJhZIJJXF8LBXU7tA+pM5BsVwa 6QwD6skRXy40Xrsl0ucQeM8Pyc/3mPBwOP7KZWFHlr9Y3CrpXTT40oA5pYZSQbKDOqUB TzQw== X-Gm-Message-State: AOJu0YzxPCsC1gXMH1BTdxIGFGv7rM09CsmMQ705GiXHhK+Sx4xb6Qcf XqxY7lhff2ufv27394lTnykjsyNSdujF9yxyMxmh0IrLDgcpUjIYgEVTq9Q64QGbmZ3NCazwFiy I X-Gm-Gg: ASbGncuTft3zfiT+7a4j0mWiv3rjT7Qn3gpG7pv1/D4dW5KeDepg6f3INnkONjQYMA6 EYfCYP3zaVL7XLc3USbQtBDNg1EqCk5fH0ns4uuucxV/Caq0eQz+VjN8G6bl9C+yJtOyIIAG9Bo LDFjrnnm84nSqfDvDjH7N1RFtvUep/gLnxAxLoSxvI4FacZLgcrzZ6NkRhaL3Kktpmc0tyP1L/5 bnUYtXZIBejAjdwoY/vsh/5AezvUc3SPrTlGKIsg5LpJJVi0Z1hxnzKEll4t3nvcd1LOMEt6CL7 FpE= X-Google-Smtp-Source: AGHT+IFCpNHXxUUjzMENvYcU/Q37O82IfsCKlBQ8BV7F695hYxKAEHz9XPQ2fisIV9yJ/Jh7cDJL7w== X-Received: by 2002:a05:600c:1909:b0:431:9a26:3cf6 with SMTP id 5b1f17b1804b1-433ce41047fmr36663675e9.4.1732292624330; Fri, 22 Nov 2024 08:23:44 -0800 (PST) Received: from max.int.rpsys.net ([2001:8b0:aba:5f3c:87e7:ee61:98f2:6cd2]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-433b45d4dd6sm100686595e9.24.2024.11.22.08.23.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Nov 2024 08:23:43 -0800 (PST) From: Richard Purdie To: openembedded-core@lists.openembedded.org Subject: [PATCH 3/8] resulttool: Fix passthrough of --all files in store mode Date: Fri, 22 Nov 2024 16:23:35 +0000 Message-ID: <20241122162340.2770780-3-richard.purdie@linuxfoundation.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241122162340.2770780-1-richard.purdie@linuxfoundation.org> References: <20241122162340.2770780-1-richard.purdie@linuxfoundation.org> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 22 Nov 2024 16:23:47 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/207631 When using store mode, --all was broken as not all files were being preserved. Fix this by limiting the scope of the git rm command. Signed-off-by: Richard Purdie --- scripts/lib/resulttool/store.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/lib/resulttool/store.py b/scripts/lib/resulttool/store.py index 430213bbfe9..903e29627ab 100644 --- a/scripts/lib/resulttool/store.py +++ b/scripts/lib/resulttool/store.py @@ -69,7 +69,7 @@ def store(args, logger): logger.info('skipping %s as non-matching' % r[0]) continue keywords = {'commit': r[0], 'branch': r[1], "commit_count": r[2]} - subprocess.check_call(["find", tempdir, "!", "-path", "./.git/*", "-delete"]) + subprocess.check_call(["find", tempdir, "-name", "testresults.json", "!", "-path", "./.git/*", "-delete"]) resultutils.save_resultsdata(results, tempdir, ptestlogs=True) logger.info('Storing test result into git repository %s' % args.git_dir) From patchwork Fri Nov 22 16:23:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Purdie X-Patchwork-Id: 53004 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 06681E6917A for ; Fri, 22 Nov 2024 16:23:57 +0000 (UTC) Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) by mx.groups.io with SMTP id smtpd.web11.28639.1732292627453601411 for ; Fri, 22 Nov 2024 08:23:47 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=gxwqL7+I; spf=pass (domain: linuxfoundation.org, ip: 209.85.221.43, mailfrom: richard.purdie@linuxfoundation.org) Received: by mail-wr1-f43.google.com with SMTP id ffacd0b85a97d-3824446d2bcso1930859f8f.2 for ; Fri, 22 Nov 2024 08:23:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1732292625; x=1732897425; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=yI7zBU+aOfZbapXryM/wpEJezmBX/uoLpUWFLEN+lUY=; b=gxwqL7+IAVIna/V9XK8uKXj1PVyK9Njiz3TpE7jrKSO4gy08KvfJYq8EeG3tzkYRnT d0/d8CIfG4ERE9i8YU43ZDyWLNMOiUxcsFbcp2R/9rgURmMjzirFbOEIlqFn/iUKojPW 6aIlRE1a7Wz4fJbHNOSYvZbBW0WVS9T4e/NrE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732292625; x=1732897425; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yI7zBU+aOfZbapXryM/wpEJezmBX/uoLpUWFLEN+lUY=; b=dOP9vSC6xtHTUio8er3KlBcm0qxJ+5WKHjr8hfhTImZ/nDqRBY6FeIOKUJjXbzg6H0 dvnpks1LyxTJdF8G2gD8zG77uZjN6G5rh8m6YRFiHb2b/rQ1ODWEH4pBXsvqb9ird7Ce DRaJGxLC2drxTSHM78QBUMOVFwVwheslqOeph26TXtn0/AmPac7grE74hn4V4FjMOhWQ 7YOu1y/6l1WbJZuVDdwCshaKoWCPWDvhHoZHihViHj5TzwkB9dRIel1FpxOqm/wrbk3r 0dpap09HU2A9GvABbLJAv3XfWrN1PznA0OGRMVceqPWSqLkCwMcCs+RP4+OtKvFQZPO9 /ZCw== X-Gm-Message-State: AOJu0YynJkClv2LlYbXETNKIZNxdSMBTFCh+qDtu38mWKKFsd6S9jIDE NeADsVRepmu99Wf7LacFSQJAZojafEkP3+iAbDrrmcYBPRKCgbnDrev0Bw5jT2ItLHZwOogcw8C h X-Gm-Gg: ASbGncsHIqgB3pxBrJmlYzEeCBe4/Edicf+2WbDl/QqKrur4SimhJDgkiPosjpSgKQ/ mcj11V9OKqXkpTwUCdl2esN6pVzOtlhSm4F32wYJa/o+AQU23aA9DErGYaIW1hHIXE9oIUiWFBr DTzdC9roOS4dF/kPawe8p52Z8QlGi5D6ETT2rfpufIsKmHvUlll1WV45QoEqzD2dmgyde58IkGc Vm1/CQkod1C+rPK0nol22lxv18fV5zk3WyzRmA88XDHqSjfyLVKFbc+HSmAGdQq9UrstIy1nTTL IE4= X-Google-Smtp-Source: AGHT+IFq3VTmxWgji251bz4UGsDtiQV7j7gWNvPyLVeKzzfvJlc3U1hjrRowv7gV/FWuxhmu5+0iFA== X-Received: by 2002:a05:6000:18ac:b0:382:3afd:1258 with SMTP id ffacd0b85a97d-38260b3ccbemr3491736f8f.8.1732292625467; Fri, 22 Nov 2024 08:23:45 -0800 (PST) Received: from max.int.rpsys.net ([2001:8b0:aba:5f3c:87e7:ee61:98f2:6cd2]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-433b45d4dd6sm100686595e9.24.2024.11.22.08.23.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Nov 2024 08:23:44 -0800 (PST) From: Richard Purdie To: openembedded-core@lists.openembedded.org Subject: [PATCH 4/8] resulttool: Add --logfile-archive option to store mode Date: Fri, 22 Nov 2024 16:23:36 +0000 Message-ID: <20241122162340.2770780-4-richard.purdie@linuxfoundation.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241122162340.2770780-1-richard.purdie@linuxfoundation.org> References: <20241122162340.2770780-1-richard.purdie@linuxfoundation.org> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 22 Nov 2024 16:23:57 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/207632 Storing the log files inside the testresults git repo isn't scaling and isn't really appropriate use of a git repository. Allow these to be optionally stored in a separate filesystem location so the git repo can remain managable. Signed-off-by: Richard Purdie --- scripts/lib/resulttool/store.py | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/scripts/lib/resulttool/store.py b/scripts/lib/resulttool/store.py index 903e29627ab..578910d234d 100644 --- a/scripts/lib/resulttool/store.py +++ b/scripts/lib/resulttool/store.py @@ -74,12 +74,25 @@ def store(args, logger): logger.info('Storing test result into git repository %s' % args.git_dir) - gitarchive.gitarchive(tempdir, args.git_dir, False, False, + excludes = [] + if args.logfile_archive: + excludes = ['*.log', "*.log.zst"] + + tagname = gitarchive.gitarchive(tempdir, args.git_dir, False, False, "Results of {branch}:{commit}", "branch: {branch}\ncommit: {commit}", "{branch}", False, "{branch}/{commit_count}-g{commit}/{tag_number}", 'Test run #{tag_number} of {branch}:{commit}', '', - [], [], False, keywords, logger) + excludes, [], False, keywords, logger) + if args.logfile_archive: + logdir = args.logfile_archive + "/" + tagname + shutil.copytree(tempdir, logdir) + for root, dirs, files in os.walk(logdir): + for name in files: + if not name.endswith(".log"): + continue + f = os.path.join(root, name) + subprocess.run(["zstd", f, "--rm"], check=True, capture_output=True) finally: subprocess.check_call(["rm", "-rf", tempdir]) @@ -107,3 +120,5 @@ def register_commands(subparsers): help='add extra test environment data to each result file configuration') parser_build.add_argument('-r', '--revision', default='', help='only store data for the specified revision') + parser_build.add_argument('-l', '--logfile-archive', default='', + help='directory to separately archive log files along with a copy of the results') From patchwork Fri Nov 22 16:23:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Purdie X-Patchwork-Id: 53007 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 21F78E6917C for ; Fri, 22 Nov 2024 16:23:57 +0000 (UTC) Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) by mx.groups.io with SMTP id smtpd.web10.28284.1732292628763829115 for ; Fri, 22 Nov 2024 08:23:49 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=AM4ubfuB; spf=pass (domain: linuxfoundation.org, ip: 209.85.128.47, mailfrom: richard.purdie@linuxfoundation.org) Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-4315e9e9642so20174615e9.0 for ; Fri, 22 Nov 2024 08:23:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1732292627; x=1732897427; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=9/3uLvWi/Vpo/vDkQ3bt9lwleyws6yVLbPS9TeKLpac=; b=AM4ubfuBR02OuGso4IAazoYtK+iP+nEEF7fzb4N98Px5NhNMNSx9TfOiOGCwM0MTb7 +2GMTEn2rkSaGGwVfVaEhf6/m18fEE3rJmbrNlkcZNMZ7pL8i6kV5r0nDYn5PsuAtHZq 2jMZgXBDXDKEP9mKOFv4AKzjK7jt5FoQqfwLw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732292627; x=1732897427; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9/3uLvWi/Vpo/vDkQ3bt9lwleyws6yVLbPS9TeKLpac=; b=iQp/NeW8P+smS62IbUFQ/t9yiCT0jXMiOQwQxSeLebF0mEy4PI4C7RCrRzecfbpcS8 qowBpf4+nChHyP459VePmdRNkpPHt2G2YNEaEgAhGDB+DN8B1OrcWDOo8Q6BwZonlI3h MT++/4vhNmdGvBtvSopqSC+o7KiINfe/dhQGJDE/jsPqlNENClIOrLXBYnvA8v1VvrnA WnrrrDBFAAxnoWEugjW0c+95oL37yCNPMLRvc7wZGm20p956u/tp9bIbKsu+4Yl9nRL9 J978h6RdTBjdtEsAeswJEMuGmGAxKOOWguWo4862mRJO/I07MwOE/9xv60owwdgGDSRn rHzA== X-Gm-Message-State: AOJu0YyEWRwshpX0fmyNFnNaoLgKHU46CFu2kC+AANivrxaifU3FxJCD hL3ommUYDin+Kp6m7x4dco7JAj6trpxunL+0Im/IjfyAbNbdN5rHPfCh7B1nmnYi+ng1mLpQwwq X X-Gm-Gg: ASbGnctZdj6JjVSBIItx6R5YhuF+oC+YONuYMc7lw1ycQVGHvYH8APM9Ips+9feruo7 ed7l1zjuV5M3L6hGl/JXzOprBWNlGfFCvd3T17ZlLMDTT5rRab3DqcrGmSRmQL+IYel9zjP1iSL MoqXatULI/6QZTrw00uspW/PocX2HIipVdeo6iSmut7RcHqNPeCyL8tl1c4mhRZiVM84eUp1Jkc IY9I8Bujk4lj14fM+goRt36RBcEEQZl3+06Vm792jun4onCTbWBJaiLIuM6KRHNePf3iiB123AH y/w= X-Google-Smtp-Source: AGHT+IESyHB3aPQ3GbCBm0ciI9gVT+ETemMDkeHhol0lzvP0mlmZ38+7gHdquVroS7VAZc8nYyMlBg== X-Received: by 2002:a05:600c:5115:b0:430:57f2:bae5 with SMTP id 5b1f17b1804b1-433ce4ae4e1mr29967315e9.27.1732292626719; Fri, 22 Nov 2024 08:23:46 -0800 (PST) Received: from max.int.rpsys.net ([2001:8b0:aba:5f3c:87e7:ee61:98f2:6cd2]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-433b45d4dd6sm100686595e9.24.2024.11.22.08.23.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Nov 2024 08:23:46 -0800 (PST) From: Richard Purdie To: openembedded-core@lists.openembedded.org Subject: [PATCH 5/8] resulttool: Handle ltp rawlogs as well as ptest Date: Fri, 22 Nov 2024 16:23:37 +0000 Message-ID: <20241122162340.2770780-5-richard.purdie@linuxfoundation.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241122162340.2770780-1-richard.purdie@linuxfoundation.org> References: <20241122162340.2770780-1-richard.purdie@linuxfoundation.org> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 22 Nov 2024 16:23:57 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/207633 Improve the rawlogs handling to include ltp logs as well as the ptest ones to reduce the size of the results git repos. Signed-off-by: Richard Purdie --- scripts/lib/resulttool/resultutils.py | 33 ++++++++++++++++----------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/scripts/lib/resulttool/resultutils.py b/scripts/lib/resulttool/resultutils.py index 8fd4e0a9cf0..b9b93afaa6a 100644 --- a/scripts/lib/resulttool/resultutils.py +++ b/scripts/lib/resulttool/resultutils.py @@ -14,8 +14,11 @@ import scriptpath import copy import urllib.request import posixpath +import logging scriptpath.add_oe_lib_path() +logger = logging.getLogger('resulttool') + flatten_map = { "oeselftest": [], "runtime": [], @@ -38,6 +41,12 @@ store_map = { "manual": ['TEST_TYPE', 'TEST_MODULE', 'MACHINE', 'IMAGE_BASENAME'] } +rawlog_sections = { + "ptestresult.rawlogs": "ptest", + "ltpresult.rawlogs": "ltp", + "ltpposixresult.rawlogs": "ltpposix" +} + def is_url(p): """ Helper for determining if the given path is a URL @@ -108,15 +117,14 @@ def filter_resultsdata(results, resultid): newresults[r][i] = results[r][i] return newresults -def strip_ptestresults(results): +def strip_logs(results): newresults = copy.deepcopy(results) - #for a in newresults2: - # newresults = newresults2[a] for res in newresults: if 'result' not in newresults[res]: continue - if 'ptestresult.rawlogs' in newresults[res]['result']: - del newresults[res]['result']['ptestresult.rawlogs'] + for logtype in rawlog_sections: + if logtype in newresults[res]['result']: + del newresults[res]['result'][logtype] if 'ptestresult.sections' in newresults[res]['result']: for i in newresults[res]['result']['ptestresult.sections']: if 'log' in newresults[res]['result']['ptestresult.sections'][i]: @@ -155,9 +163,6 @@ def generic_get_rawlogs(sectname, results): return None return decode_log(results[sectname]['log']) -def ptestresult_get_rawlogs(results): - return generic_get_rawlogs('ptestresult.rawlogs', results) - def save_resultsdata(results, destdir, fn="testresults.json", ptestjson=False, ptestlogs=False): for res in results: if res: @@ -167,16 +172,18 @@ def save_resultsdata(results, destdir, fn="testresults.json", ptestjson=False, p os.makedirs(os.path.dirname(dst), exist_ok=True) resultsout = results[res] if not ptestjson: - resultsout = strip_ptestresults(results[res]) + resultsout = strip_logs(results[res]) with open(dst, 'w') as f: f.write(json.dumps(resultsout, sort_keys=True, indent=1)) for res2 in results[res]: if ptestlogs and 'result' in results[res][res2]: seriesresults = results[res][res2]['result'] - rawlogs = ptestresult_get_rawlogs(seriesresults) - if rawlogs is not None: - with open(dst.replace(fn, "ptest-raw.log"), "w+") as f: - f.write(rawlogs) + for logtype in rawlog_sections: + logdata = generic_get_rawlogs(logtype, seriesresults) + if logdata is not None: + logger.info("Extracting " + rawlog_sections[logtype] + "-raw.log") + with open(dst.replace(fn, rawlog_sections[logtype] + "-raw.log"), "w+") as f: + f.write(logdata) if 'ptestresult.sections' in seriesresults: for i in seriesresults['ptestresult.sections']: sectionlog = ptestresult_get_log(seriesresults, i) From patchwork Fri Nov 22 16:23:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Purdie X-Patchwork-Id: 53006 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1F8CBE6917E for ; Fri, 22 Nov 2024 16:23:57 +0000 (UTC) Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) by mx.groups.io with SMTP id smtpd.web10.28285.1732292629910717021 for ; Fri, 22 Nov 2024 08:23:50 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=M6o9Cfav; spf=pass (domain: linuxfoundation.org, ip: 209.85.128.49, mailfrom: richard.purdie@linuxfoundation.org) Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-4315df7b43fso20687175e9.0 for ; Fri, 22 Nov 2024 08:23:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1732292628; x=1732897428; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=xoGUqlWhu2l3C2nY20GjuXu4cJ4EM7OwgwDZ2DG7Rro=; b=M6o9CfavM6+1E679UlBkZvGLZL43YNyX048bdkwky9qYAu8zyZi8F2R9IHnB3VvdCk KZcjsKUJtU5nWOKckBrcvb+MCy1IOTa0bq+Fxd4McVRcWnve9p8JF5XFKjXWJQF89GPQ 4PJU3slfIXckxRTVMbSk8jfEp2FtJz/Oc9g2U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732292628; x=1732897428; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xoGUqlWhu2l3C2nY20GjuXu4cJ4EM7OwgwDZ2DG7Rro=; b=uRoRFvrslRHrQc6aSfTjYkOWBfmkq1wV8uyDzVLKBvIi0o2xs+t7JVWUqAsQHWfHM4 J+FkBy8Ws9NM3caiRkxssM6LxO/Q/cTyoTKSCeLr/77YKfRjoWCIDj98f+mc9higQFnk f9ZmwobCEQ58F7xbKbbYJX5Nfuln3t8wQ42E4VKhVYqLFLvz/sWwowsEvuuKOIVXHh+i p1CY10HIdrPyOgmvDq9w3AUcz2OWI8Ju4sTJLHPkBS3iNvih7zL/UOZthf9BYvnMoja/ ZfQ0cirwYVtZmF0SBvZvh5EtQ4j9MJfCVaAV/dEJghElf730mVVFM68sb7JYI2yvVbYs Lxww== X-Gm-Message-State: AOJu0Ywe/ZRErBvalEALBNiaQXUPSGL57jsnDy4TWi1/P5TeOfQW5S1H glvtxv+5mIw4twJBDJmy1kbbXDazWbhSaBn3PYtKteyoqmdAPZnW58K0GqeaabU3W94ZmotRV2v D X-Gm-Gg: ASbGncuFJUiEZSQST8/mqWaLfMykPUqZaEJWUz2zeb1o4tQcItJQQHDyGCiVZikJI50 atuDIjp/iIl+KmKbJELUhQ4hXdBjSHxmkhLxsLZGGajapmCaJN8xmwEDMWBtWCPcgMb60O9j1g8 3PyyTiQWQvFeGsShp0neN0cf4+KvfllgSkF2jL7RX/P7rVLexGO6rTXsOI2VXMB2drxIfz3gEQ+ fy+E7yx2/Gh7WdhTai5YeibZ6WibSOYlr8bXfkK1K/JDdIi/5onRnvRLtNiBJU3kFW67CiMwCdz zKQ= X-Google-Smtp-Source: AGHT+IGrCun365POISXXeIiZzo5oH8sBdwaAhLiS5GZTslzxEpo8txN69uKEXdaCGPDZJBeLN3vwpg== X-Received: by 2002:a05:600c:46c4:b0:432:cbe5:4f09 with SMTP id 5b1f17b1804b1-433ce411003mr32653725e9.4.1732292627852; Fri, 22 Nov 2024 08:23:47 -0800 (PST) Received: from max.int.rpsys.net ([2001:8b0:aba:5f3c:87e7:ee61:98f2:6cd2]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-433b45d4dd6sm100686595e9.24.2024.11.22.08.23.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Nov 2024 08:23:47 -0800 (PST) From: Richard Purdie To: openembedded-core@lists.openembedded.org Subject: [PATCH 6/8] resulttool: Clean up repoducible build logs Date: Fri, 22 Nov 2024 16:23:38 +0000 Message-ID: <20241122162340.2770780-6-richard.purdie@linuxfoundation.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241122162340.2770780-1-richard.purdie@linuxfoundation.org> References: <20241122162340.2770780-1-richard.purdie@linuxfoundation.org> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 22 Nov 2024 16:23:57 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/207634 We've improved the data stored for reproduicible builds. Teach resulttool how to apply those cleanups when reprocessing data so we can reduce results file sizes and make the data easier to process. Signed-off-by: Richard Purdie --- scripts/lib/resulttool/resultutils.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/scripts/lib/resulttool/resultutils.py b/scripts/lib/resulttool/resultutils.py index b9b93afaa6a..9cba8639a39 100644 --- a/scripts/lib/resulttool/resultutils.py +++ b/scripts/lib/resulttool/resultutils.py @@ -131,6 +131,27 @@ def strip_logs(results): del newresults[res]['result']['ptestresult.sections'][i]['log'] return newresults +def handle_cleanups(results): + # Remove pointless path duplication from old format reproducibility results + for res2 in results: + try: + section = results[res2]['result']['reproducible']['files'] + for pkgtype in section: + for filelist in section[pkgtype].copy(): + if section[pkgtype][filelist] and type(section[pkgtype][filelist][0]) == dict: + newlist = [] + for entry in section[pkgtype][filelist]: + newlist.append(entry["reference"].split("/./")[1]) + section[pkgtype][filelist] = newlist + + except KeyError: + pass + # Remove pointless duplicate rawlogs data + try: + del results[res2]['result']['reproducible.rawlogs'] + except KeyError: + pass + def decode_log(logdata): if isinstance(logdata, str): return logdata @@ -173,6 +194,7 @@ def save_resultsdata(results, destdir, fn="testresults.json", ptestjson=False, p resultsout = results[res] if not ptestjson: resultsout = strip_logs(results[res]) + handle_cleanups(resultsout) with open(dst, 'w') as f: f.write(json.dumps(resultsout, sort_keys=True, indent=1)) for res2 in results[res]: From patchwork Fri Nov 22 16:23:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Purdie X-Patchwork-Id: 53005 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 201C8E6917F for ; Fri, 22 Nov 2024 16:23:57 +0000 (UTC) Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) by mx.groups.io with SMTP id smtpd.web11.28643.1732292631390321560 for ; Fri, 22 Nov 2024 08:23:51 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=g/CDgpuS; spf=pass (domain: linuxfoundation.org, ip: 209.85.128.46, mailfrom: richard.purdie@linuxfoundation.org) Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-4319399a411so21114115e9.2 for ; Fri, 22 Nov 2024 08:23:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1732292629; x=1732897429; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=VUsf0yt975GZ44SKSHbVVmSBL6YiPCrxYApycCyKdQU=; b=g/CDgpuS/rjnsBfwcR8TaSXT/SspYAQMdWYjbfaDqj3RWFctvp/JLsEwCi8s/IIuCL y+p2nCJf8EIfZcQTVnJtQnQLSYHgpRMZ19Nl/elTjBlpYLHIErSehe1B85ouQGGmPfI2 ajr3oAwe8ExDIoSu3RHw0Xj6dXdYu6wQ/C8G0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732292629; x=1732897429; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VUsf0yt975GZ44SKSHbVVmSBL6YiPCrxYApycCyKdQU=; b=t0wJ8xq+72Ox6+huVW0Fl8sOUwCrlEF0hqXbUQEpUw0U7W/AZU8XQ5jBgWdqmeHhmN HHjqcBW5MrBZ+ZYvIZbSSf/QvMd+Wli+bqvnze47elw1Q4LqtBdCrr3cz10RKoKGwiB1 uSUlQLF08RK68Enf+wJ3BSpgAWZhcSbQFRcHA0x3OE2aI2sumt76v6aBVleMXmylnYXA 10+6tqFeXwUCXxkPqGQGyR1ShFpTzDcQbk/R5gtDB0N5XKYTIubJo+G3GDLHaI7Rb3BM JnNHgFXdiVGUwrYZWgsQNpFHU1oU6etD3cfeWBnVCjLEwZAhkanxBM3C3nhKV+Z3G5Sm YfFg== X-Gm-Message-State: AOJu0YyCbg68sZl20DFUe0DSW2AFhzi5ZvjkrACwRrqho8p69hYl/Dhd WQ+YYLg6pCxRNnG6U2mh+KaDv9nrL8kMFvBOcurMYK+fVGOoaIT94s+J7bKC4wjVwijfrBH6j/W x X-Gm-Gg: ASbGncsG7NuDy3k8TvGoyyPbaIq0Hn6qs3hnDuHVwmyCfDURgoISz/QER31II2B1jow GLSG8TD73VtYQ7Q+ndPcvvQ75t2dFSx6uLkxXnSxWTnSlGq3NKzZppHjXBt6zJcG+AKCMZ9S/KM PdOVx0fh0LKA2KoTY0bLvV9aoU9Cze6ZC24LxyZ9GmL1BxFyzAHo++oOV9CHDq0tCpKcq+coscd uivtlywj+fyKwvd0QoeCWM4v4mlnfayocJgWn64kRt6+a9jx42bB5SPRj8v+GZYnarLd6UKroFC Av8= X-Google-Smtp-Source: AGHT+IHjs3oJPURqv7s180e3cTrs8acLDcM3/f9vmRitrY/wXuBuE4amCa95F0LBgiAcyv7jEY1SSQ== X-Received: by 2002:a05:600c:1908:b0:426:6455:f124 with SMTP id 5b1f17b1804b1-433ce3983c6mr32615425e9.0.1732292629361; Fri, 22 Nov 2024 08:23:49 -0800 (PST) Received: from max.int.rpsys.net ([2001:8b0:aba:5f3c:87e7:ee61:98f2:6cd2]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-433b45d4dd6sm100686595e9.24.2024.11.22.08.23.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Nov 2024 08:23:48 -0800 (PST) From: Richard Purdie To: openembedded-core@lists.openembedded.org Subject: [PATCH 7/8] resulttool: Trim the precision of duration information Date: Fri, 22 Nov 2024 16:23:39 +0000 Message-ID: <20241122162340.2770780-7-richard.purdie@linuxfoundation.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241122162340.2770780-1-richard.purdie@linuxfoundation.org> References: <20241122162340.2770780-1-richard.purdie@linuxfoundation.org> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 22 Nov 2024 16:23:57 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/207635 The duration values have pointless amounts of precision. Removing some of the least significant digits reduces result size and makes the results easier to read. Signed-off-by: Richard Purdie --- scripts/lib/resulttool/resultutils.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/scripts/lib/resulttool/resultutils.py b/scripts/lib/resulttool/resultutils.py index 9cba8639a39..760e426de0c 100644 --- a/scripts/lib/resulttool/resultutils.py +++ b/scripts/lib/resulttool/resultutils.py @@ -131,6 +131,22 @@ def strip_logs(results): del newresults[res]['result']['ptestresult.sections'][i]['log'] return newresults +# For timing numbers, crazy amounts of precision don't make sense and just confuse +# the logs. For numbers over 1, trim to 3 decimal places, for numbers less than 1, +# trim to 4 significant digits +def trim_durations(results): + for res in results: + if 'result' not in results[res]: + continue + for entry in results[res]['result']: + if 'duration' in results[res]['result'][entry]: + duration = results[res]['result'][entry]['duration'] + if duration > 1: + results[res]['result'][entry]['duration'] = float("%.3f" % duration) + elif duration < 1: + results[res]['result'][entry]['duration'] = float("%.4g" % duration) + return results + def handle_cleanups(results): # Remove pointless path duplication from old format reproducibility results for res2 in results: @@ -194,6 +210,7 @@ def save_resultsdata(results, destdir, fn="testresults.json", ptestjson=False, p resultsout = results[res] if not ptestjson: resultsout = strip_logs(results[res]) + trim_durations(resultsout) handle_cleanups(resultsout) with open(dst, 'w') as f: f.write(json.dumps(resultsout, sort_keys=True, indent=1)) From patchwork Fri Nov 22 16:23:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Purdie X-Patchwork-Id: 53003 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 01921E69176 for ; Fri, 22 Nov 2024 16:23:57 +0000 (UTC) Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) by mx.groups.io with SMTP id smtpd.web10.28288.1732292633184899107 for ; Fri, 22 Nov 2024 08:23:53 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=dT3ABtgj; spf=pass (domain: linuxfoundation.org, ip: 209.85.128.46, mailfrom: richard.purdie@linuxfoundation.org) Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-43169902057so19994735e9.0 for ; Fri, 22 Nov 2024 08:23:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1732292631; x=1732897431; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=MkR0XJj424CkRmIubfWa8Kfjsh/Ssz2uXeVZLr7q7ws=; b=dT3ABtgjEO/79bzCoka036SQ52day8I8RJAhpmzGNTecP+DWeUOC/Oe6OiLR5AbA0J D+J240nWbxs13joFha+Z9oTiqCpNQeQYiXly/qsahz5kdKxHPHYfsmalLZstIzdkeQT5 JSBST9FgIWJaCjjX5BkSiLG/Rehapp66Chco8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732292631; x=1732897431; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MkR0XJj424CkRmIubfWa8Kfjsh/Ssz2uXeVZLr7q7ws=; b=Q+gpfBFc/W7dWmtxBN5LNTjNzsvGKFxPlWOhHKXIi5I6H048/734c8u3PFJqUgGpa8 x1P82ZttIZ4a1PC+XPMB6PzuVIMm1qfclIZiFuR4r+1vNmv8w8WMY8mhlunkiGN9WtG5 W96RZ/4wjqQ7EKylIS9V/ympgRvshGOgJ9Xdf5+wGVs+LxcgGPNTc+uoBBmDpwSfTcmG Nh3yJ14BHC53QrZ9lD5bF3CERFgBm1C8/o7oOBce8rbHG5ehTIsajPm6v1mDIqFeokZM sbth5iBixyEcIFvkh2pVvBdAr6QKFnPT3KUNKdufnRtHUOe6m1jEVNfouHh4KGbOd03S mggQ== X-Gm-Message-State: AOJu0YzEj/CgBxP8b41jxAysISAA0tIXyMCSA9hw5iXaiyeuTYu9TQiO a0nMB8MBySB8IcwAWzGctMjHfgHVTAWGezok+gt6rJaQs1/nHuxXjz2P6FTnuaVYZC0nBP+5KV7 G X-Gm-Gg: ASbGncv7li07dLhbKCSuGITi79aboswtJN0ds0O+PCfSMoA/iXAHD92JRR5LkRSasSD DRlqefu3EVZOHjF1x5uGSXWLX/uRfC3PzpV0MbnZ6MWVZLjOrV3Nn+CC6+06U3Mmp4DUzxVK2Ro rLN59mgeqpgDJGKYaireFLslQLgIUBveTI2yv0lb4rFNe3F01MSYws37mgTjsJD5p5z7RLosjn6 3jJ9BfUuQvA4KUQk3lDcozsFTALEDjjIHfm7HRIaDfJFM7yfws/u/9I98e7DesZ4hj+43rP1P7M QEM= X-Google-Smtp-Source: AGHT+IH3EDnfCRG7FEq+F5BCB7vuOtq9hWIGdKUtyRra2gp4CaQE3/FXKydNChnYQ7ePotKBsjKlxw== X-Received: by 2002:a05:600c:4684:b0:42c:ae30:fc4d with SMTP id 5b1f17b1804b1-433ce417fa7mr28899135e9.7.1732292631245; Fri, 22 Nov 2024 08:23:51 -0800 (PST) Received: from max.int.rpsys.net ([2001:8b0:aba:5f3c:87e7:ee61:98f2:6cd2]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-433b45d4dd6sm100686595e9.24.2024.11.22.08.23.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Nov 2024 08:23:50 -0800 (PST) From: Richard Purdie To: openembedded-core@lists.openembedded.org Subject: [PATCH 8/8] resulttool: Improve repo layout for oeselftest results Date: Fri, 22 Nov 2024 16:23:40 +0000 Message-ID: <20241122162340.2770780-8-richard.purdie@linuxfoundation.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241122162340.2770780-1-richard.purdie@linuxfoundation.org> References: <20241122162340.2770780-1-richard.purdie@linuxfoundation.org> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 22 Nov 2024 16:23:57 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/207636 Having all oe-selftest results on top of each other results in a large 640MB json file which is hard to use. Split the results out per machine and test type. This also stops the toolchain raw logs from overwriting each other meaning more than one MACHINE is preserved. Signed-off-by: Richard Purdie --- scripts/lib/resulttool/resultutils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/lib/resulttool/resultutils.py b/scripts/lib/resulttool/resultutils.py index 760e426de0c..b8fc79a6acd 100644 --- a/scripts/lib/resulttool/resultutils.py +++ b/scripts/lib/resulttool/resultutils.py @@ -34,7 +34,7 @@ regression_map = { "manual": ['TEST_TYPE', 'TEST_MODULE', 'IMAGE_BASENAME', 'MACHINE'] } store_map = { - "oeselftest": ['TEST_TYPE'], + "oeselftest": ['TEST_TYPE', 'TESTSERIES', 'MACHINE'], "runtime": ['TEST_TYPE', 'DISTRO', 'MACHINE', 'IMAGE_BASENAME'], "sdk": ['TEST_TYPE', 'MACHINE', 'SDKMACHINE', 'IMAGE_BASENAME'], "sdkext": ['TEST_TYPE', 'MACHINE', 'SDKMACHINE', 'IMAGE_BASENAME'],