base

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: May 15, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package base provides the definition of a generic syscall.Syscall test step.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option interface {
	// contains filtered or unexported methods
}

Option for configuring a Syscall.

func WithDefaultedArgs

func WithDefaultedArgs(args []string) Option

WithDefaultedArgs allows to specify the list of defaulted arguments.

func WithMutuallyExclusiveArgs

func WithMutuallyExclusiveArgs(args []string) Option

WithMutuallyExclusiveArgs puts a constraint on the provided arguments, mandating the user to specify a value for at most one of them. This option can be provided multiple times to enforce mutually-exclusive-arguments constraints upon different arguments list.

func WithOneRequiredArg

func WithOneRequiredArg(args []string) Option

WithOneRequiredArg puts a constraint on the provided arguments, mandating the user to specify a value for at least one of them. This option can be provided multiple times to enforce one-required-argument constraints upon different arguments list.

func WithRequiredTogetherArgs

func WithRequiredTogetherArgs(args []string) Option

WithRequiredTogetherArgs puts a constraint on the provided arguments, mandating the user to specify a value for each of them if at least a value for one of them is specified. This option can be provided multiple times to enforce required-together-arguments constraints upon different arguments list.

type Syscall

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

Syscall provides a common implementation layer for system call test steps.

func New

func New(stepName string, rawArgs map[string]any, fieldBindings []*step.FieldBinding, argsContainer,
	bindOnlyArgsContainer, retValueContainer reflect.Value, options ...Option) (*Syscall, error)

New creates a new system call test step common implementation layer.

func (*Syscall) Bind

func (s *Syscall) Bind(bindings []*step.Binding) error

Bind implements step.Step.Bind method.

func (*Syscall) CheckUnboundArgField

func (s *Syscall) CheckUnboundArgField() error

CheckUnboundArgField verifies that all argument fields are bound and returns an error in case of any unbound one.

func (*Syscall) Cleanup

func (s *Syscall) Cleanup(_ context.Context) error

Cleanup implements step.Step.Cleanup method.

func (*Syscall) Field

func (s *Syscall) Field(name string) (*field.Field, error)

Field implements step.Step.Field method.

func (*Syscall) FieldBindings

func (s *Syscall) FieldBindings() []*step.FieldBinding

FieldBindings implements step.Step.FieldBindings method.

func (*Syscall) Name

func (s *Syscall) Name() string

Name implements step.Step.Name method.

Jump to

Keyboard shortcuts

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