From 54da6ce03d33f6503a6753813de825f3d0447903 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Wed, 7 Jan 2026 01:03:49 +0900 Subject: internal/pkg: respect mount order for overlay temp Setting it up after everything else prevents covering files in /tmp. Signed-off-by: Ophestra --- internal/pkg/testdata/main.go | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'internal/pkg/testdata') diff --git a/internal/pkg/testdata/main.go b/internal/pkg/testdata/main.go index 4f3d047e..6a884a3a 100644 --- a/internal/pkg/testdata/main.go +++ b/internal/pkg/testdata/main.go @@ -144,22 +144,24 @@ func main() { } } + if overlayTmp { + next() // testtool artifact + if m.Root != "/" || m.Target != "/tmp" || + m.Source != "overlay" || m.FsType != "overlay" { + log.Fatal("unexpected temp mount entry") + } + } + next() if path.Base(m.Root) != ident || m.Target != "/work" { log.Fatal("unexpected work mount entry") } - next() if !overlayTmp { + next() if path.Base(m.Root) != ident || m.Target != "/tmp" { log.Fatal("unexpected temp mount entry") } - } else { - // testtool artifact - if m.Root != "/" || m.Target != "/tmp" || - m.Source != "overlay" || m.FsType != "overlay" { - log.Fatal("unexpected temp mount entry") - } } next() -- cgit v1.3.1