public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: "'Felix Moessbauer' via isar-users" <isar-users@googlegroups.com>
To: isar-users@googlegroups.com
Cc: Felix Moessbauer <felix.moessbauer@siemens.com>
Subject: [PATCH 1/2] testsuite: add support to run testsuite against specific SDE
Date: Tue, 17 Nov 2026 13:02:59 +0100	[thread overview]
Message-ID: <20261117120300.374231-2-felix.moessbauer@siemens.com> (raw)
In-Reply-To: <20261117120300.374231-1-felix.moessbauer@siemens.com>

The testsuite currently runs most tests against the upstream mirrors. By
that, it is executed against a moving baseline. This further is
problematic if an substantially older sstate cache is used during
bootstrapping, as then the referenced .debs are no longer available on
the mirrors.

We now add support to run the testsuite against a specific timestamp.
This can be used both for reproducing sporadic issues, as well as for
test speedup when running with an sstate cache. As some Ubuntu targets
do not have a working and stable snapshot mirror, we skip these in this
case.

Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
 testsuite/README.md    |  2 ++
 testsuite/cibuilder.py |  7 +++++++
 testsuite/citest.py    | 33 ++++++++++++++++++++++++++++-----
 3 files changed, 37 insertions(+), 5 deletions(-)

diff --git a/testsuite/README.md b/testsuite/README.md
index bd9e998a..07bcfaf2 100644
--- a/testsuite/README.md
+++ b/testsuite/README.md
@@ -36,6 +36,8 @@ To generate a kas configuration for manual debugging, add `-p kasconfig=1`.
 The configuration is written when the test starts to
 `{build_dir}/kas-{testname}.yaml`.
 
