From: Uladzimir Bely <ubely@ilbers.de>
To: isar-users@googlegroups.com
Subject: [PATCH v2 1/9] testsuite: Fix failing hostname service in qemu guest
Date: Wed, 8 Feb 2023 16:45:03 +0100 [thread overview]
Message-ID: <20230208154511.1884-2-ubely@ilbers.de> (raw)
In-Reply-To: <20230208154511.1884-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 | 2 +-
testsuite/start_vm.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/testsuite/cibuilder.py b/testsuite/cibuilder.py
index 72522f4d..5d82ec4b 100755
--- a/testsuite/cibuilder.py
+++ b/testsuite/cibuilder.py
@@ -262,7 +262,7 @@ class CIBuilder(Test):
timeout = time.time() + int(time_to_wait)
- p1 = subprocess.Popen(cmdline,
+ p1 = subprocess.Popen('exec ' + ' '.join(cmdline), shell=True,
stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE,
universal_newlines=True)
try:
diff --git a/testsuite/start_vm.py b/testsuite/start_vm.py
index 82ecc17d..c3726f14 100755
--- a/testsuite/start_vm.py
+++ b/testsuite/start_vm.py
@@ -96,7 +96,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
next prev parent reply other threads:[~2023-02-08 15:45 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-08 15:45 [PATCH v2 0/9] Support running custom commands in VM Uladzimir Bely
2023-02-08 15:45 ` Uladzimir Bely [this message]
2023-02-08 15:45 ` [PATCH v2 2/9] testsuite: Add SSH key pair for using in CI Uladzimir Bely
2023-02-08 15:45 ` [PATCH v2 3/9] meta-isar: Add a recipe that configures ci user Uladzimir Bely
2023-02-08 15:45 ` [PATCH v2 4/9] meta-isar: Use a separate image recipe in CI Uladzimir Bely
2023-02-08 15:45 ` [PATCH v2 5/9] testsuite: Allow custom image names in start_vm.py Uladzimir Bely
2023-02-08 15:45 ` [PATCH v2 6/9] testsuite: Support running custom commands in VM Uladzimir Bely
2023-02-08 15:45 ` [PATCH v2 7/9] testsuite: Support running custom scripts " Uladzimir Bely
2023-02-08 15:45 ` [PATCH v2 8/9] testsuite: Run custom commands and scripts on some qemu targets Uladzimir Bely
2023-02-08 15:45 ` [PATCH v2 9/9] testsuite: Update testsuite qemu-related documentation Uladzimir Bely
2023-02-21 10:56 ` [PATCH v2 0/9] Support running custom commands in VM Uladzimir Bely
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=20230208154511.1884-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