public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: kergoth@gmail.com
To: isar-users@googlegroups.com
Cc: Christopher Larson <chris.larson@siemens.com>
Subject: [PATCH 0/9] Add more signature cachability tests to the testsuite
Date: Tue,  2 Apr 2024 17:28:04 +0000	[thread overview]
Message-ID: <20240402172813.418770-1-chris.larson@siemens.com> (raw)

From: Christopher Larson <chris.larson@siemens.com>

This series improves isar-sstate's lint command to support checking sigdata in tmp/stamps and to check for absolute paths in SRC_URI, and adds an additional test to the testsuite to exercise this capability. The new test checks for signature cachability issues much more quickly, as it does so without a full build, so it checks more target configurations. This uses bitbake's `-S none` option to avoid building anything, and then runs isar-sstate lint on the resulting sigdata in tmp/stamps.

This test will accept a verbose parameter on the command-line to pass --verbose to isar-sstate lint, which will show the "other" absolute paths found, not just source and build directory. This series also fixes two of the failures which were identified by the new test.

Here we can see the issues identified by the new test, which are fixed in this series:
```
$ avocado run testsuite/citest.py -t signatures --max-parallel-tasks=1
JOB ID     : 3a3308967946663d9b239f638b030502fa80ef0a
JOB LOG    : /builder/avocado/job-results/job-2024-03-29T19.24-3a33089/job.log
 (1/1) testsuite/citest.py:SignatureTest.test_signature_lint: STARTED
 (1/1) testsuite/citest.py:SignatureTest.test_signature_lint: FAIL: Detected cachability issues (42.93 s)
RESULTS    : PASS 0 | ERROR 0 | FAIL 1 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
JOB TIME   : 44.63 s

Test summary:
1-testsuite/citest.py:SignatureTest.test_signature_lint: FAIL
```

Applicable section of the avocado full.log:
```
1-testsuite/citest.py:SignatureTest.test_signature_lint: 2024-03-29 19:25:10,818 avocado.test cibase           L0142 ERROR| ==== issues found in ubuntu-focal-amd64:isar-bootstrap-target:unpack (95af4581) ====
1-testsuite/citest.py:SignatureTest.test_signature_lint: 2024-03-29 19:25:10,818 avocado.test cibase           L0142 ERROR| -> path in sources-dir: SRC_URI entry "file:///home/kergoth/Code/industrial/signatures/isar/meta-isar/conf/distro/ubuntu.public.key;sha256sum=36a38199a4bf4eae1e7f574891f7dfcb79b91b87a33a499383265e1224b5e989"
1-testsuite/citest.py:SignatureTest.test_signature_lint: 2024-03-29 19:25:10,818 avocado.test cibase           L0142 ERROR| ==== issues found in ubuntu-focal-amd64:isar-bootstrap-target:fetch (e8249cb2) ====
1-testsuite/citest.py:SignatureTest.test_signature_lint: 2024-03-29 19:25:10,818 avocado.test cibase           L0142 ERROR| -> path in sources-dir: SRC_URI entry "file:///home/kergoth/Code/industrial/signatures/isar/meta-isar/conf/distro/ubuntu.public.key;sha256sum=36a38199a4bf4eae1e7f574891f7dfcb79b91b87a33a499383265e1224b5e989"
1-testsuite/citest.py:SignatureTest.test_signature_lint: 2024-03-29 19:25:10,818 avocado.test cibase           L0142 ERROR| ==== issues found in debian-bullseye-amd64:isar-ci-ssh-setup:install (1c0a8b21) ====
1-testsuite/citest.py:SignatureTest.test_signature_lint: 2024-03-29 19:25:10,818 avocado.test cibase           L0142 ERROR| -> path in sources-dir: TESTSUITEDIR = "/home/kergoth/Code/industrial/signatures/isar/testsuite"
1-testsuite/citest.py:SignatureTest.test_signature_lint: 2024-03-29 19:25:10,818 avocado.test cibase           L0142 ERROR| found cachability issues (scanned 602 signatures)
1-testsuite/citest.py:SignatureTest.test_signature_lint: 2024-03-29 19:25:10,818 avocado.test cibase           L0142 ERROR| -> absolute paths: sources-dir 3, build-dir 0, other 184
```