+To build against a specific Debian snapshot date, add `-p sde=<SOURCE_DATE_EPOCH>`.
+
 ## Fast build test
 
 ```
diff --git a/testsuite/cibuilder.py b/testsuite/cibuilder.py
index 0565f158..e810910a 100755
--- a/testsuite/cibuilder.py
+++ b/testsuite/cibuilder.py
@@ -55,6 +55,8 @@ class CanBeFinished(Exception):
 class CIBuilder(Test):
     def setUp(self):
         super(CIBuilder, self).setUp()
+        self.sde = int(self.params.get('sde', default=0))
+        self.use_apt_snapshot = self.sde != 0
         job_log = os.path.join(os.path.dirname(self.logdir), '..', 'job.log')
         self._file_handler = logging.FileHandler(filename=job_log)
         self._file_handler.setLevel(logging.ERROR)
@@ -156,6 +158,11 @@ class CIBuilder(Test):
         if not rootless:
             rootless = bool(int(self.params.get('rootless', default=0)))
 
+        if not source_date_epoch and self.sde:
+            source_date_epoch = self.sde
+            use_apt_snapshot = True
+        self.use_apt_snapshot = use_apt_snapshot
+
         # set those to "" to not set dir value but use system default
         if dl_dir is None:
             dl_dir = os.getenv('DL_DIR')
diff --git a/testsuite/citest.py b/testsuite/citest.py
index 5918a5a4..db907e17 100644
--- a/testsuite/citest.py
+++ b/testsuite/citest.py
@@ -348,10 +348,13 @@ class CrossTest(CIBaseTest):
             'mc:qemuarm-bookworm:isar-image-ci',
             'mc:qemuamd64-trixie:isar-image-base',
             'mc:qemuarm64-trixie:isar-image-base',
-            'mc:qemuarm64-focal:isar-image-base',
             'mc:nanopi-neo-efi-bookworm:isar-image-base',
             'mc:qemuamd64-resolute:isar-image-base',
         ]
+        if not self.use_apt_snapshot:
+            targets += [
+                'mc:qemuarm64-focal:isar-image-base',
+            ]
 
         self.init()
         self.perform_build_test(targets)
@@ -470,6 +473,9 @@ class CrossTest(CIBaseTest):
         """
         :avocado: tags=startvm
         """
+        if self.use_apt_snapshot:
+            self.cancel('arm64 focal not supported with apt snapshot')
+
         self.init()
         self.vm_start('arm64', 'focal')
 
@@ -528,10 +534,13 @@ class CrossTest(CIBaseTest):
             'mc:stm32mp15x-bullseye:kselftest',
             'mc:qemuarm-bookworm:kselftest',
             'mc:qemuarm64-bookworm:kselftest',
-            'mc:qemuarm64-focal:kselftest',
             'mc:nanopi-neo-efi-trixie:kselftest',
             'mc:phyboard-mira-trixie:kselftest',
         ]
+        if not self.use_apt_snapshot:
+            targets += [
+                'mc:qemuarm64-focal:kselftest',
+            ]
 
         self.init()
         self.perform_build_test(targets)
@@ -596,8 +605,11 @@ class CrossTest(CIBaseTest):
         """
         targets = [
             'mc:qemuriscv64-trixie:isar-image-ci',
-            'mc:qemuriscv64-resolute:isar-image-ci',
         ]
+        if not self.use_apt_snapshot:
+            targets += [
+                'mc:qemuriscv64-resolute:isar-image-ci',
+            ]
 
         self.init()
         try:
@@ -619,6 +631,8 @@ class CrossTest(CIBaseTest):
         """
         :avocado: tags=startvm,riscv64
         """
+        if self.use_apt_snapshot:
+            self.cancel('riscv64 resolute not supported with apt snapshot')
         self.init()
         try:
             self.vm_start('riscv64', 'resolute', image='isar-image-ci')
@@ -696,6 +710,8 @@ class UbuntuTest(CIBaseTest):
         return machine in ('qemuamd64', 'qemuarm64')
 
     def test_ubuntu_bootstrap_mirror(self):
+        if self.use_apt_snapshot:
+            self.cancel('snapshots enabled, but explicit no-snapshot test')
         self.init()
         self.perform_build_test(self.bootstrap_targets())
 
@@ -1105,12 +1121,15 @@ class NoCrossTest(CIBaseTest):
             'mc:hikey-bookworm:isar-image-base',
             'mc:hikey-trixie:isar-image-base',
             'mc:beagleplay-bookworm:isar-image-base',
-            'mc:qemuarm64-noble:isar-image-base',
             'mc:qemuamd64-noble:isar-image-base',
             'mc:qemuamd64-jammy:isar-image-base',
-            'mc:qemuarm64-jammy:isar-image-base',
             'mc:x86-pc-bookworm:isar-image-base',
         ]
+        if not self.use_apt_snapshot:
+            targets += [
+                'mc:qemuarm64-noble:isar-image-base',
+                'mc:qemuarm64-jammy:isar-image-base',
+            ]
 
         self.init()
         self.perform_build_test(targets, cross=False)
@@ -1333,6 +1352,8 @@ class NoCrossTest(CIBaseTest):
         """
         :avocado: tags=startvm
         """
+        if self.use_apt_snapshot:
+            self.cancel('arm64 noble not supported with apt snapshot')
         self.init()
         self.vm_start('arm64', 'noble')
 
@@ -1354,6 +1375,8 @@ class NoCrossTest(CIBaseTest):
         """
         :avocado: tags=startvm
         """
+        if self.use_apt_snapshot:
+            self.cancel('arm64 jammy not supported with apt snapshot')
         self.init()
         self.vm_start('arm64', 'jammy')
 
-- 
2.55.0

-- 
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/20261117120300.374231-2-felix.moessbauer%40siemens.com.

  reply	other threads:[~2026-11-17 12:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-17 12:02 [PATCH 0/2] Isolate test classes, make them reproducible 'Felix Moessbauer' via isar-users
2026-11-17 12:02 ` 'Felix Moessbauer' via isar-users [this message]
2026-11-17 12:03 ` [PATCH 2/2] testsuite: cleanup artifacts if not requested otherwise 'Felix Moessbauer' via isar-users

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=20261117120300.374231-2-felix.moessbauer@siemens.com \
    --to=isar-users@googlegroups.com \
    --cc=felix.moessbauer@siemens.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