diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-11-23 18:14:48 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-11-23 18:14:48 +0900 |
| commit | ca6d417715000d25439e7c46403267b6e3723036 (patch) | |
| tree | 5d100742eb36f89554d8b10c5910ea4711e4da66 /container/seccomp | |
| parent | 33f43117c6e6b53efa9226c276f416348fc2d63b (diff) | |
cmd/dist: enable testing when cross-compiling
This uses emulator specified via the environment. This change also
reinstates seccomp filter checksums of build-only targets.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'container/seccomp')
| -rw-r--r-- | container/seccomp/presets_ppc64le_test.go | 27 | ||||
| -rw-r--r-- | container/seccomp/presets_riscv64_test.go | 27 |
2 files changed, 54 insertions, 0 deletions
diff --git a/container/seccomp/presets_ppc64le_test.go b/container/seccomp/presets_ppc64le_test.go new file mode 100644 index 00000000..599840e7 --- /dev/null +++ b/container/seccomp/presets_ppc64le_test.go @@ -0,0 +1,27 @@ +package seccomp_test + +import ( + . "hakurei.app/container/seccomp" + . "hakurei.app/container/std" +) + +var bpfExpected = bpfLookup{ + {AllowMultiarch | AllowCAN | + AllowBluetooth, PresetExt | + PresetDenyNS | PresetDenyTTY | PresetDenyDevel | + PresetLinux32}: mustParse( + "Vz74ClcLEGfsj5jwYmwNo2PJ6wNOFJEckmIuwkgmUaV7nzPPn7SUyrC+tJ1v2T9H"), + + {0, 0}: mustParse( + "welISQ62bclQzES6kDpvUEgurVqlYCPABu0aOQZZKzqiVwHrmQcylAWCw1ACYYJD"), + {0, PresetExt}: mustParse( + "Kh74CvRK3sHsGQnJxBWLBv9qxbkYKxn9zNNaAG2q7dOZ+9VxxuiPEJbZ/Ob4xAGd"), + {0, PresetStrict}: mustParse( + "tSKD0ZeYEItLi6wGh1YZYFK8KsOg5xCC8W6ZGW5R0xXE06rwqAyjenfwS2nCTy+q"), + {0, PresetDenyNS | PresetDenyTTY | PresetDenyDevel}: mustParse( + "GOTui/NNyplZBl6LwrU7wdoVy4R9HttTi8DElxzRfYl+lN622Kqf7a//ertZX2y0"), + {0, PresetExt | PresetDenyDevel}: mustParse( + "I+x81IFKDk4Cyoc7J+LPSkJ+klvKwIomimHJ1Wfy27FEE8ylti2kDo+9iEbFL6wf"), + {0, PresetExt | PresetDenyNS | PresetDenyDevel}: mustParse( + "nDqErVU6g8WTye+b2CQIqqV1fER3urBqSGXZG51V8fgJ16AAvEZxz28Gal3HT9IV"), +} diff --git a/container/seccomp/presets_riscv64_test.go b/container/seccomp/presets_riscv64_test.go new file mode 100644 index 00000000..ec658450 --- /dev/null +++ b/container/seccomp/presets_riscv64_test.go @@ -0,0 +1,27 @@ +package seccomp_test + +import ( + . "hakurei.app/container/seccomp" + . "hakurei.app/container/std" +) + +var bpfExpected = bpfLookup{ + {AllowMultiarch | AllowCAN | + AllowBluetooth, PresetExt | + PresetDenyNS | PresetDenyTTY | PresetDenyDevel | + PresetLinux32}: mustParse( + "kTU/furbbKFu+aUjE33OgA1lzXHZbBcD42Q+jBd8P75Tz/5x9VStq+vvR7n+rJf8"), + + {0, 0}: mustParse( + "o+lUKm/WcU5+agdfjkJm4FlzJ72ntHjS73TdK9miG3FLJc7rog0DeVhA8WG3dK69"), + {0, PresetExt}: mustParse( + "y1EIz4vqXxMtcaqkoT9osa2sDuxtGCb0A/tNm40DWpP8okc+pF3JMlR2ZfOIqabS"), + {0, PresetStrict}: mustParse( + "5b43Aunj1EXM9gzuF0y/0a6zXCJgaHY8Dhbnh2j5m7emu8eQiT/kSCkK1zk4G0h4"), + {0, PresetDenyNS | PresetDenyTTY | PresetDenyDevel}: mustParse( + "2Nla9HGCyjb63w1TnMfdOIg7df/XyS9QW9Lrl+i+ll4SP020G3vOEDfNj0ddd2FV"), + {0, PresetExt | PresetDenyDevel}: mustParse( + "IVhTKOcI8/+ZBLlpepkJD5ip92MNdce+sOzO1rwL/yhki5A7ZBQ345vp7JDFBmWb"), + {0, PresetExt | PresetDenyNS | PresetDenyDevel}: mustParse( + "c2AyOeLdGke02LLEwk+4Rcl6GZhy527Y8YXlMyxPH84jHsCdlK6ntDTQhVr49sp0"), +} |
