diff --git a/internal/rosa/hakurei.go b/internal/rosa/hakurei.go index 3ed7ada..cefd224 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 +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 +--- + 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(`