-
Notifications
You must be signed in to change notification settings - Fork 714
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
features: Make Main Package Feature Tests Public
Move all feature teats in the main package to a new internal directory, "internal/features", which can be used by the main package and also mirrored in the "features" package for public use. Signed-off-by: Nate Sweet <[email protected]>
- Loading branch information
1 parent
b805828
commit aeafd17
Showing
15 changed files
with
702 additions
and
526 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
package features | ||
|
||
import internalFeatures "github.com/cilium/ebpf/internal/features" | ||
|
||
// HaveNestedMaps returns a nil error if nested maps are supported. | ||
func HaveNestedMaps() error { | ||
return internalFeatures.HaveNestedMaps() | ||
} | ||
|
||
// HaveMapMutabilityModifiers returns a nil error if map | ||
// mutability modifiers are supported. | ||
func HaveMapMutabilityModifiers() error { | ||
return internalFeatures.HaveMapMutabilityModifiers() | ||
} | ||
|
||
// HaveMmapableMaps returns a nil error if mmapable maps | ||
// are supported. | ||
func HaveMmapableMaps() error { | ||
return internalFeatures.HaveMmapableMaps() | ||
} | ||
|
||
// HaveInnerMaps returns a nil error if inner maps are supported. | ||
func HaveInnerMaps() error { | ||
return internalFeatures.HaveInnerMaps() | ||
} | ||
|
||
// HaveNoPreallocMaps returns a nil error if the flag for | ||
// creating maps that are not pre-allocated is supported. | ||
func HaveNoPreallocMaps() error { | ||
return internalFeatures.HaveNoPreallocMaps() | ||
} | ||
|
||
// HaveObjName returns a nil error if object names are supported | ||
func HaveObjName() error { | ||
return internalFeatures.HaveObjName() | ||
} | ||
|
||
// ObjNameAllowsDot returns a nil error if object names support | ||
// the dot character, i.e. ".". | ||
func ObjNameAllowsDot() error { | ||
return internalFeatures.ObjNameAllowsDot() | ||
} | ||
|
||
// HaveBatchAPI returns a nil error if batch operations are supported | ||
func HaveBatchAPI() error { | ||
return internalFeatures.HaveBatchAPI() | ||
} | ||
|
||
// HaveProbeReadKernel returns a nil error if kprobes are supported. | ||
func HaveProbeReadKernel() error { | ||
return internalFeatures.HaveProbeReadKernel() | ||
} | ||
|
||
// HaveBPFToBPFCalls returns a nil error if bpf programs can call other bpf | ||
// programs. | ||
func HaveBPFToBPFCalls() error { | ||
return internalFeatures.HaveBPFToBPFCalls() | ||
} | ||
|
||
// HaveSyscallWrapper returns a nil error if syscall wrapper is not supported. | ||
func HaveSyscallWrapper() error { | ||
return internalFeatures.HaveSyscallWrapper() | ||
} | ||
|
||
// HaveProgramExtInfos returns a nil error if program BTF is supported | ||
func HaveProgramExtInfos() error { | ||
return internalFeatures.HaveProgramExtInfos() | ||
} | ||
|
||
// HaveProgramInfoMapIDs returns a nil error if retrieving map ids from | ||
// program's object info is supported. | ||
func HaveProgramInfoMapIDs() error { | ||
return internalFeatures.HaveProgramInfoMapIDs() | ||
} | ||
|
||
// HaveProgTestRun returns a nil error if the bpf command | ||
// PROG_TEST_RUN is supported. | ||
func HaveProgTestRun() error { | ||
return internalFeatures.HaveProgTestRun() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.