aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--.gitea/workflows/test.yml2
-rw-r--r--cmd/hakurei/testsuite/configuration.nix (renamed from test/hakurei/configuration.nix)0
-rw-r--r--cmd/hakurei/testsuite/default.nix (renamed from test/hakurei/default.nix)0
-rw-r--r--cmd/hakurei/testsuite/flake.lock (renamed from test/hakurei/flake.lock)0
-rw-r--r--cmd/hakurei/testsuite/flake.nix (renamed from test/hakurei/flake.nix)1
-rw-r--r--cmd/hakurei/testsuite/hsu.nix (renamed from test/hakurei/hsu.nix)2
-rw-r--r--cmd/hakurei/testsuite/nixos.nix (renamed from test/hakurei/nixos.nix)0
-rw-r--r--cmd/hakurei/testsuite/options.nix (renamed from test/hakurei/options.nix)0
-rw-r--r--cmd/hakurei/testsuite/package.nix (renamed from test/hakurei/package.nix)5
-rw-r--r--cmd/hakurei/testsuite/sandbox/main.go (renamed from test/sandbox/main.go)6
-rw-r--r--cmd/hakurei/testsuite/sandbox/testdata/device.go (renamed from test/sandbox/testdata/device.go)4
-rw-r--r--cmd/hakurei/testsuite/sandbox/testdata/mapuid.go (renamed from test/sandbox/testdata/mapuid.go)4
-rw-r--r--cmd/hakurei/testsuite/sandbox/testdata/pdlike.go (renamed from test/sandbox/testdata/pdlike.go)4
-rw-r--r--cmd/hakurei/testsuite/sandbox/testdata/simple.go (renamed from test/sandbox/testdata/simple.go)4
-rw-r--r--cmd/hakurei/testsuite/sandbox/testdata/sum.go (renamed from test/sandbox/testdata/sum.go)0
-rw-r--r--cmd/hakurei/testsuite/sandbox/testdata/sum_amd64.go (renamed from test/sandbox/testdata/sum_amd64.go)0
-rw-r--r--cmd/hakurei/testsuite/sandbox/testdata/sum_arm64.go (renamed from test/sandbox/testdata/sum_arm64.go)0
-rw-r--r--cmd/hakurei/testsuite/sandbox/testdata/testdata.go (renamed from test/sandbox/testdata/testdata.go)4
-rw-r--r--cmd/hakurei/testsuite/sandbox/testdata/tty.go (renamed from test/sandbox/testdata/tty.go)4
-rw-r--r--cmd/hakurei/testsuite/sandbox/tester/main.go (renamed from test/sandbox/tester/main.go)4
-rw-r--r--cmd/hakurei/testsuite/test.py (renamed from test/hakurei/test.py)0
-rw-r--r--cmd/sharefs/testsuite/main.go (renamed from test/sharefs/main.go)2
-rw-r--r--cmd/sharefs/testsuite/raceattr.go (renamed from test/sharefs/raceattr.go)0
-rw-r--r--internal/testsuite/fs.go (renamed from test/internal/testsuite/fs.go)0
-rw-r--r--internal/testsuite/fs_test.go (renamed from test/internal/testsuite/fs_test.go)2
-rw-r--r--internal/testsuite/mountinfo/mountinfo.go (renamed from test/internal/mountinfo/mountinfo.go)0
-rw-r--r--internal/testsuite/mountinfo/mountinfo_guard.go (renamed from test/internal/mountinfo/mountinfo_guard.go)0
-rw-r--r--internal/testsuite/mountinfo/mountinfo_test.go (renamed from test/internal/mountinfo/mountinfo_test.go)2
-rw-r--r--internal/testsuite/proc.go (renamed from test/internal/testsuite/proc.go)0
-rw-r--r--internal/testsuite/proc_test.go (renamed from test/internal/testsuite/proc_test.go)2
-rw-r--r--internal/testsuite/ptrace.go (renamed from test/internal/testsuite/ptrace.go)0
-rw-r--r--internal/testsuite/ptrace_test.go (renamed from test/internal/testsuite/ptrace_test.go)2
-rw-r--r--internal/testsuite/testsuite.go (renamed from test/internal/testsuite/testsuite.go)0
-rw-r--r--internal/testsuite/testsuite_guard.go (renamed from test/internal/testsuite/testsuite_guard.go)0
-rw-r--r--internal/testsuite/testsuite_root.go (renamed from test/internal/testsuite/testsuite_root.go)0
-rw-r--r--internal/workflows/doc.go4
-rw-r--r--internal/workflows/seccomp.patch (renamed from test/sandbox/seccomp.patch)0
-rw-r--r--internal/workflows/step.go4
-rw-r--r--internal/workflows/test.go6
39 files changed, 34 insertions, 34 deletions
diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml
index 099a3c98..6349f281 100644
--- a/.gitea/workflows/test.yml
+++ b/.gitea/workflows/test.yml
@@ -1 +1 @@
-{"name":"Test","on":["push"],"jobs":{"hakurei-legacy":{"name":"Hakurei (legacy)","runs-on":"nix","steps":[{"name":"Checkout","uses":"actions/checkout@v4"},{"name":"Run NixOS test","run":"nix build --out-link result --print-out-paths --print-build-logs ./test/hakurei#checks.x86_64-linux.hakurei"},{"name":"Upload test output","uses":"actions/upload-artifact@v3","with":{"name":"hakurei-vm-output","path":"result/*","retention-days":1}}]},"hakurei-race-legacy":{"name":"Hakurei (legacy with race instrument)","runs-on":"nix","steps":[{"name":"Checkout","uses":"actions/checkout@v4"},{"name":"Run NixOS test","run":"nix build --out-link result --print-out-paths --print-build-logs ./test/hakurei#checks.x86_64-linux.race"},{"name":"Upload test output","uses":"actions/upload-artifact@v3","with":{"name":"hakurei-race-vm-output","path":"result/*","retention-days":1}}]},"sandbox":{"name":"Sandbox","runs-on":"rosa","steps":[{"name":"Fix container filesystem","run":"rm /var/run \u0026\u0026 ln -sf ../run /var"},{"name":"Checkout","uses":"actions/checkout@v4"},{"name":"Set up Go toolchain","uses":"actions/setup-go@v6","with":{"go-version-file":"go.mod"}},{"name":"Install packages","uses":"awalsh128/cache-apt-pkgs-action@v1","with":{"add-repository":"ppa:savoury1/pipewire","packages":"libmount-dev sway xwayland xdg-dbus-proxy pipewire","version":0,"execute_install_scripts":true}},{"name":"Request distribution","id":"dist","run":"HAKUREI_REV=\"$(git rev-parse --short HEAD)\" \u0026\u0026 /rosa/bin/mbf ci dist -o result . \"$(cat cmd/dist/VERSION)-$HAKUREI_REV\" \u0026\u0026 echo \"rev=$HAKUREI_REV\" \u003e\u003e \"$GITHUB_OUTPUT\""},{"name":"Install hakurei","run":"HAKUREI_VERSION=\"$(cat cmd/dist/VERSION)-${{ steps.dist.outputs.rev }}\" \u0026\u0026 tar xf result/hakurei-$HAKUREI_VERSION*-amd64.tar.gz \u0026\u0026 ./hakurei-$HAKUREI_VERSION*-amd64/install.sh \u0026\u0026 sudo -u ubuntu hakurei version \u0026\u0026 mkdir /var/empty"},{"name":"Compile and run test suite","run":"rm -rf result \u0026\u0026 go run -tags=testsuite ./test/sandbox"}]},"sandbox-race":{"name":"Sandbox (with race instrument)","runs-on":"rosa","steps":[{"name":"Fix container filesystem","run":"rm /var/run \u0026\u0026 ln -sf ../run /var"},{"name":"Checkout","uses":"actions/checkout@v4"},{"name":"Set up Go toolchain","uses":"actions/setup-go@v6","with":{"go-version-file":"go.mod"}},{"name":"Install packages","uses":"awalsh128/cache-apt-pkgs-action@v1","with":{"add-repository":"ppa:savoury1/pipewire","packages":"libmount-dev sway xwayland xdg-dbus-proxy pipewire","version":0,"execute_install_scripts":true}},{"name":"Request distribution","id":"dist","run":"HAKUREI_REV=\"$(git rev-parse --short HEAD)\" \u0026\u0026 /rosa/bin/mbf ci race -o result . \"$(cat cmd/dist/VERSION)-$HAKUREI_REV\" \u0026\u0026 echo \"rev=$HAKUREI_REV\" \u003e\u003e \"$GITHUB_OUTPUT\""},{"name":"Install hakurei","run":"HAKUREI_VERSION=\"$(cat cmd/dist/VERSION)-${{ steps.dist.outputs.rev }}\" \u0026\u0026 tar xf result/hakurei-$HAKUREI_VERSION*-amd64.tar.gz \u0026\u0026 ./hakurei-$HAKUREI_VERSION*-amd64/install.sh \u0026\u0026 sudo -u ubuntu hakurei version \u0026\u0026 mkdir /var/empty"},{"name":"Compile and run test suite","run":"rm -rf result \u0026\u0026 go run -tags=testsuite ./test/sandbox"}]},"sharefs":{"name":"ShareFS","runs-on":"rosa","steps":[{"name":"Fix container filesystem","run":"rm /var/run \u0026\u0026 ln -sf ../run /var"},{"name":"Checkout","uses":"actions/checkout@v4"},{"name":"Set up Go toolchain","uses":"actions/setup-go@v6","with":{"go-version-file":"go.mod"}},{"name":"Install packages","uses":"awalsh128/cache-apt-pkgs-action@v1","with":{"add-repository":"","packages":"fuse3 fsmark","version":0,"execute_install_scripts":true}},{"name":"Request distribution","id":"dist","run":"HAKUREI_REV=\"$(git rev-parse --short HEAD)\" \u0026\u0026 /rosa/bin/mbf ci dist -o result . \"$(cat cmd/dist/VERSION)-$HAKUREI_REV\" \u0026\u0026 echo \"rev=$HAKUREI_REV\" \u003e\u003e \"$GITHUB_OUTPUT\""},{"name":"Install hakurei","run":"HAKUREI_VERSION=\"$(cat cmd/dist/VERSION)-${{ steps.dist.outputs.rev }}\" \u0026\u0026 tar xf result/hakurei-$HAKUREI_VERSION*-amd64.tar.gz \u0026\u0026 ./hakurei-$HAKUREI_VERSION*-amd64/install.sh \u0026\u0026 sudo -u ubuntu hakurei version \u0026\u0026 mkdir /var/empty"},{"name":"Mount sharefs","run":"useradd -ru 1023 -md /var/lib/sdcard -k /var/empty -s /sbin/nologin media_rw \u0026\u0026 install -dm0 /sdcard \u0026\u0026 sharefs -o rw,noexec,nosuid,nodev,noatime,allow_other,mkdir,source=/var/lib/sdcard,setuid=1023,setgid=1023 /sdcard"},{"name":"Compile and run test suite","run":"sharefs -V \u0026\u0026 rm -rf result \u0026\u0026 go run -tags=testsuite ./test/sharefs"},{"name":"Upload test output","uses":"actions/upload-artifact@v3","with":{"name":"fs_mark","path":"result/*","retention-days":1}}]},"dist":{"name":"Create distribution","runs-on":"rosa","steps":[{"name":"Fix container filesystem","run":"rm /var/run \u0026\u0026 ln -sf ../run /var"},{"name":"Checkout","uses":"actions/checkout@v4"},{"name":"Request distribution","id":"dist-test","run":"HAKUREI_REV=\"$(git rev-parse --short HEAD)\" \u0026\u0026 /rosa/bin/mbf ci dist -o result . \"$(cat cmd/dist/VERSION)-$HAKUREI_REV\" \u0026\u0026 echo \"rev=$HAKUREI_REV\" \u003e\u003e \"$GITHUB_OUTPUT\""},{"name":"Upload distribution","uses":"actions/upload-artifact@v3","with":{"name":"dist-${{ steps.dist-test.outputs.rev }}","path":"result/*","retention-days":1}}]}}}
+{"name":"Test","on":["push"],"jobs":{"hakurei-legacy":{"name":"Hakurei (legacy)","runs-on":"nix","steps":[{"name":"Checkout","uses":"actions/checkout@v4"},{"name":"Run NixOS test","run":"nix build --out-link result --print-out-paths --print-build-logs ./cmd/hakurei/testsuite#checks.x86_64-linux.hakurei"},{"name":"Upload test output","uses":"actions/upload-artifact@v3","with":{"name":"hakurei-vm-output","path":"result/*","retention-days":1}}]},"hakurei-race-legacy":{"name":"Hakurei (legacy with race instrument)","runs-on":"nix","steps":[{"name":"Checkout","uses":"actions/checkout@v4"},{"name":"Run NixOS test","run":"nix build --out-link result --print-out-paths --print-build-logs ./cmd/hakurei/testsuite#checks.x86_64-linux.race"},{"name":"Upload test output","uses":"actions/upload-artifact@v3","with":{"name":"hakurei-race-vm-output","path":"result/*","retention-days":1}}]},"sandbox":{"name":"Sandbox","runs-on":"rosa","steps":[{"name":"Fix container filesystem","run":"rm /var/run \u0026\u0026 ln -sf ../run /var"},{"name":"Checkout","uses":"actions/checkout@v4"},{"name":"Set up Go toolchain","uses":"actions/setup-go@v6","with":{"go-version-file":"go.mod"}},{"name":"Install packages","uses":"awalsh128/cache-apt-pkgs-action@v1","with":{"add-repository":"ppa:savoury1/pipewire","packages":"libmount-dev sway xwayland xdg-dbus-proxy pipewire","version":0,"execute_install_scripts":true}},{"name":"Request distribution","id":"dist","run":"HAKUREI_REV=\"$(git rev-parse --short HEAD)\" \u0026\u0026 /rosa/bin/mbf ci dist -o result . \"$(cat cmd/dist/VERSION)-$HAKUREI_REV\" \u0026\u0026 echo \"rev=$HAKUREI_REV\" \u003e\u003e \"$GITHUB_OUTPUT\""},{"name":"Install hakurei","run":"HAKUREI_VERSION=\"$(cat cmd/dist/VERSION)-${{ steps.dist.outputs.rev }}\" \u0026\u0026 tar xf result/hakurei-$HAKUREI_VERSION*-amd64.tar.gz \u0026\u0026 ./hakurei-$HAKUREI_VERSION*-amd64/install.sh \u0026\u0026 sudo -u ubuntu hakurei version \u0026\u0026 mkdir /var/empty"},{"name":"Compile and run test suite","run":"rm -rf result \u0026\u0026 go run -tags=testsuite ./cmd/hakurei/testsuite/sandbox"}]},"sandbox-race":{"name":"Sandbox (with race instrument)","runs-on":"rosa","steps":[{"name":"Fix container filesystem","run":"rm /var/run \u0026\u0026 ln -sf ../run /var"},{"name":"Checkout","uses":"actions/checkout@v4"},{"name":"Set up Go toolchain","uses":"actions/setup-go@v6","with":{"go-version-file":"go.mod"}},{"name":"Install packages","uses":"awalsh128/cache-apt-pkgs-action@v1","with":{"add-repository":"ppa:savoury1/pipewire","packages":"libmount-dev sway xwayland xdg-dbus-proxy pipewire","version":0,"execute_install_scripts":true}},{"name":"Request distribution","id":"dist","run":"HAKUREI_REV=\"$(git rev-parse --short HEAD)\" \u0026\u0026 /rosa/bin/mbf ci race -o result . \"$(cat cmd/dist/VERSION)-$HAKUREI_REV\" \u0026\u0026 echo \"rev=$HAKUREI_REV\" \u003e\u003e \"$GITHUB_OUTPUT\""},{"name":"Install hakurei","run":"HAKUREI_VERSION=\"$(cat cmd/dist/VERSION)-${{ steps.dist.outputs.rev }}\" \u0026\u0026 tar xf result/hakurei-$HAKUREI_VERSION*-amd64.tar.gz \u0026\u0026 ./hakurei-$HAKUREI_VERSION*-amd64/install.sh \u0026\u0026 sudo -u ubuntu hakurei version \u0026\u0026 mkdir /var/empty"},{"name":"Compile and run test suite","run":"rm -rf result \u0026\u0026 go run -tags=testsuite ./cmd/hakurei/testsuite/sandbox"}]},"sharefs":{"name":"ShareFS","runs-on":"rosa","steps":[{"name":"Fix container filesystem","run":"rm /var/run \u0026\u0026 ln -sf ../run /var"},{"name":"Checkout","uses":"actions/checkout@v4"},{"name":"Set up Go toolchain","uses":"actions/setup-go@v6","with":{"go-version-file":"go.mod"}},{"name":"Install packages","uses":"awalsh128/cache-apt-pkgs-action@v1","with":{"add-repository":"","packages":"fuse3 fsmark","version":0,"execute_install_scripts":true}},{"name":"Request distribution","id":"dist","run":"HAKUREI_REV=\"$(git rev-parse --short HEAD)\" \u0026\u0026 /rosa/bin/mbf ci dist -o result . \"$(cat cmd/dist/VERSION)-$HAKUREI_REV\" \u0026\u0026 echo \"rev=$HAKUREI_REV\" \u003e\u003e \"$GITHUB_OUTPUT\""},{"name":"Install hakurei","run":"HAKUREI_VERSION=\"$(cat cmd/dist/VERSION)-${{ steps.dist.outputs.rev }}\" \u0026\u0026 tar xf result/hakurei-$HAKUREI_VERSION*-amd64.tar.gz \u0026\u0026 ./hakurei-$HAKUREI_VERSION*-amd64/install.sh \u0026\u0026 sudo -u ubuntu hakurei version \u0026\u0026 mkdir /var/empty"},{"name":"Mount sharefs","run":"useradd -ru 1023 -md /var/lib/sdcard -k /var/empty -s /sbin/nologin media_rw \u0026\u0026 install -dm0 /sdcard \u0026\u0026 sharefs -o rw,noexec,nosuid,nodev,noatime,allow_other,mkdir,source=/var/lib/sdcard,setuid=1023,setgid=1023 /sdcard"},{"name":"Compile and run test suite","run":"sharefs -V \u0026\u0026 rm -rf result \u0026\u0026 go run -tags=testsuite ./cmd/sharefs/testsuite"},{"name":"Upload test output","uses":"actions/upload-artifact@v3","with":{"name":"fs_mark","path":"result/*","retention-days":1}}]},"dist":{"name":"Create distribution","runs-on":"rosa","steps":[{"name":"Fix container filesystem","run":"rm /var/run \u0026\u0026 ln -sf ../run /var"},{"name":"Checkout","uses":"actions/checkout@v4"},{"name":"Request distribution","id":"dist-test","run":"HAKUREI_REV=\"$(git rev-parse --short HEAD)\" \u0026\u0026 /rosa/bin/mbf ci dist -o result . \"$(cat cmd/dist/VERSION)-$HAKUREI_REV\" \u0026\u0026 echo \"rev=$HAKUREI_REV\" \u003e\u003e \"$GITHUB_OUTPUT\""},{"name":"Upload distribution","uses":"actions/upload-artifact@v3","with":{"name":"dist-${{ steps.dist-test.outputs.rev }}","path":"result/*","retention-days":1}}]}}}
diff --git a/test/hakurei/configuration.nix b/cmd/hakurei/testsuite/configuration.nix
index 62d8239d..62d8239d 100644
--- a/test/hakurei/configuration.nix
+++ b/cmd/hakurei/testsuite/configuration.nix
diff --git a/test/hakurei/default.nix b/cmd/hakurei/testsuite/default.nix
index 81daa0a2..81daa0a2 100644
--- a/test/hakurei/default.nix
+++ b/cmd/hakurei/testsuite/default.nix
diff --git a/test/hakurei/flake.lock b/cmd/hakurei/testsuite/flake.lock
index 5537506a..5537506a 100644
--- a/test/hakurei/flake.lock
+++ b/cmd/hakurei/testsuite/flake.lock
diff --git a/test/hakurei/flake.nix b/cmd/hakurei/testsuite/flake.nix
index dc42b1cb..e1df8990 100644
--- a/test/hakurei/flake.nix
+++ b/cmd/hakurei/testsuite/flake.nix
@@ -65,7 +65,6 @@
xdg-dbus-proxy
# for check
- util-linux
nettools
;
};
diff --git a/test/hakurei/hsu.nix b/cmd/hakurei/testsuite/hsu.nix
index 5dd4cf5d..d1ddcb77 100644
--- a/test/hakurei/hsu.nix
+++ b/cmd/hakurei/testsuite/hsu.nix
@@ -8,7 +8,7 @@ buildGoModule {
pname = "${hakurei.pname}-hsu";
inherit (hakurei) version;
- src = ../../cmd/hsu;
+ src = ../../hsu;
inherit (hakurei) vendorHash;
env.CGO_ENABLED = 0;
diff --git a/test/hakurei/nixos.nix b/cmd/hakurei/testsuite/nixos.nix
index 49bfffb6..49bfffb6 100644
--- a/test/hakurei/nixos.nix
+++ b/cmd/hakurei/testsuite/nixos.nix
diff --git a/test/hakurei/options.nix b/cmd/hakurei/testsuite/options.nix
index f624b6f5..f624b6f5 100644
--- a/test/hakurei/options.nix
+++ b/cmd/hakurei/testsuite/options.nix
diff --git a/test/hakurei/package.nix b/cmd/hakurei/testsuite/package.nix
index 0facf291..12196cf6 100644
--- a/test/hakurei/package.nix
+++ b/cmd/hakurei/testsuite/package.nix
@@ -34,11 +34,11 @@
buildGo127Module rec {
pname = "hakurei";
- version = with lib.strings; removePrefix "v" (trim (builtins.readFile ../../cmd/dist/VERSION));
+ version = with lib.strings; removePrefix "v" (trim (builtins.readFile ../../dist/VERSION));
srcFiltered = builtins.path {
name = "${pname}-src";
- path = lib.cleanSource ../../.;
+ path = lib.cleanSource ../../../.;
filter = path: type: !(type == "regular" && (lib.hasSuffix ".nix" path || lib.hasSuffix ".py" path)) && !(type == "directory" && lib.hasSuffix "/test" path) && !(type == "directory" && lib.hasSuffix "/cmd/hsu" path);
};
vendorHash = null;
@@ -94,6 +94,7 @@ buildGo127Module rec {
fuse3
acl
wayland
+ util-linux
libxcb
libxau
diff --git a/test/sandbox/main.go b/cmd/hakurei/testsuite/sandbox/main.go
index 4961c04f..1d3d4516 100644
--- a/test/sandbox/main.go
+++ b/cmd/hakurei/testsuite/sandbox/main.go
@@ -24,9 +24,9 @@ import (
"hakurei.app/fhs"
"hakurei.app/hst"
"hakurei.app/internal/store"
+ "hakurei.app/internal/testsuite"
- "hakurei.app/test/internal/testsuite"
- "hakurei.app/test/sandbox/testdata"
+ "hakurei.app/cmd/hakurei/testsuite/sandbox/testdata"
)
// mustScanFor continuously scans the proc filesystem and calls f for each entry
@@ -124,7 +124,7 @@ func main() {
"-o", "/opt/test-helper/bin",
"-tags=tester",
"-trimpath",
- "./test/sandbox/tester",
+ "./cmd/hakurei/testsuite/sandbox/tester",
)
cmd.Stdout, cmd.Stderr = os.Stdout, os.Stderr
testToolDone = testsuite.MustStart(cmd)
diff --git a/test/sandbox/testdata/device.go b/cmd/hakurei/testsuite/sandbox/testdata/device.go
index 89feb819..5de9f550 100644
--- a/test/sandbox/testdata/device.go
+++ b/cmd/hakurei/testsuite/sandbox/testdata/device.go
@@ -8,8 +8,8 @@ import (
"hakurei.app/fhs"
"hakurei.app/hst"
- "hakurei.app/test/internal/mountinfo"
- "hakurei.app/test/internal/testsuite"
+ "hakurei.app/internal/testsuite"
+ "hakurei.app/internal/testsuite/mountinfo"
)
var _ = TestCase{
diff --git a/test/sandbox/testdata/mapuid.go b/cmd/hakurei/testsuite/sandbox/testdata/mapuid.go
index 8dee7b7f..218b035d 100644
--- a/test/sandbox/testdata/mapuid.go
+++ b/cmd/hakurei/testsuite/sandbox/testdata/mapuid.go
@@ -8,8 +8,8 @@ import (
"hakurei.app/fhs"
"hakurei.app/hst"
- "hakurei.app/test/internal/mountinfo"
- "hakurei.app/test/internal/testsuite"
+ "hakurei.app/internal/testsuite"
+ "hakurei.app/internal/testsuite/mountinfo"
)
var _ = TestCase{
diff --git a/test/sandbox/testdata/pdlike.go b/cmd/hakurei/testsuite/sandbox/testdata/pdlike.go
index 53d8062a..5b58ed38 100644
--- a/test/sandbox/testdata/pdlike.go
+++ b/cmd/hakurei/testsuite/sandbox/testdata/pdlike.go
@@ -8,8 +8,8 @@ import (
"hakurei.app/fhs"
"hakurei.app/hst"
- "hakurei.app/test/internal/mountinfo"
- "hakurei.app/test/internal/testsuite"
+ "hakurei.app/internal/testsuite"
+ "hakurei.app/internal/testsuite/mountinfo"
)
var _ = TestCase{
diff --git a/test/sandbox/testdata/simple.go b/cmd/hakurei/testsuite/sandbox/testdata/simple.go
index c410e626..edb7c350 100644
--- a/test/sandbox/testdata/simple.go
+++ b/cmd/hakurei/testsuite/sandbox/testdata/simple.go
@@ -8,8 +8,8 @@ import (
"hakurei.app/fhs"
"hakurei.app/hst"
- "hakurei.app/test/internal/mountinfo"
- "hakurei.app/test/internal/testsuite"
+ "hakurei.app/internal/testsuite"
+ "hakurei.app/internal/testsuite/mountinfo"
)
var _ = TestCase{
diff --git a/test/sandbox/testdata/sum.go b/cmd/hakurei/testsuite/sandbox/testdata/sum.go
index e4e8643a..e4e8643a 100644
--- a/test/sandbox/testdata/sum.go
+++ b/cmd/hakurei/testsuite/sandbox/testdata/sum.go
diff --git a/test/sandbox/testdata/sum_amd64.go b/cmd/hakurei/testsuite/sandbox/testdata/sum_amd64.go
index bd751105..bd751105 100644
--- a/test/sandbox/testdata/sum_amd64.go
+++ b/cmd/hakurei/testsuite/sandbox/testdata/sum_amd64.go
diff --git a/test/sandbox/testdata/sum_arm64.go b/cmd/hakurei/testsuite/sandbox/testdata/sum_arm64.go
index 1691828f..1691828f 100644
--- a/test/sandbox/testdata/sum_arm64.go
+++ b/cmd/hakurei/testsuite/sandbox/testdata/sum_arm64.go
diff --git a/test/sandbox/testdata/testdata.go b/cmd/hakurei/testsuite/sandbox/testdata/testdata.go
index 3418d8ae..bdb5178e 100644
--- a/test/sandbox/testdata/testdata.go
+++ b/cmd/hakurei/testsuite/sandbox/testdata/testdata.go
@@ -13,8 +13,8 @@ import (
"hakurei.app/check"
"hakurei.app/fhs"
"hakurei.app/hst"
- "hakurei.app/test/internal/mountinfo"
- "hakurei.app/test/internal/testsuite"
+ "hakurei.app/internal/testsuite"
+ "hakurei.app/internal/testsuite/mountinfo"
)
// A TestCase represents a named test case that may be requested by the caller.
diff --git a/test/sandbox/testdata/tty.go b/cmd/hakurei/testsuite/sandbox/testdata/tty.go
index 4788f484..2a3ba76e 100644
--- a/test/sandbox/testdata/tty.go
+++ b/cmd/hakurei/testsuite/sandbox/testdata/tty.go
@@ -7,8 +7,8 @@ import (
"hakurei.app/fhs"
"hakurei.app/hst"
- "hakurei.app/test/internal/mountinfo"
- "hakurei.app/test/internal/testsuite"
+ "hakurei.app/internal/testsuite"
+ "hakurei.app/internal/testsuite/mountinfo"
)
var _ = TestCase{
diff --git a/test/sandbox/tester/main.go b/cmd/hakurei/testsuite/sandbox/tester/main.go
index 0782a5e0..452712d9 100644
--- a/test/sandbox/tester/main.go
+++ b/cmd/hakurei/testsuite/sandbox/tester/main.go
@@ -14,8 +14,8 @@ import (
"path/filepath"
"syscall"
- "hakurei.app/test/internal/mountinfo"
- "hakurei.app/test/sandbox/testdata"
+ "hakurei.app/cmd/hakurei/testsuite/sandbox/testdata"
+ "hakurei.app/internal/testsuite/mountinfo"
)
//#include <sys/quota.h>
diff --git a/test/hakurei/test.py b/cmd/hakurei/testsuite/test.py
index 98f08275..98f08275 100644
--- a/test/hakurei/test.py
+++ b/cmd/hakurei/testsuite/test.py
diff --git a/test/sharefs/main.go b/cmd/sharefs/testsuite/main.go
index 80e6ab09..167875a1 100644
--- a/test/sharefs/main.go
+++ b/cmd/sharefs/testsuite/main.go
@@ -12,7 +12,7 @@ import (
"strings"
"syscall"
- "hakurei.app/test/internal/testsuite"
+ "hakurei.app/internal/testsuite"
)
// checkBadOpts invokes cmd/sharefs with the specified options and compares
diff --git a/test/sharefs/raceattr.go b/cmd/sharefs/testsuite/raceattr.go
index 412cb2b3..412cb2b3 100644
--- a/test/sharefs/raceattr.go
+++ b/cmd/sharefs/testsuite/raceattr.go
diff --git a/test/internal/testsuite/fs.go b/internal/testsuite/fs.go
index 9acd24b6..9acd24b6 100644
--- a/test/internal/testsuite/fs.go
+++ b/internal/testsuite/fs.go
diff --git a/test/internal/testsuite/fs_test.go b/internal/testsuite/fs_test.go
index 5c93bb46..4eea866d 100644
--- a/test/internal/testsuite/fs_test.go
+++ b/internal/testsuite/fs_test.go
@@ -8,7 +8,7 @@ import (
"testing"
"testing/fstest"
- "hakurei.app/test/internal/testsuite"
+ "hakurei.app/internal/testsuite"
)
func TestCompare(t *testing.T) {
diff --git a/test/internal/mountinfo/mountinfo.go b/internal/testsuite/mountinfo/mountinfo.go
index 19892cd2..19892cd2 100644
--- a/test/internal/mountinfo/mountinfo.go
+++ b/internal/testsuite/mountinfo/mountinfo.go
diff --git a/test/internal/mountinfo/mountinfo_guard.go b/internal/testsuite/mountinfo/mountinfo_guard.go
index aaf63ac4..aaf63ac4 100644
--- a/test/internal/mountinfo/mountinfo_guard.go
+++ b/internal/testsuite/mountinfo/mountinfo_guard.go
diff --git a/test/internal/mountinfo/mountinfo_test.go b/internal/testsuite/mountinfo/mountinfo_test.go
index 45cfdf5f..93be3880 100644
--- a/test/internal/mountinfo/mountinfo_test.go
+++ b/internal/testsuite/mountinfo/mountinfo_test.go
@@ -5,7 +5,7 @@ import (
"path/filepath"
"testing"
- "hakurei.app/test/internal/mountinfo"
+ "hakurei.app/internal/testsuite/mountinfo"
)
func TestMountinfo(t *testing.T) {
diff --git a/test/internal/testsuite/proc.go b/internal/testsuite/proc.go
index e7ef1aed..e7ef1aed 100644
--- a/test/internal/testsuite/proc.go
+++ b/internal/testsuite/proc.go
diff --git a/test/internal/testsuite/proc_test.go b/internal/testsuite/proc_test.go
index a8698e73..73693972 100644
--- a/test/internal/testsuite/proc_test.go
+++ b/internal/testsuite/proc_test.go
@@ -3,7 +3,7 @@ package testsuite_test
import (
"testing"
- "hakurei.app/test/internal/testsuite"
+ "hakurei.app/internal/testsuite"
)
func BenchmarkStatScanner(b *testing.B) {
diff --git a/test/internal/testsuite/ptrace.go b/internal/testsuite/ptrace.go
index ccf0900c..ccf0900c 100644
--- a/test/internal/testsuite/ptrace.go
+++ b/internal/testsuite/ptrace.go
diff --git a/test/internal/testsuite/ptrace_test.go b/internal/testsuite/ptrace_test.go
index eaaed131..18ad3f31 100644
--- a/test/internal/testsuite/ptrace_test.go
+++ b/internal/testsuite/ptrace_test.go
@@ -1,4 +1,4 @@
-package testsuite
+package testsuite_test
import (
"syscall"
diff --git a/test/internal/testsuite/testsuite.go b/internal/testsuite/testsuite.go
index 456c36b4..456c36b4 100644
--- a/test/internal/testsuite/testsuite.go
+++ b/internal/testsuite/testsuite.go
diff --git a/test/internal/testsuite/testsuite_guard.go b/internal/testsuite/testsuite_guard.go
index 0859d17f..0859d17f 100644
--- a/test/internal/testsuite/testsuite_guard.go
+++ b/internal/testsuite/testsuite_guard.go
diff --git a/test/internal/testsuite/testsuite_root.go b/internal/testsuite/testsuite_root.go
index 11f503ef..11f503ef 100644
--- a/test/internal/testsuite/testsuite_root.go
+++ b/internal/testsuite/testsuite_root.go
diff --git a/internal/workflows/doc.go b/internal/workflows/doc.go
index a8f18ab4..24e86b8c 100644
--- a/internal/workflows/doc.go
+++ b/internal/workflows/doc.go
@@ -126,8 +126,8 @@ first workflow job is started and re-populate it after every cmd/mbf update.
# Configuring the kernel
In order to attach to the container process, the sysctl kernel.yama.ptrace_scope
-must be set to 0. After which, apply the patch test/sandbox/seccomp.patch to
-your kernel sources, compile and install the new kernel. Refer to
+must be set to 0. After which, apply the patch internal/workflows/seccomp.patch
+to your kernel sources, compile and install the new kernel. Refer to
https://wiki.alpinelinux.org/wiki/Custom_Kernel if the guest runs Alpine Linux.
If running podman or docker as root, the patch is not required. Do not apply
this patch on a system meant to be secure.
diff --git a/test/sandbox/seccomp.patch b/internal/workflows/seccomp.patch
index ddabc71e..ddabc71e 100644
--- a/test/sandbox/seccomp.patch
+++ b/internal/workflows/seccomp.patch
diff --git a/internal/workflows/step.go b/internal/workflows/step.go
index 93d515ae..17ca25e1 100644
--- a/internal/workflows/step.go
+++ b/internal/workflows/step.go
@@ -68,7 +68,7 @@ func newTestsuite(name, prefix string) Step {
return Step{
Name: "Compile and run test suite",
Run: prefix + "rm -rf result && " +
- "go run -tags=testsuite ./test/" + name,
+ "go run -tags=testsuite ./cmd/" + name,
}
}
@@ -95,6 +95,6 @@ func newNixOSTest(name string) Step {
"--out-link result " +
"--print-out-paths " +
"--print-build-logs " +
- "./test/hakurei#checks.x86_64-linux." + name,
+ "./cmd/hakurei/testsuite#checks.x86_64-linux." + name,
}
}
diff --git a/internal/workflows/test.go b/internal/workflows/test.go
index bd74511c..41ed05c5 100644
--- a/internal/workflows/test.go
+++ b/internal/workflows/test.go
@@ -47,7 +47,7 @@ var _ = (&Workflow{
newCIRequest("distribution", "dist -o result", "dist"),
install,
- newTestsuite("sandbox", ""),
+ newTestsuite("hakurei/testsuite/sandbox", ""),
},
}},
@@ -70,7 +70,7 @@ var _ = (&Workflow{
newCIRequest("distribution", "race -o result", "dist"),
install,
- newTestsuite("sandbox", ""),
+ newTestsuite("hakurei/testsuite/sandbox", ""),
},
}},
@@ -101,7 +101,7 @@ var _ = (&Workflow{
"setuid=1023,setgid=1023 /sdcard",
},
- newTestsuite("sharefs", "sharefs -V && "),
+ newTestsuite("sharefs/testsuite", "sharefs -V && "),
newUploadArtifact("test output", "fs_mark"),
},
}},