aboutsummaryrefslogtreecommitdiffhomepage
path: root/container
diff options
context:
space:
mode:
Diffstat (limited to 'container')
-rw-r--r--container/container.go6
-rw-r--r--container/seccomp/libseccomp_test.go2
2 files changed, 7 insertions, 1 deletions
diff --git a/container/container.go b/container/container.go
index 8001673a..ecfb94cc 100644
--- a/container/container.go
+++ b/container/container.go
@@ -17,6 +17,12 @@ import (
"hakurei.app/container/seccomp"
)
+const (
+ // Nonexistent is a path that cannot exist.
+ // /proc is chosen because a system with covered /proc is unsupported by this package.
+ Nonexistent = "/proc/nonexistent"
+)
+
type (
// Container represents a container environment being prepared or run.
// None of [Container] methods are safe for concurrent use.
diff --git a/container/seccomp/libseccomp_test.go b/container/seccomp/libseccomp_test.go
index 8443adec..1ae3f764 100644
--- a/container/seccomp/libseccomp_test.go
+++ b/container/seccomp/libseccomp_test.go
@@ -79,7 +79,7 @@ func TestExport(t *testing.T) {
func BenchmarkExport(b *testing.B) {
buf := make([]byte, 8)
- for i := 0; i < b.N; i++ {
+ for b.Loop() {
e := New(
Preset(PresetExt|PresetDenyNS|PresetDenyTTY|PresetDenyDevel|PresetLinux32,
AllowMultiarch|AllowCAN|AllowBluetooth),