aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/hakurei/testsuite/main.go24
-rw-r--r--cmd/hakurei/testsuite/prefix.go9
-rw-r--r--cmd/hakurei/testsuite/prefix_rosa.go9
3 files changed, 26 insertions, 16 deletions
diff --git a/cmd/hakurei/testsuite/main.go b/cmd/hakurei/testsuite/main.go
index 2a45d545..b2348ac6 100644
--- a/cmd/hakurei/testsuite/main.go
+++ b/cmd/hakurei/testsuite/main.go
@@ -190,7 +190,7 @@ func main() {
"hsu",
"sharefs",
} {
- pathname := prefix.Append("bin", name)
+ pathname := prefixHakurei.Append("bin", name)
testsuite.AssertOutput(
"validating "+pathname.String()+" static linking",
"", lddMessage(name),
@@ -408,7 +408,7 @@ func main() {
"pipewire-pulse", "pipewire proxying behaviour",
false, false, false, 0, func(c *hst.Config) {
c.Enablements = new(hst.EPipeWire)
- c.Container.Path = fhs.AbsUsrBin.Append("pactl")
+ c.Container.Path = prefix.Append("bin", "pactl")
c.Container.Args = []string{"pactl", "info"}
}, nil, func(output string) bool {
_output, _, ok := strings.CutLast(output, "Cookie: ")
@@ -452,7 +452,7 @@ func main() {
"pipewire-security", "pipewire SecurityContext",
false, false, false, 32, func(c *hst.Config) {
c.Enablements = new(hst.EPipeWire)
- c.Container.Path = fhs.AbsUsrBin.Append("pactl")
+ c.Container.Path = prefix.Append("bin", "pactl")
c.Container.Args = []string{
"pactl",
"set-sink-mute",
@@ -469,7 +469,7 @@ func main() {
"pipewire-direct-failure", "pipewire cover direct access",
false, false, false, 0, func(c *hst.Config) {
c.Enablements = new(hst.EPipeWire)
- c.Container.Path = fhs.AbsUsrBin.Append("pw-dump")
+ c.Container.Path = prefix.Append("bin", "pw-dump")
c.Container.Args = []string{"pw-dump"}
}, nil, func(output string) bool {
return output == "can't connect: Host is down\r\n"
@@ -482,7 +482,7 @@ func main() {
false, false, true, 0, func(c *hst.Config) {
c.Enablements = new(hst.EPipeWire)
c.DirectPipeWire = true
- c.Container.Path = fhs.AbsUsrBin.Append("pw-dump")
+ c.Container.Path = prefix.Append("bin", "pw-dump")
c.Container.Args = []string{"pw-dump", "-RN"}
}, nil, func(output string) bool {
return json.Valid(unsafe.Slice(unsafe.StringData(output), len(output)))
@@ -494,7 +494,7 @@ func main() {
"wayland-client", "wayland client",
true, false, false, 0, func(c *hst.Config) {
c.Enablements = new(hst.EWayland)
- c.Container.Path = fhs.AbsUsrBin.Append("foot")
+ c.Container.Path = prefix.Append("bin", "foot")
c.Container.Args = []string{"foot"}
}, func(p hst.State, pid int) error {
testsuite.PollSwayWindow(ctx, &cred, func(n *testsuite.SwayNode) bool {
@@ -512,7 +512,7 @@ func main() {
"wayland-security-context", "wayland security-context-v1",
false, false, false, 0, func(c *hst.Config) {
c.Enablements = new(hst.EWayland)
- c.Container.Path = fhs.AbsUsrBin.Append("grim")
+ c.Container.Path = prefix.Append("bin", "grim")
c.Container.Args = []string{"grim"}
}, nil, func(output string) bool {
return output == "warning: zxdg_output_manager_v1 isn't available, "+
@@ -527,7 +527,7 @@ func main() {
false, false, true, 0, func(c *hst.Config) {
c.Enablements = new(hst.EWayland)
c.DirectWayland = true
- c.Container.Path = fhs.AbsUsrBin.Append("grim")
+ c.Container.Path = prefix.Append("bin", "grim")
c.Container.Args = []string{"grim", "/dev/null"}
}, nil, nil, 0,
)
@@ -540,7 +540,7 @@ func main() {
true, false, true, 0, func(c *hst.Config) {
c.Enablements = new(hst.EWayland)
c.DirectWayland = true
- c.Container.Path = fhs.AbsUsrBin.Append("foot")
+ c.Container.Path = prefix.Append("bin", "foot")
c.Container.Args = []string{"foot"}
}, func(p hst.State, pid int) error {
testsuite.PollSwayWindow(ctx, &cred, func(n *testsuite.SwayNode) bool {
@@ -559,7 +559,7 @@ func main() {
"xwayland-client", "xwayland client",
false, false, false, 32, func(c *hst.Config) {
c.Enablements = new(hst.EX11)
- c.Container.Path = fhs.AbsUsrBin.Append("xset")
+ c.Container.Path = prefix.Append("bin", "xset")
c.Container.Args = []string{"xset", "q"}
c.Container.Flags |= hst.FHostAbstract
}, nil, func(output string) bool {
@@ -576,7 +576,7 @@ func main() {
Talk: []string{"org.freedesktop.Notifications"},
Filter: true,
}
- c.Container.Path = fhs.AbsUsrBin.Append("notify-send")
+ c.Container.Path = prefix.Append("bin", "notify-send")
c.Container.Args = []string{
"notify-send",
"Test notification",
@@ -595,7 +595,7 @@ func main() {
false, false, false, 0, func(c *hst.Config) {
c.Enablements = new(hst.EDBus)
c.SessionBus = &hst.BusConfig{Filter: true}
- c.Container.Path = fhs.AbsUsrBin.Append("notify-send")
+ c.Container.Path = prefix.Append("bin", "notify-send")
c.Container.Args = []string{
"notify-send",
"Test notification",
diff --git a/cmd/hakurei/testsuite/prefix.go b/cmd/hakurei/testsuite/prefix.go
index 5fef7c8f..fd62b566 100644
--- a/cmd/hakurei/testsuite/prefix.go
+++ b/cmd/hakurei/testsuite/prefix.go
@@ -4,8 +4,13 @@ package main
import "hakurei.app/fhs"
-// prefix is the hakurei installation prefix.
-var prefix = fhs.AbsUsr.Append("local")
+var (
+ // prefix is the installation prefix.
+ prefix = fhs.AbsUsr
+
+ // prefixHakurei is the hakurei installation prefix.
+ prefixHakurei = prefix.Append("local")
+)
// lddMessage returns the string written to stderr by glibc while validating
// hakurei.
diff --git a/cmd/hakurei/testsuite/prefix_rosa.go b/cmd/hakurei/testsuite/prefix_rosa.go
index dda93178..19e9c64a 100644
--- a/cmd/hakurei/testsuite/prefix_rosa.go
+++ b/cmd/hakurei/testsuite/prefix_rosa.go
@@ -4,8 +4,13 @@ package main
import "hakurei.app/check"
-// prefix is the hakurei installation prefix on Rosa OS.
-var prefix = check.MustAbs("/system")
+var (
+ // prefix is the Rosa OS installation prefix.
+ prefix = check.MustAbs("/system")
+
+ // prefixHakurei is the hakurei installation prefix on Rosa OS.
+ prefixHakurei = prefix
+)
// lddMessage returns the string written to stderr by musl while validating
// hakurei on Rosa OS.