patches and low-level development discussion
 help / color / mirror / code / Atom feed
From: Alyssa Ross <hi@alyssa.is>
To: devel@spectrum-os.org
Cc: Yureka <yuka@yuka.dev>
Subject: [PATCH 0/8] Change serial getty instances dynamically
Date: Fri, 13 Jun 2025 16:05:00 +0200	[thread overview]
Message-ID: <20250613140508.76998-1-hi@alyssa.is> (raw)

The host system is supposed to provide a shell on whatever serial
devices are configured as the active kernel consoles.  Previously, the
system made the assumption that the active console would never change
after boot, but in reality devices can be added and removed later than
that.  One situation in which this happened is when a serial device
was configured whose driver was not built in to the kernel, but loaded
as a module after the console was checked by rc.init.

This series fixes that by creating and destroying instances of the
serial-getty service whenever the active kernel consoles change, and
adds a regression test.  Since this is the second test that involves
running a full Spectrum system in a VM, most of the series has ended
up being refactoring the first such test, so that code can be shared
with this new one.

Yureka, I don't know whether this is the issue you were encountering
when you tried debugging the Weston issue over serial, but maybe worth
a try?  I suspect not though, because if I recall correctly you
weren't even getting kernel logs?  This was the only issue I could
find trying to reproduce the problem in QEMU.

Alyssa Ross (8):
  host/rootfs: poll active consoles for serial getty
  release/checks/integration: init from networking
  release/checks/integration: use default Meson timeout
  release/checks/integration: extract config struct
  release/checks/integration: run from tmpdir
  release/checks/integration: name QEMU arg pointers
  release/checks/integration: extract library
  release/checks/integration: test late serial

 host/rootfs/Makefile                          |   1 +
 host/rootfs/default.nix                       |   8 +-
 .../service/serial-getty-generator/run        |  43 +++
 host/rootfs/etc/s6-linux-init/scripts/rc.init |   9 -
 release/checks/default.nix                    |   4 +-
 release/checks/integration/default.nix        |  88 +++++
 release/checks/integration/late-serial.c      |  15 +
 release/checks/integration/lib.c              | 221 ++++++++++++
 release/checks/integration/lib.h              |  20 ++
 release/checks/integration/meson.build        |  21 ++
 release/checks/integration/meson_options.txt  |   6 +
 release/checks/integration/networking.c       | 138 +++++++
 release/checks/networking/default.nix         |  62 ----
 release/checks/networking/test.c              | 337 ------------------
 release/checks/pkg-tests.nix                  |   2 +-
 15 files changed, 560 insertions(+), 415 deletions(-)
 create mode 100755 host/rootfs/etc/s6-linux-init/run-image/service/serial-getty-generator/run
 create mode 100644 release/checks/integration/default.nix
 create mode 100644 release/checks/integration/late-serial.c
 create mode 100644 release/checks/integration/lib.c
 create mode 100644 release/checks/integration/lib.h
 create mode 100644 release/checks/integration/meson.build
 create mode 100644 release/checks/integration/meson_options.txt
 create mode 100644 release/checks/integration/networking.c
 delete mode 100644 release/checks/networking/default.nix
 delete mode 100644 release/checks/networking/test.c


base-commit: 42887a0331fd058ee0930fd5209fc3265565c3a8
-- 
2.49.0


             reply	other threads:[~2025-06-13 14:05 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-13 14:05 Alyssa Ross [this message]
2025-06-13 14:05 ` [PATCH 1/8] host/rootfs: poll active consoles for serial getty Alyssa Ross
2025-06-28 19:54   ` Alyssa Ross
2025-06-13 14:05 ` [PATCH 2/8] release/checks/integration: init from networking Alyssa Ross
2025-06-28 19:54   ` Alyssa Ross
2025-06-13 14:05 ` [PATCH 3/8] release/checks/integration: use default Meson timeout Alyssa Ross
2025-06-13 14:05 ` [PATCH 4/8] release/checks/integration: extract config struct Alyssa Ross
2025-06-28 19:54   ` Alyssa Ross
2025-06-13 14:05 ` [PATCH 5/8] release/checks/integration: run from tmpdir Alyssa Ross
2025-06-13 14:05 ` [PATCH 6/8] release/checks/integration: name QEMU arg pointers Alyssa Ross
2025-06-28 19:54   ` Alyssa Ross
2025-06-13 14:05 ` [PATCH 7/8] release/checks/integration: extract library Alyssa Ross
2025-06-28 19:54   ` Alyssa Ross
2025-06-13 14:05 ` [PATCH 8/8] release/checks/integration: test late serial Alyssa Ross
2025-06-28 19:54   ` Alyssa Ross

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=20250613140508.76998-1-hi@alyssa.is \
    --to=hi@alyssa.is \
    --cc=devel@spectrum-os.org \
    --cc=yuka@yuka.dev \
    /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.
Code repositories for project(s) associated with this public inbox

	https://spectrum-os.org/git/crosvm
	https://spectrum-os.org/git/doc
	https://spectrum-os.org/git/mktuntap
	https://spectrum-os.org/git/nixpkgs
	https://spectrum-os.org/git/spectrum
	https://spectrum-os.org/git/ucspi-vsock
	https://spectrum-os.org/git/www

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).