public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Uladzimir Bely <ubely@ilbers.de>
To: isar-users@googlegroups.com
Subject: [PATCH 01/11] testsuite: Fix failing hostname service in qemu guest
Date: Fri, 13 Jan 2023 08:19:32 +0100	[thread overview]
Message-ID: <20230113071942.22506-2-ubely@ilbers.de> (raw)
In-Reply-To: <20230113071942.22506-1-ubely@ilbers.de>

Hostname service in qemu may fail due to namespace issues. It happens
only when qemu subprocess run with `shell=False` (default).

```
systemctl status systemd-hostnamed.service
...
Failed to set up mount namespacing: /run/systemd/unit-root/dev:
     Read-only file system
Failed at step NAMESPACE spawning /lib/systemd/systemd-hostnamed:
    Read-only file system
Main process exited, code=exited, status=226/NAMESPACE
...
```
The issue was caught in a downstream, not Isar image itself.

Signed-off-by: Uladzimir Bely <ubely@ilbers.de>
---
 testsuite/cibuilder.py | 5 +++--
 testsuite/start_vm.py  | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/testsuite/cibuilder.py b/testsuite/cibuilder.py
index 2e4702ac..6a3cf052 100755
--- a/testsuite/cibuilder.py
+++ b/testsuite/cibuilder.py
@@ -253,8 +253,9 @@ class CIBuilder(Test):
 
         timeout = time.time() + int(time_to_wait)
 
-        p1 = subprocess.Popen(cmdline, stdout=subprocess.PIPE,
-                              stderr=subprocess.PIPE, universal_newlines=True)
+        p1 = subprocess.Popen('exec ' + ' '.join(cmdline), shell=True,
+                              stdout=subprocess.PIPE, stderr=subprocess.PIPE,
+                              universal_newlines=True)
         try:
             poller = select.poll()
             poller.register(p1.stdout, select.POLLIN)
diff --git a/testsuite/start_vm.py b/testsuite/start_vm.py
index 593e2607..82fe489e 100755
--- a/testsuite/start_vm.py
+++ b/testsuite/start_vm.py
@@ -92,7 +92,7 @@ def start_qemu(arch, build, distro, out, pid, enforce_pcbios):
     cmdline.insert(1, '-nographic')
 
     print(cmdline)
-    p1 = subprocess.call(cmdline)
+    p1 = subprocess.call('exec ' + ' '.join(cmdline), shell=True)
 
 if __name__ == "__main__":
     parser = argparse.ArgumentParser()
-- 
2.20.1


  reply	other threads:[~2023-01-13  7:19 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-13  7:19 [PATCH 00/11] Support running custom commands in VM Uladzimir Bely
2023-01-13  7:19 ` Uladzimir Bely [this message]
2023-01-13  7:19 ` [PATCH 02/11] testsuite: Allow custom image names in start_vm.py Uladzimir Bely
2023-01-24  6:59   ` Henning Schild
2023-01-13  7:19 ` [PATCH 03/11] testsuite: Fix terminal broken after run test executed Uladzimir Bely
2023-01-13  7:19 ` [PATCH 04/11] testsuite: Add SSH key pair for using in CI Uladzimir Bely
2023-01-13  7:19 ` [PATCH 05/11] image-account-extension: Add copy-ci-key flag for user Uladzimir Bely
2023-01-24  7:09   ` Henning Schild
2023-01-24  7:18     ` Henning Schild
2023-01-25  7:36       ` Uladzimir Bely
2023-01-25  8:45         ` Henning Schild
2023-01-13  7:19 ` [PATCH 06/11] meta-isar: Fix PCI bus initialization in qemuarm machine Uladzimir Bely
2023-02-08 13:03   ` Uladzimir Bely
2023-01-13  7:19 ` [PATCH 07/11] testsuite: Use random free port for qemu SSH forwarding Uladzimir Bely
2023-01-24  7:11   ` Henning Schild
2023-02-08 13:04   ` Uladzimir Bely
2023-01-13  7:19 ` [PATCH 08/11] testsuite: Support running custom commands in VM Uladzimir Bely
2023-01-24  7:14   ` Henning Schild
2023-01-24  7:14     ` Henning Schild
2023-01-13  7:19 ` [PATCH 09/11] meta-isar: Use a separate image recipe in CI Uladzimir Bely
2023-01-13  7:19 ` [PATCH 10/11] isar-image-ci: Make ethernet inerface auto bring up in ubuntu-focal Uladzimir Bely
2023-01-24  7:24   ` Henning Schild
2023-01-24  7:27     ` Henning Schild
2023-01-13  7:19 ` [PATCH 11/11] testsuite: Run custom commands on some qemu targets Uladzimir Bely
2023-01-24  7:39   ` 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=20230113071942.22506-2-ubely@ilbers.de \
    --to=ubely@ilbers.de \
    --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