If we strip off the prefix for legibility:
```
ERROR| ==== issues found in ubuntu-focal-amd64:isar-bootstrap-target:unpack (95af4581) ====
ERROR| -> path in sources-dir: SRC_URI entry "file:///home/kergoth/Code/industrial/signatures/isar/meta-isar/conf/distro/ubuntu.public.key;sha256sum=36a38199a4bf4eae1e7f574891f7dfcb79b91b87a33a499383265e1224b5e989"
ERROR| ==== issues found in ubuntu-focal-amd64:isar-bootstrap-target:fetch (e8249cb2) ====
ERROR| -> path in sources-dir: SRC_URI entry "file:///home/kergoth/Code/industrial/signatures/isar/meta-isar/conf/distro/ubuntu.public.key;sha256sum=36a38199a4bf4eae1e7f574891f7dfcb79b91b87a33a499383265e1224b5e989"
ERROR| ==== issues found in debian-bullseye-amd64:isar-ci-ssh-setup:install (1c0a8b21) ====
ERROR| -> path in sources-dir: TESTSUITEDIR = "/home/kergoth/Code/industrial/signatures/isar/testsuite"
ERROR| found cachability issues (scanned 602 signatures)
ERROR| -> absolute paths: sources-dir 3, build-dir 0, other 184
```

The sstate/signatures tests were run for each commit in this series using `git rebase -x` to ensure it does not break a bisect.

I welcome any and all feedback on this. In particular I don't love extending the hardcoded list of image tasks being ignored in isar-sstate lint, but it's a start. I'm open to suggestions.

Christopher Larson (9):
  isar-bootstrap: avoid forced early expansion of key vars
  isar-ci-ssh-setup: avoid abs path in signatures
  isar-sstate: lint: check for absolute paths in SRC_URI
  isar-sstate: lint: add support for checking stamps
  isar-sstate: lint: ignore more image tasks
  isar-sstate: add --excluded-tasks argument
  cibuilder.py: add -S support to the bitbake method
  testsuite: add perform_signature_lint method
  testsuite: add signature cachability checks

 .../isar-ci-ssh-setup_0.1.bb                  |  3 +
 .../isar-bootstrap/isar-bootstrap.inc         |  8 ++-
 scripts/isar-sstate                           | 60 +++++++++++++++----
 testsuite/cibase.py                           | 19 ++++++
 testsuite/cibuilder.py                        |  5 +-
 testsuite/citest.py                           | 22 ++++++-
 6 files changed, 100 insertions(+), 17 deletions(-)

-- 
2.39.2


             reply	other threads:[~2024-04-02 17:28 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-02 17:28 kergoth [this message]
2024-04-02 17:28 ` [PATCH 1/9] isar-bootstrap: avoid forced early expansion of key vars kergoth
2024-04-03  6:54   ` MOESSBAUER, Felix
2024-04-03 21:42     ` Larson, Chris
2024-04-04  6:26       ` MOESSBAUER, Felix
2024-04-02 17:28 ` [PATCH 2/9] isar-ci-ssh-setup: avoid abs path in signatures kergoth
2024-04-02 17:28 ` [PATCH 3/9] isar-sstate: lint: check for absolute paths in SRC_URI kergoth
2024-04-03  6:56   ` MOESSBAUER, Felix
2024-04-02 17:28 ` [PATCH 4/9] isar-sstate: lint: add support for checking stamps kergoth
2024-04-03  7:02   ` MOESSBAUER, Felix
2024-04-03 21:42     ` Larson, Chris
2024-04-02 17:28 ` [PATCH 5/9] isar-sstate: lint: ignore more image tasks kergoth
2024-04-03  7:08   ` MOESSBAUER, Felix
2024-04-02 17:28 ` [PATCH 6/9] isar-sstate: add --excluded-tasks argument kergoth
2024-04-03  7:10   ` MOESSBAUER, Felix
2024-04-03 21:41     ` Larson, Chris
2024-04-03 21:44     ` Larson, Chris
2024-04-04  6:28       ` MOESSBAUER, Felix
2024-04-02 17:28 ` [PATCH 7/9] cibuilder.py: add -S support to the bitbake method kergoth
2024-04-03  7:12   ` MOESSBAUER, Felix
2024-04-03 21:41     ` Larson, Chris
2024-04-02 17:28 ` [PATCH 8/9] testsuite: add perform_signature_lint method kergoth
2024-04-02 17:28 ` [PATCH 9/9] testsuite: add signature cachability checks kergoth

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=20240402172813.418770-1-chris.larson@siemens.com \
    --to=kergoth@gmail.com \
    --cc=chris.larson@siemens.com \
    --cc=isar-users@googlegroups.com \
    /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