aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-01-31 12:00:21 +0900
committerOphestra <cat@gensokyo.uk>2026-01-31 12:00:21 +0900
commitf8661ad4796c71fca0635b5094ef04d9a01ca557 (patch)
tree69eedd1f140e7cd7d640712d4e2698c4781351c2
parent536f0cbae6134bceac8f45266398439edd8f1a49 (diff)
internal/rosa/hakurei: backport test case fix
This patch will be removed in the next release. Signed-off-by: Ophestra <cat@gensokyo.uk>
-rw-r--r--internal/rosa/hakurei.go65
1 files changed, 64 insertions, 1 deletions
diff --git a/internal/rosa/hakurei.go b/internal/rosa/hakurei.go
index 3ed7adaf..cefd2245 100644
--- a/internal/rosa/hakurei.go
+++ b/internal/rosa/hakurei.go
@@ -173,7 +173,70 @@ index 00c4401..2eaa2ec 100644
+ HAKUREI_TEST_SKIP_ACL = 1;
};
- buildInputs = [`}),
+ buildInputs = [`}, [2]string{"container-tests", `From bf14a412e47344fff2681f4b24d1ecc7415bfcb0 Mon Sep 17 00:00:00 2001
+From: Ophestra <cat@gensokyo.uk>
+Date: Sat, 31 Jan 2026 10:59:56 +0900
+Subject: [PATCH] container: fix host-dependent test cases
+
+These are not fully controlled by hakurei and may change depending on host configuration.
+
+Signed-off-by: Ophestra <cat@gensokyo.uk>
+---
+ container/container_test.go | 27 +++++++++++++++------------
+ 1 file changed, 15 insertions(+), 12 deletions(-)
+
+diff --git a/container/container_test.go b/container/container_test.go
+index d737a18..98713cb 100644
+--- a/container/container_test.go
++++ b/container/container_test.go
+@@ -275,12 +275,12 @@ var containerTestCases = []struct {
+ ),
+ earlyMnt(
+ ent("/", "/dev", "ro,nosuid,nodev,relatime", "tmpfs", "devtmpfs", ignore),
+- ent("/null", "/dev/null", "rw,nosuid", "devtmpfs", "devtmpfs", ignore),
+- ent("/zero", "/dev/zero", "rw,nosuid", "devtmpfs", "devtmpfs", ignore),
+- ent("/full", "/dev/full", "rw,nosuid", "devtmpfs", "devtmpfs", ignore),
+- ent("/random", "/dev/random", "rw,nosuid", "devtmpfs", "devtmpfs", ignore),
+- ent("/urandom", "/dev/urandom", "rw,nosuid", "devtmpfs", "devtmpfs", ignore),
+- ent("/tty", "/dev/tty", "rw,nosuid", "devtmpfs", "devtmpfs", ignore),
++ ent("/null", "/dev/null", ignore, "devtmpfs", "devtmpfs", ignore),
++ ent("/zero", "/dev/zero", ignore, "devtmpfs", "devtmpfs", ignore),
++ ent("/full", "/dev/full", ignore, "devtmpfs", "devtmpfs", ignore),
++ ent("/random", "/dev/random", ignore, "devtmpfs", "devtmpfs", ignore),
++ ent("/urandom", "/dev/urandom", ignore, "devtmpfs", "devtmpfs", ignore),
++ ent("/tty", "/dev/tty", ignore, "devtmpfs", "devtmpfs", ignore),
+ ent("/", "/dev/pts", "rw,nosuid,noexec,relatime", "devpts", "devpts", "rw,mode=620,ptmxmode=666"),
+ ent("/", "/dev/mqueue", "rw,nosuid,nodev,noexec,relatime", "mqueue", "mqueue", "rw"),
+ ent("/", "/dev/shm", "rw,nosuid,nodev,relatime", "tmpfs", "tmpfs", ignore),
+@@ -293,12 +293,12 @@ var containerTestCases = []struct {
+ ),
+ earlyMnt(
+ ent("/", "/dev", "ro,nosuid,nodev,relatime", "tmpfs", "devtmpfs", ignore),
+- ent("/null", "/dev/null", "rw,nosuid", "devtmpfs", "devtmpfs", ignore),
+- ent("/zero", "/dev/zero", "rw,nosuid", "devtmpfs", "devtmpfs", ignore),
+- ent("/full", "/dev/full", "rw,nosuid", "devtmpfs", "devtmpfs", ignore),
+- ent("/random", "/dev/random", "rw,nosuid", "devtmpfs", "devtmpfs", ignore),
+- ent("/urandom", "/dev/urandom", "rw,nosuid", "devtmpfs", "devtmpfs", ignore),
+- ent("/tty", "/dev/tty", "rw,nosuid", "devtmpfs", "devtmpfs", ignore),
++ ent("/null", "/dev/null", ignore, "devtmpfs", "devtmpfs", ignore),
++ ent("/zero", "/dev/zero", ignore, "devtmpfs", "devtmpfs", ignore),
++ ent("/full", "/dev/full", ignore, "devtmpfs", "devtmpfs", ignore),
++ ent("/random", "/dev/random", ignore, "devtmpfs", "devtmpfs", ignore),
++ ent("/urandom", "/dev/urandom", ignore, "devtmpfs", "devtmpfs", ignore),
++ ent("/tty", "/dev/tty", ignore, "devtmpfs", "devtmpfs", ignore),
+ ent("/", "/dev/pts", "rw,nosuid,noexec,relatime", "devpts", "devpts", "rw,mode=620,ptmxmode=666"),
+ ent("/", "/dev/shm", "rw,nosuid,nodev,relatime", "tmpfs", "tmpfs", ignore),
+ ),
+@@ -696,6 +696,9 @@ func init() {
+ mnt[i].VfsOptstr = strings.TrimSuffix(mnt[i].VfsOptstr, ",relatime")
+ mnt[i].VfsOptstr = strings.TrimSuffix(mnt[i].VfsOptstr, ",noatime")
+
++ cur.FsOptstr = strings.Replace(cur.FsOptstr, ",seclabel", "", 1)
++ mnt[i].FsOptstr = strings.Replace(mnt[i].FsOptstr, ",seclabel", "", 1)
++
+ if !cur.EqualWithIgnore(mnt[i], "\x00") {
+ fail = true
+ log.Printf("[FAIL] %s", cur)`}),
), pkg.Path(AbsUsrSrc.Append("hostname", "main.go"), false, pkg.NewFile(
"hostname.go",
[]byte(`