simkit

package
v0.43.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 5, 2026 License: MIT Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package simkit is the seeded edit script of the overlay model: random operations applied to a model of the merged view and to an in-memory upper directory that follows the overlayfs rules for redirect_dir and metacopy. A test of another implementation replays each operation on it and compares the dirty set.

Index

Constants

This section is empty.

Variables

View Source
var BaseLeaves = []string{"a/a", "a/b*", "a/c/a", "a/c/b@", "b/a", "b/b/a*", "b/b/b", "c", "d/a", "d/b/a", "e@"}

BaseLeaves is the base tree of every script: "p" is a file, "p*" an executable and "p@" a symlink.

Functions

This section is empty.

Types

type Base

type Base struct {
	// contains filtered or unexported fields
}

Base is a BaseTree over a leaf list: "p" is a file, "p*" an executable, "p@" a symlink.

func (*Base) List

func (b *Base) List(_ context.Context, dir string) ([]upperdir.BaseEntry, error)

func (*Base) Lookup

func (b *Base) Lookup(_ context.Context, p string) (upperdir.BaseEntry, bool, error)

type Sim

type Sim struct {
	Lower *Base

	Up *upperdir.MemFS
	// contains filtered or unexported fields
}

sim applies operations to a model of the merged view and to an in-memory upper directory that follows the overlayfs rules for redirect_dir and metacopy.

func New

func New(seed uint64) *Sim

New starts a script. A seed gives one script.

func (*Sim) Check

func (s *Sim) Check() error

check requires that the entries of upperdir.Scan, applied to the base leaves, give the leaves of the merged view. Check requires that the dirty set of the upper, applied to the base leaves, gives the merged view.

func (*Sim) Step

func (s *Sim) Step() string

step applies one random operation and returns its description, or "" when it does not apply. Step applies one random operation and returns its description, or "" when it does not apply. A description is the operation and its paths: write, chmod, rm, mkdir, mvfile and mvdir.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL