-
Notifications
You must be signed in to change notification settings - Fork 771
Open
Labels
enhancementNew feature or requestNew feature or request
Description
For testing purposes, it would be really convenient if the caller could instantiate their own VariableSpecs. Cilium currently uses something like this:
var _ VariableSpec = (*ebpf.VariableSpec)(nil)
type VariableSpec interface {
MapName() string
Offset() uint64
Size() uint64
Get(out any) error
Constant() bool
}
This requires converting ebpf.VariableSpecs to our Cilium-internal VariableSpec since that's what our internal functions take to allow tests to provide their own.
This issue is for adding a NewVariableSpec
or similar with some sanity checks to allow users to create their own. As long as the accesses performed by the VariableSpec are valid, I guess this isn't something we should really prevent. Pay attention to CollectionSpec/VariableSpec.Copy() behaviour.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request