Add sync before unmount on snapshotter layer test
Signed-off-by: Derek McGowan <derek@mcg.dev>
This commit is contained in:
parent
b729962e3e
commit
1be571b14f
@ -959,6 +959,7 @@ func check128LayersMount(name string) func(ctx context.Context, t *testing.T, sn
|
||||
t.Fatalf("[layer %d] preparing doesn't equal to flat after apply: %+v", i, err)
|
||||
}
|
||||
|
||||
sync()
|
||||
testutil.Unmount(t, preparing)
|
||||
|
||||
parent = filepath.Join(work, fmt.Sprintf("committed-%d", i))
|
||||
|
@ -18,7 +18,11 @@
|
||||
|
||||
package testsuite
|
||||
|
||||
import "syscall"
|
||||
import (
|
||||
"syscall"
|
||||
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
func clearMask() func() {
|
||||
oldumask := syscall.Umask(0)
|
||||
@ -26,3 +30,7 @@ func clearMask() func() {
|
||||
syscall.Umask(oldumask)
|
||||
}
|
||||
}
|
||||
|
||||
func sync() {
|
||||
unix.Sync()
|
||||
}
|
||||
|
@ -19,3 +19,5 @@ package testsuite
|
||||
func clearMask() func() {
|
||||
return func() {}
|
||||
}
|
||||
|
||||
func sync() {}
|
||||
|
Loading…
Reference in New Issue
Block a user