aboutsummaryrefslogtreecommitdiffhomepage
path: root/container
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-04-07 15:18:28 +0900
committerOphestra <cat@gensokyo.uk>2026-04-07 15:22:52 +0900
commite4355279a1624833e36455a1a85788dbe091464e (patch)
tree7ba95bbd813f54cbabcaaf4cec5b004f8dbe72da /container
parent289fdebead872b1b011b8fe892d43a2f234703d1 (diff)
all: optionally forbid degrading in tests
This enables transparently degradable tests to be forced on in environments known to support them. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'container')
-rw-r--r--container/container_test.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/container/container_test.go b/container/container_test.go
index 693021bf..169efd8e 100644
--- a/container/container_test.go
+++ b/container/container_test.go
@@ -25,6 +25,7 @@ import (
"hakurei.app/ext"
"hakurei.app/fhs"
"hakurei.app/hst"
+ "hakurei.app/internal/info"
"hakurei.app/ldd"
"hakurei.app/message"
"hakurei.app/vfs"
@@ -453,7 +454,7 @@ func TestContainer(t *testing.T) {
c.SeccompDisable = !tc.filter
c.RetainSession = tc.session
c.HostNet = tc.net
- if !c.HostNet {
+ if info.CanDegrade {
if _, err := container.LandlockGetABI(); err != nil {
if !errors.Is(err, syscall.ENOSYS) {
t.Fatalf("LandlockGetABI: error = %v", err)