public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: henning.schild@siemens.com
To: isar-users@googlegroups.com
Cc: felix.moessbauer@siemens.com,
	"Roberto A . Foglietta" <roberto.foglietta@gmail.com>,
	Joe MacDonald <Joe_MacDonald@mentor.com>,
	Henning Schild <henning.schild@siemens.com>
Subject: [PATCH v4 5/5] CI: expect a message about filesystem resize vom expand script
Date: Tue, 13 Dec 2022 11:15:09 +0100	[thread overview]
Message-ID: <20221213101509.535-6-henning.schild@siemens.com> (raw)
In-Reply-To: <20221213101509.535-1-henning.schild@siemens.com>

From: Henning Schild <henning.schild@siemens.com>

We have added the expand-on-first-boot recipe and some space to grow to
our example images. So now any image using wic should "expand" on its
first boot. And the kernel actually leaves a message for us to read, at
least on debian but not on ubuntu.

Signed-off-by: Henning Schild <henning.schild@siemens.com>
---
 testsuite/cibuilder.py | 23 ++++++++++++++++++++---
 1 file changed, 20 insertions(+), 3 deletions(-)

diff --git a/testsuite/cibuilder.py b/testsuite/cibuilder.py
index 07a9edc56d9c..8b67815442a8 100755
--- a/testsuite/cibuilder.py
+++ b/testsuite/cibuilder.py
@@ -231,6 +231,20 @@ class CIBuilder(Test):
         login_prompt = b'isar login:'
         # the printk of recipes-kernel/example-module
         module_output = b'Just an example'
+        resize_output = None
+
+        bb_output = start_vm.get_bitbake_env(arch, distro).decode()
+        wks_file = start_vm.get_bitbake_var(bb_output, 'WKS_FILE')
+        if wks_file:
+            bbdistro = start_vm.get_bitbake_var(bb_output, 'DISTRO')
+            # ubuntu is less verbose so we do not see the message
+            # /etc/sysctl.d/10-console-messages.conf
+            if bbdistro and "ubuntu" not in bbdistro:
+                if "sdimage-efi-sd" in wks_file:
+                    # output we see when expand-on-first-boot runs on ext4
+                    resize_output = b'resized filesystem to'
+                if "sdimage-efi-btrfs" in wks_file:
+                    resize_output = b': resize device '
 
         timeout = time.time() + int(time_to_wait)
 
@@ -265,8 +279,11 @@ class CIBuilder(Test):
             with open(output_file, "rb") as f1:
                 data = f1.read()
                 if module_output in data and login_prompt in data:
-                    return
-                else:
-                    app_log.error(data.decode(errors='replace'))
+                    if resize_output:
+                        if resize_output in data:
+                            return
+                    else:
+                        return
+                app_log.error(data.decode(errors='replace'))
 
         self.fail('Log ' + output_file)
-- 
2.37.4


  parent reply	other threads:[~2022-12-13 10:15 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-13 10:15 [PATCH v4 0/5] expand-on-first-boot btrfs and CI testing henning.schild
2022-12-13 10:15 ` [PATCH v4 1/5] expand-on-first-boot: support resizing a btrfs henning.schild
2022-12-13 16:45   ` Roberto A. Foglietta
2022-12-13 17:18     ` Henning Schild
2022-12-13 20:44       ` Roberto A. Foglietta
2022-12-13 21:05         ` Henning Schild
2022-12-13 21:20           ` Roberto A. Foglietta
2022-12-14  3:33             ` Moessbauer, Felix
2022-12-14  6:50               ` Roberto A. Foglietta
2022-12-14  7:10                 ` Roberto A. Foglietta
2022-12-13 17:01   ` Roberto A. Foglietta
2022-12-13 21:22     ` Henning Schild
2022-12-13 22:15       ` Roberto A. Foglietta
2022-12-13 10:15 ` [PATCH v4 2/5] meta-isar: introduce an example to use btrfs henning.schild
2022-12-13 10:15 ` [PATCH v4 3/5] CI: improve cibuilder readability henning.schild
2022-12-13 10:15 ` [PATCH v4 4/5] meta-isar: install expand-on-first-boot in most images and add space henning.schild
2022-12-13 10:15 ` henning.schild [this message]
2022-12-13 10:25 ` [PATCH v4 0/5] expand-on-first-boot btrfs and CI testing Henning Schild
2022-12-20  9:37   ` Uladzimir Bely
2022-12-20 15:08     ` Henning Schild
2022-12-21 10:25       ` Uladzimir Bely
2022-12-21 12:13         ` Henning Schild

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=20221213101509.535-6-henning.schild@siemens.com \
    --to=henning.schild@siemens.com \
    --cc=Joe_MacDonald@mentor.com \
    --cc=felix.moessbauer@siemens.com \
    --cc=isar-users@googlegroups.com \
    --cc=roberto.foglietta@gmail.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